ansible fails to provision ubuntu/xenial64
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-images |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.
# config.vm.box = 'ubuntu/trusty64'
config.vm.box = 'ubuntu/xenial64'
config.
ansible.
ansible.sudo = true
end
end
provisioning/
- hosts: all
roles:
- geerlingguy.ruby
requirements.yml:
- src: geerlingguy.ruby
$ ansible-galaxy install -r requirements.yml
$ vagrant provision
==> default: Running provisioner: ansible...
default: Running ansible-playbook...
PLAY [all] *******
TASK [setup] *******
fatal: [default]: FAILED! => {"changed": false, "failed": true, "module_stderr": "", "module_stdout": "/bin/sh: 1: /usr/bin/p
ython: not found\r\n", "msg": "MODULE FAILURE", "parsed": false}
NO MORE HOSTS LEFT *******
to retry, use: --limit @provisioning/
PLAY RECAP *******
default : ok=0 changed=0 unreachable=0 failed=1
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
With ubuntu/trusty64 it succeeds. Both boxes are of version 20160627.0.0. I'm running virtualbox-5.0.22, and ansible-2.1.0.0.
description: | updated |
That error is the result of Ubuntu server/cloud images no longer having Python2 preinstalled, which is what Ansible still need. Hence, this isn't really a bug, but more the result of an explicit design decision.
https:/ /wiki.ubuntu. com/XenialXerus /ReleaseNotes# Python_ 3
The easiest way forward ought to be to use the Ansible raw module to install Python2, which is still available in the repositories. See the following mailing list thread for more info, some examples, etc
https:/ /groups. google. com/forum/ #!topic/ ansible- project/ DUKzTho3OCI