Ensure venv is extracted if the target folder was not present
In the situation where a deployer may have removed the venv folder on the target host, but has not removed the the tgz/checksum file, the venv will not be extracted again. This patch ensures that if the venv folder was not there and gets created by the task then it will extract the tgz into the folder.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
file:
|
||||
path: "{{ venv_destination_path }}"
|
||||
state: directory
|
||||
register: _venv_dir_create
|
||||
|
||||
- name: Unarchive pre-built venv
|
||||
unarchive:
|
||||
@@ -40,8 +41,8 @@
|
||||
dest: "{{ venv_destination_path }}"
|
||||
remote_src: no
|
||||
when:
|
||||
- _venv_checksum_copy is mapping
|
||||
- _venv_checksum_copy | changed
|
||||
- (_venv_checksum_copy is mapping and _venv_checksum_copy | changed) or
|
||||
_venv_dir_create | changed
|
||||
notify:
|
||||
- venv changed
|
||||
|
||||
|
Reference in New Issue
Block a user