Play with directory only with download
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
Adrien Reslinger 2021-04-02 00:17:39 +02:00
parent 5b8aa56d0f
commit bf779ebb40
Signed by: adrien
GPG key ID: DA7B27055C66D6DE

View file

@ -23,13 +23,13 @@
changed_when: false
check_mode: no
- name: Make lego temporary directory
file:
path: /tmp/lego_install
state: directory
- name: Download lego
block:
- name: Make lego temporary directory
file:
path: /tmp/lego_install
state: directory
- name: Retreive lego archive file and extract it to temporary directory
ansible.builtin.unarchive:
src: "{{ lego_dl_url }}/v{{ lego_ver.stdout }}/{{ lego_file }}"
@ -45,10 +45,10 @@
mode: u=rwx,g=rx,o=rx
remote_src: yes
- name: Remove lego temporary directory
file:
path: /tmp/lego_install
state: absent
- name: Remove lego temporary directory
file:
path: /tmp/lego_install
state: absent
when:
- not lego.stat.exists or ( lego_locver.stdout != lego_ver.stdout )