diff options
author | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2018-02-22 11:53:19 +0100 |
---|---|---|
committer | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2018-02-22 11:57:08 +0100 |
commit | f7dd5848f817bb42cb06eadc5444ec390aa813ba (patch) | |
tree | 7459517d6b8b850959313d5c30f25f18fcda5531 /tasks/deploy.yml | |
parent | 4882b0d33ce42a3b01ac9689d1809e362f314d3f (diff) | |
download | ansible-clever-f7dd5848f817bb42cb06eadc5444ec390aa813ba.tar.gz ansible-clever-f7dd5848f817bb42cb06eadc5444ec390aa813ba.tar.zst ansible-clever-f7dd5848f817bb42cb06eadc5444ec390aa813ba.zip |
Migrating single tasks file to a galaxy role
Diffstat (limited to 'tasks/deploy.yml')
-rw-r--r-- | tasks/deploy.yml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tasks/deploy.yml b/tasks/deploy.yml new file mode 100644 index 0000000..8b98d8c --- /dev/null +++ b/tasks/deploy.yml | |||
@@ -0,0 +1,30 @@ | |||
1 | - name: Configure Drain | ||
2 | when: syslog_server is defined | ||
3 | command: clever-set-drain.sh | ||
4 | environment: | ||
5 | SYSLOG_UDP_SERVER: "{{ syslog_server }}" | ||
6 | CONFIGURATION_FILE: "{{ clever_login_file }}" | ||
7 | |||
8 | - name: Configure Domain | ||
9 | when: domain is defined | ||
10 | command: clever-set-domain.sh | ||
11 | environment: | ||
12 | DOMAIN: "{{ domain }}" | ||
13 | CONFIGURATION_FILE: "{{ clever_login_file }}" | ||
14 | |||
15 | - name: Push Environment | ||
16 | shell: "clever env import < {{ clever_app_confdir }}/env" | ||
17 | environment: | ||
18 | CONFIGURATION_FILE: "{{ clever_login_file }}" | ||
19 | |||
20 | #TODO: Improve ssh-key validation | ||
21 | - name: Accept Clever-Cloud servers | ||
22 | shell: "ssh-keyscan -H push-par-clevercloud-customers.services.clever-cloud.com >> ~/.ssh/known_hosts" | ||
23 | |||
24 | - 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" | ||
26 | |||
27 | - name: Wait until deployment completion | ||
28 | command: clever-wait-deploy.sh | ||
29 | environment: | ||
30 | CONFIGURATION_FILE: "{{ clever_login_file }}" | ||