diff --git a/bootstrap-debian.yml b/bootstrap-debian.yml index e8ccb71..974e303 100644 --- a/bootstrap-debian.yml +++ b/bootstrap-debian.yml @@ -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 \ No newline at end of file + tasks: + - name: update apt safely + apt: upgrade=safe + async: 600 + poll: 5 diff --git a/bootstrap.yml b/bootstrap.yml index 513c2e0..d252f7a 100644 --- a/bootstrap.yml +++ b/bootstrap.yml @@ -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.