1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Ansible_Project/roles/ansistrano.deploy/tasks/update-code/unarchive.yml

33 lines
1.2 KiB
YAML
Raw Normal View History

2022-05-02 17:37:08 +02:00
---
- name: ANSISTRANO | Unarchive | Unarchive source
unarchive:
copy: no
src: "{{ ansistrano_archived_file }}"
dest: "{{ ansistrano_release_path.stdout }}"
exclude: "{{ ansistrano_unarchive_exclude }}"
when: ansistrano_unarchive_owner == "default" and ansistrano_unarchive_group == "default"
- name: ANSISTRANO | Unarchive | Unarchive source
fail:
msg: "must set ansistrano_unarchive_group and ansistrano_unarchive_owner"
when: >
(ansistrano_unarchive_owner == "default" and ansistrano_unarchive_group != "default") or
(ansistrano_unarchive_owner != "default" and ansistrano_unarchive_group == "default")
- name: ANSISTRANO | Unarchive | Unarchive source with owner and group
unarchive:
copy: no
src: "{{ ansistrano_archived_file }}"
dest: "{{ ansistrano_release_path.stdout }}"
owner: "{{ ansistrano_unarchive_owner }}"
group: "{{ ansistrano_unarchive_group }}"
exclude: "{{ ansistrano_unarchive_exclude }}"
when: >
ansistrano_unarchive_owner != "default" and
ansistrano_unarchive_group != "default"
- name: ANSISTRANO | Unarchive | Delete archived file
file:
path: "{{ ansistrano_archived_file }}"
state: absent