mirror of
https://github.com/Crocmagnon/ansible.git
synced 2024-12-22 14:01:58 +01:00
add clean dependencies playbook
This commit is contained in:
parent
559c75c762
commit
191a09a137
2 changed files with 11 additions and 1 deletions
7
playbooks/dependencies/00-clean-deps.yaml
Normal file
7
playbooks/dependencies/00-clean-deps.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
- name: clean ansible venv
|
||||
hosts: servers
|
||||
tasks:
|
||||
- name: remove virtualenv
|
||||
file:
|
||||
path: /tmp/ansible
|
||||
state: absent
|
|
@ -8,8 +8,11 @@
|
|||
- python3-venv
|
||||
- name: setup venv
|
||||
shell: |
|
||||
if [ -x /tmp/ansible/bin/python ]; then rm -rf /tmp/ansible; fi
|
||||
if [ -x /tmp/ansible/bin/python ]; then exit 123; fi
|
||||
/usr/bin/python3 -m venv /tmp/ansible
|
||||
/tmp/ansible/bin/pip install --upgrade 'github3.py >= 1.0.0a3'
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: venv
|
||||
changed_when: "venv.rc != 123"
|
||||
failed_when: "venv.rc != 0 and venv.rc != 123"
|
Loading…
Reference in a new issue