mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-26 03:23:11 +00:00
Change ansible_python_version to v3
Python 3 is now the assumed default python version for ansible. Downstream packages may still install python2 (ie/ samba).
This commit is contained in:
parent
051dba232c
commit
36b3712dc3
3 changed files with 3 additions and 14 deletions
|
@ -196,6 +196,8 @@ ansible_nas_extra_packages:
|
||||||
- unzip
|
- unzip
|
||||||
- lm-sensors
|
- lm-sensors
|
||||||
|
|
||||||
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
|
|
||||||
###
|
###
|
||||||
### Samba
|
### Samba
|
||||||
###
|
###
|
||||||
|
|
|
@ -3,8 +3,4 @@
|
||||||
|
|
||||||
# Example using from remote workstation
|
# Example using from remote workstation
|
||||||
# [all]
|
# [all]
|
||||||
# 192.168.1.30
|
# 192.168.1.30
|
||||||
|
|
||||||
# Example using from remote without python2 on host
|
|
||||||
# [all]
|
|
||||||
# 192.168.1.30 ansible_python_interpreter=/usr/bin/python3
|
|
|
@ -1,19 +1,10 @@
|
||||||
---
|
---
|
||||||
- name: install pip
|
|
||||||
apt:
|
|
||||||
name: python-pip
|
|
||||||
state: present
|
|
||||||
register: result
|
|
||||||
until: result is succeeded
|
|
||||||
when: ansible_python_version < 3
|
|
||||||
|
|
||||||
- name: install python3-pip
|
- name: install python3-pip
|
||||||
apt:
|
apt:
|
||||||
name: python3-pip
|
name: python3-pip
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
until: result is succeeded
|
until: result is succeeded
|
||||||
when: ansible_python_version >= 3
|
|
||||||
|
|
||||||
- name: 'Install docker-py'
|
- name: 'Install docker-py'
|
||||||
pip:
|
pip:
|
||||||
|
|
Loading…
Reference in a new issue