bootstrap.yml - target python3

Ubuntu fossa seems not to have the packages we want for python 2
This commit is contained in:
Nick Stokoe
2020-11-29 14:45:31 +00:00
parent 154a71d54d
commit 04b0d30929
2 changed files with 10 additions and 16 deletions

View File

@@ -11,25 +11,19 @@
- name: update apt repository
action: raw apt-get -q -y update
- name: install python
action: raw apt-get -q -y install python
# the command succeeds (returns code 0) if python needs simplejson
- name: check if python is old enough to need simplejson
action: raw python -c 'import sys; sys.stdout.write("%s" % (sys.version_info<(2,6)))'
register: need_simplejson
- name: install python3
action: raw apt-get -q -y install python3
- name: ensure other prereqs installed
action: raw apt-get -qy install python-simplejson
when: need_simplejson.stdout
- name: ensure other prereqs installed
action: raw apt-get -qy install python-paramiko python-yaml python-jinja2 python-apt python-docker
action: raw apt-get -qy install python3-paramiko python3-yaml python3-jinja2 python3-apt python3-docker
- name: update packages
tags:
- update
hosts: all
user: root
roles:
- role: apt-upgrade
tasks:
- name: update apt safely
apt: upgrade=safe
async: 600
poll: 5