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
|
- name: update apt repository
|
||||||
action: raw apt-get -q -y update
|
action: raw apt-get -q -y update
|
||||||
|
|
||||||
- name: install python
|
- name: install python3
|
||||||
action: raw apt-get -q -y install python
|
action: raw apt-get -q -y install python3
|
||||||
|
|
||||||
# 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: ensure other prereqs installed
|
- name: ensure other prereqs installed
|
||||||
action: raw apt-get -qy install python-simplejson
|
action: raw apt-get -qy install python3-paramiko python3-yaml python3-jinja2 python3-apt python3-docker
|
||||||
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
|
|
||||||
|
|
||||||
- name: update packages
|
- name: update packages
|
||||||
tags:
|
tags:
|
||||||
- update
|
- update
|
||||||
hosts: all
|
hosts: all
|
||||||
user: root
|
user: root
|
||||||
roles:
|
tasks:
|
||||||
- role: apt-upgrade
|
- name: update apt safely
|
||||||
|
apt: upgrade=safe
|
||||||
|
async: 600
|
||||||
|
poll: 5
|
||||||
|
|||||||
@@ -15,10 +15,10 @@
|
|||||||
- name: fail if no apt package management
|
- name: fail if no apt package management
|
||||||
fail:
|
fail:
|
||||||
msg: We currently only support Linux with apt
|
msg: We currently only support Linux with apt
|
||||||
when: not has_apt
|
when: has_apt.rc == 127
|
||||||
|
|
||||||
- import_playbook: bootstrap-debian.yml
|
- import_playbook: bootstrap-debian.yml
|
||||||
when: has_apt
|
when: has_apt.rc != 127
|
||||||
|
|
||||||
|
|
||||||
# Maybe add these somewhere later.
|
# Maybe add these somewhere later.
|
||||||
|
|||||||
Reference in New Issue
Block a user