aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks/setup.yml
diff options
context:
space:
mode:
authorGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>2018-02-22 11:53:19 +0100
committerGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>2018-02-22 11:57:08 +0100
commitf7dd5848f817bb42cb06eadc5444ec390aa813ba (patch)
tree7459517d6b8b850959313d5c30f25f18fcda5531 /tasks/setup.yml
parent4882b0d33ce42a3b01ac9689d1809e362f314d3f (diff)
downloadansible-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/setup.yml')
-rw-r--r--tasks/setup.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/tasks/setup.yml b/tasks/setup.yml
new file mode 100644
index 0000000..49e91ca
--- /dev/null
+++ b/tasks/setup.yml
@@ -0,0 +1,25 @@
1- name: Check if clever command is available in path and version
2 command: clever --version
3 register: clever_returned_version
4 ignore_error: true
5
6- name: Ensure user path exists
7 file:
8 path: "{{ ansible_env.HOME }}/{{ clever_user_path }}"
9 state: directory
10
11- name: Download and install clever cli tools if necessary
12 unarchive:
13 remote_src: yes
14 src: https://clever-tools.cellar.services.clever-cloud.com/releases/{{ clever_cli_version }}/clever-tools-{{ clever_cli_version }}_linux.tar.gz
15 dest: "{{ ansible_env.HOME }}/{{ clever_user_path }}"
16 when: clever_returned_version|failed or clever_returned_version.stdout != clever_cli_version
17
18- name: Install helper scripts
19 copy:
20 src: "{{ item }}"
21 dest: "{{ ansible_env.HOME }}/{{ clever_user_path }}/{{ item }}"
22 with_items:
23 - clever-set-domain.sh
24 - clever-set-drain.sh
25 - clever-wait-deploy.sh