From fee73e812e656d2214f92396df2f6044b341d7b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Duchaussois?= Date: Thu, 21 Feb 2019 17:16:23 +0100 Subject: use full path for clever helper invocation --- tasks/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/deploy.yml b/tasks/deploy.yml index b394e55..dc00b78 100644 --- a/tasks/deploy.yml +++ b/tasks/deploy.yml @@ -1,6 +1,6 @@ - name: Configure Drain when: syslog_server is defined or clever_syslog_server is defined - command: clever-set-drain.sh + command: "{{ ansible_env.HOME }}/{{ clever_user_path }}clever-set-drain.sh" args: chdir: "{{ clever_app_root }}" environment: @@ -9,7 +9,7 @@ - name: Configure Domain when: domain is defined or clever_domain is defined - command: clever-set-domain.sh + command: "{{ ansible_env.HOME }}/{{ clever_user_path }}/clever-set-domain.sh" args: chdir: "{{ clever_app_root }}" environment: -- cgit v1.2.3 From e4a83de00793993e9f270569795069e574ce40b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Duchaussois?= Date: Thu, 21 Feb 2019 17:40:39 +0100 Subject: liniting --- meta/main.yml | 7 +++++++ tasks/addon.yml | 5 ++++- tasks/deploy.yml | 10 +++++++--- tasks/setup.yml | 5 ++++- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index eabd765..acc2f09 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -32,6 +32,13 @@ galaxy_info: # # platforms is a list of platforms, and each platform has a name and a list of versions. # + platforms: + - name: Debian + versions: + - all + - name: Ubuntu + versions: + - all # platforms: # - name: Fedora # versions: diff --git a/tasks/addon.yml b/tasks/addon.yml index 91ea4a5..cba5972 100644 --- a/tasks/addon.yml +++ b/tasks/addon.yml @@ -1,5 +1,8 @@ - name: Gather addon information for {{ addon.name }} - shell: "clever env | grep {{ addon.env_prefix }} | sed -e 's/{{ addon.env_prefix }}_//' -e 's/=/: \"/' -e 's/$/\"/' > {{ clever_app_confdir }}/{{ addon.name }}_env.yml" + shell: > + clever env | grep {{ addon.env_prefix }} + | sed -e 's/{{ addon.env_prefix }}_//' -e 's/=/: \"/' -e 's/$/\"/' + > {{ clever_app_confdir }}/{{ addon.name }}_env.yml args: chdir: "{{ clever_app_root }}" environment: diff --git a/tasks/deploy.yml b/tasks/deploy.yml index dc00b78..a2dea71 100644 --- a/tasks/deploy.yml +++ b/tasks/deploy.yml @@ -80,7 +80,8 @@ - clever_deploy is failed - clever_deploy.stderr is defined -- shell: clever activity +- name: Retrieve clever activity + command: clever activity args: chdir: "{{ clever_app_root }}" environment: @@ -88,12 +89,15 @@ changed_when: false register: clever_activity_result -- debug: +- name: Display clever activity + debug: var: clever_activity_result.stdout_lines -- shell: git show -q --format=format:%H HEAD +- name: Get current commit sha + command: git show -q --format=format:%H HEAD args: chdir: "{{ clever_app_root }}" + warn: False changed_when: false register: current_commit_sha diff --git a/tasks/setup.yml b/tasks/setup.yml index 33b1ff6..3dad790 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -14,8 +14,11 @@ remote_src: yes extra_opts: - "--strip-components=1" - src: https://clever-tools.cellar.services.clever-cloud.com/releases/{{ clever_cli_version }}/clever-tools-{{ clever_cli_version }}_linux.tar.gz + src: "{{ clever_repo }}/{{ clever_cli_version }}/{{ clever_tools_archive }}" dest: "{{ ansible_env.HOME }}/{{ clever_user_path }}" + vars: + clever_repo: https://clever-tools.cellar.services.clever-cloud.com/releases + clever_tools_archive: "{{ clever_cli_version }}/clever-tools-{{ clever_cli_version }}_linux.tar.gz" when: clever_returned_version is failed or clever_returned_version.stdout != clever_cli_version - name: Install helper scripts -- cgit v1.2.3