]> git.immae.eu Git - github/fretlink/ansible-clever.git/blame_incremental - tasks/setup.yml
Merge pull request #11 from gaetanfl/lint
[github/fretlink/ansible-clever.git] / tasks / setup.yml
... / ...
CommitLineData
1- name: Check if clever command is available in path and version
2 command: clever --version
3 register: clever_returned_version
4 ignore_errors: true
5 changed_when: False
6
7- name: Ensure user path exists
8 file:
9 path: "{{ ansible_env.HOME }}/{{ clever_user_path }}"
10 state: directory
11
12- name: Download and install clever cli tools if necessary
13 unarchive:
14 remote_src: yes
15 extra_opts:
16 - "--strip-components=1"
17 src: https://clever-tools.cellar.services.clever-cloud.com/releases/{{ clever_cli_version }}/clever-tools-{{ clever_cli_version }}_linux.tar.gz
18 dest: "{{ ansible_env.HOME }}/{{ clever_user_path }}"
19 when: clever_returned_version is failed or clever_returned_version.stdout != clever_cli_version
20
21- name: Install helper scripts
22 copy:
23 src: "{{ item }}"
24 dest: "{{ ansible_env.HOME }}/{{ clever_user_path }}/{{ item }}"
25 mode: 0755
26 with_items:
27 - clever-set-domain.sh
28 - clever-set-drain.sh
29 - clever-wait-deploy.sh