mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-26 10:15:14 +00:00
add check and remove for docker-py
This commit is contained in:
parent
6a46e5065a
commit
b3d1fe6630
1 changed files with 13 additions and 0 deletions
|
@ -5,6 +5,19 @@
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
until: result is succeeded
|
until: result is succeeded
|
||||||
|
|
||||||
|
- name: 'Check if docker-py is installed'
|
||||||
|
shell: pip3 show docker-py
|
||||||
|
ignore_errors: true
|
||||||
|
register: docker_py_check
|
||||||
|
|
||||||
|
- name: 'Remove docker-py if installed'
|
||||||
|
pip:
|
||||||
|
name: docker-py
|
||||||
|
state: absent
|
||||||
|
when: docker_py_check.stdout.find('docker-py') != -1
|
||||||
|
register: result
|
||||||
|
until: result is succeeded
|
||||||
|
|
||||||
- name: 'Install docker python module'
|
- name: 'Install docker python module'
|
||||||
pip:
|
pip:
|
||||||
|
|
Loading…
Reference in a new issue