ansible fails to provision ubuntu/xenial64

Bug #1598428 reported by Yuri Kanivetsky
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-images
Invalid
Undecided
Unassigned

Bug Description

Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  # config.vm.box = 'ubuntu/trusty64'
  config.vm.box = 'ubuntu/xenial64'
  config.vm.provision 'ansible' do |ansible|
    ansible.playbook = 'provisioning/playbook.yml'
    ansible.sudo = true
  end
end

provisioning/playbook.yml:

- 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/playbook.retry

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
Revision history for this message
Andreas Olsson (andol) wrote :

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

Revision history for this message
Dan Watkins (oddbloke) wrote :

Agreed, the fix here is to ensure that your workload is installing its dependencies.

Changed in cloud-images:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.