aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--tasks/addon.yml1
-rw-r--r--tasks/deploy.yml6
-rw-r--r--tasks/login.yml4
-rw-r--r--tasks/setup.yml1
5 files changed, 13 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 2b452f9..82ddcec 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,6 +5,7 @@ sudo: false
5 5
6install: 6install:
7 - nix-env -i python2.7-ansible 7 - nix-env -i python2.7-ansible
8 - nix-env -i python2.7-ansible-lint
8 9
9 # Check ansible version 10 # Check ansible version
10 - ansible --version 11 - ansible --version
@@ -18,6 +19,7 @@ install:
18script: 19script:
19 # Basic role syntax check 20 # Basic role syntax check
20 - ansible-playbook tests/test.yml -i tests/inventory --syntax-check 21 - ansible-playbook tests/test.yml -i tests/inventory --syntax-check
22 - ansible-lint .
21 23
22notifications: 24notifications:
23 slack: fretlink:pTIylIN7zkwRFuL3aHERmsbB 25 slack: fretlink:pTIylIN7zkwRFuL3aHERmsbB
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 @@
2 shell: "clever env | grep {{ addon.env_prefix }} | sed -e 's/{{ addon.env_prefix }}_//' -e 's/=/: \"/' -e 's/$/\"/' > {{ clever_app_confdir }}/{{ addon.name }}_env.yml" 2 shell: "clever env | grep {{ addon.env_prefix }} | sed -e 's/{{ addon.env_prefix }}_//' -e 's/=/: \"/' -e 's/$/\"/' > {{ clever_app_confdir }}/{{ addon.name }}_env.yml"
3 environment: 3 environment:
4 CONFIGURATION_FILE: "{{ clever_login_file }}" 4 CONFIGURATION_FILE: "{{ clever_login_file }}"
5 changed_when: False
5 6
6- name: Include addon var for {{ addon.name }} 7- name: Include addon var for {{ addon.name }}
7 include_vars: 8 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 @@
16 shell: "clever env import < {{ clever_app_confdir }}/env" 16 shell: "clever env import < {{ clever_app_confdir }}/env"
17 environment: 17 environment:
18 CONFIGURATION_FILE: "{{ clever_login_file }}" 18 CONFIGURATION_FILE: "{{ clever_login_file }}"
19 changed_when: false
19 20
20#TODO: Improve ssh-key validation 21#TODO: Improve ssh-key validation
21- name: Accept Clever-Cloud servers 22- name: Accept Clever-Cloud servers
22 shell: "ssh-keyscan -H push-par-clevercloud-customers.services.clever-cloud.com >> ~/.ssh/known_hosts" 23 shell: "ssh-keyscan -H push-par-clevercloud-customers.services.clever-cloud.com >> ~/.ssh/known_hosts"
24 tags:
25 - skip_ansible_lint
23 26
24- name: Push to Clever-Cloud to trigger deployment 27- name: Push to Clever-Cloud to trigger deployment
25 command: "git push --force git+ssh://git@push-par-clevercloud-customers.services.clever-cloud.com/{{ clever_app }}.git HEAD:refs/heads/master" 28 command: "git push --force git+ssh://git@push-par-clevercloud-customers.services.clever-cloud.com/{{ clever_app }}.git HEAD:refs/heads/master"
29 tags:
30 - skip_ansible_lint
26 31
27- name: Watch deployment status 32- name: Watch deployment status
28 command: clever-wait-deploy.sh 33 command: clever-wait-deploy.sh
@@ -31,6 +36,7 @@
31 register: long_command 36 register: long_command
32 environment: 37 environment:
33 CONFIGURATION_FILE: "{{ clever_login_file }}" 38 CONFIGURATION_FILE: "{{ clever_login_file }}"
39 changed_when: False
34 40
35# Waits up to 15 minutes 41# Waits up to 15 minutes
36- name: Wait for deployment completion 42- 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 @@
10 no_log: true 10 no_log: true
11 11
12- name: Link app 12- name: Link app
13 shell: clever link {{ clever_app }} 13 command: clever link {{ clever_app }}
14 args:
15 creates: "{{ clever_app_root }}/.clever.json"
14 environment: 16 environment:
15 CONFIGURATION_FILE: "{{ clever_login_file }}" 17 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 @@
2 command: clever --version 2 command: clever --version
3 register: clever_returned_version 3 register: clever_returned_version
4 ignore_errors: true 4 ignore_errors: true
5 changed_when: False
5 6
6- name: Ensure user path exists 7- name: Ensure user path exists
7 file: 8 file: