bootstrap.yml - target python3
Ubuntu fossa seems not to have the packages we want for python 2
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
- name: fail if no apt package management
|
||||
fail:
|
||||
msg: We currently only support Linux with apt
|
||||
when: not has_apt
|
||||
when: has_apt.rc == 127
|
||||
|
||||
- import_playbook: bootstrap-debian.yml
|
||||
when: has_apt
|
||||
when: has_apt.rc != 127
|
||||
|
||||
|
||||
# Maybe add these somewhere later.
|
||||
|
||||
Reference in New Issue
Block a user