This commit is contained in:
Greg Szabo
2017-09-19 23:51:40 -04:00
parent 83f49f0dff
commit 6e2caf5a06

View File

@ -6,11 +6,13 @@
register: downloaded register: downloaded
connection: local connection: local
run_once: yes run_once: yes
become: no
- name: Figure out file source - name: Figure out file source
set_fact: set_fact:
compiledsource: "{{ (downloaded.skipped is defined) | ternary(source, downloaded.dest) }}" compiledsource: "{{ (downloaded.skipped is defined) | ternary(source, downloaded.dest) }}"
connection: local connection: local
become: no
- name: Extract file to destination - name: Extract file to destination
when: compiledsource | regex_search('\\.(zip|tar|tar\\.gz|tgz|tb2|tbz|tbz2|tar\\.bz2|txz|tar\\.xz)$') when: compiledsource | regex_search('\\.(zip|tar|tar\\.gz|tgz|tb2|tbz|tbz2|tar\\.bz2|txz|tar\\.xz)$')