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:
Craig Jarvis 2019-01-06 10:58:53 +11:00
parent 051dba232c
commit 36b3712dc3
3 changed files with 3 additions and 14 deletions

View file

@ -196,6 +196,8 @@ ansible_nas_extra_packages:
- unzip
- lm-sensors
ansible_python_interpreter: /usr/bin/python3
###
### Samba
###

View file

@ -4,7 +4,3 @@
# Example using from remote workstation
# [all]
# 192.168.1.30
# Example using from remote without python2 on host
# [all]
# 192.168.1.30 ansible_python_interpreter=/usr/bin/python3

View file

@ -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
apt:
name: python3-pip
state: present
register: result
until: result is succeeded
when: ansible_python_version >= 3
- name: 'Install docker-py'
pip: