From 7485b189faf61061027fbba06b7bdbe51c13a705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Duchaussois?= Date: Fri, 21 Sep 2018 12:25:48 +0200 Subject: add ansible-lint test and fix warning --- tasks/addon.yml | 1 + tasks/deploy.yml | 6 ++++++ tasks/login.yml | 4 +++- tasks/setup.yml | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) (limited to 'tasks') diff --git a/tasks/addon.yml b/tasks/addon.yml index f6a4d14..5e7102c 100644 --- a/tasks/addon.yml +++ b/tasks/addon.yml @@ -2,6 +2,7 @@ shell: "clever env | grep {{ addon.env_prefix }} | sed -e 's/{{ addon.env_prefix }}_//' -e 's/=/: \"/' -e 's/$/\"/' > {{ clever_app_confdir }}/{{ addon.name }}_env.yml" environment: CONFIGURATION_FILE: "{{ clever_login_file }}" + changed_when: False - name: Include addon var for {{ addon.name }} include_vars: diff --git a/tasks/deploy.yml b/tasks/deploy.yml index 54c04ac..5e773b4 100644 --- a/tasks/deploy.yml +++ b/tasks/deploy.yml @@ -16,13 +16,18 @@ shell: "clever env import < {{ clever_app_confdir }}/env" environment: CONFIGURATION_FILE: "{{ clever_login_file }}" + changed_when: false #TODO: Improve ssh-key validation - name: Accept Clever-Cloud servers shell: "ssh-keyscan -H push-par-clevercloud-customers.services.clever-cloud.com >> ~/.ssh/known_hosts" + tags: + - skip_ansible_lint - name: Push to Clever-Cloud to trigger deployment command: "git push --force git+ssh://git@push-par-clevercloud-customers.services.clever-cloud.com/{{ clever_app }}.git HEAD:refs/heads/master" + tags: + - skip_ansible_lint - name: Watch deployment status command: clever-wait-deploy.sh @@ -31,6 +36,7 @@ register: long_command environment: CONFIGURATION_FILE: "{{ clever_login_file }}" + changed_when: False # Waits up to 15 minutes - name: Wait for deployment completion diff --git a/tasks/login.yml b/tasks/login.yml index 0eb310f..bed5dbc 100644 --- a/tasks/login.yml +++ b/tasks/login.yml @@ -10,6 +10,8 @@ no_log: true - name: Link app - shell: clever link {{ clever_app }} + command: clever link {{ clever_app }} + args: + creates: "{{ clever_app_root }}/.clever.json" environment: CONFIGURATION_FILE: "{{ clever_login_file }}" diff --git a/tasks/setup.yml b/tasks/setup.yml index 0dfcddf..f85a635 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -2,6 +2,7 @@ command: clever --version register: clever_returned_version ignore_errors: true + changed_when: False - name: Ensure user path exists file: -- cgit v1.2.3