I am trying to upgrade all our (ubuntu) servers with the following playbook:
- hosts: all
serial: 2
tasks:
- name: apt-get update
apt: update_cache=yes
- name: apt-get dist-upgrade
apt: upgrade=dist dpkg_options='force-confold,force-confdef'
- name: reboot
command: '/sbin/reboot'
This fails like so:
TASK: [apt-get dist-upgrade]
**************************************************
<10.0.20.4> REMOTE_MODULE apt upgrade=dist
dpkg_options='force-confold,force-confdef'
<10.0.20.67> REMOTE_MODULE apt upgrade=dist
dpkg_options='force-confold,force-confdef'
failed: [10.0.20.4] => {"cmd": ["DEBIAN_FRONTEND=noninteractive",
"DEBIAN_PRIORITY=critical", "/usr/bin/apt-get", "-y", "-o",
"Dpkg::Options::=--force-confold", "-o", "Dpkg::Options::=--force-confdef",
"dist-upgrade"], "failed": true, "rc": 2}
msg: [Errno 2] No such file or directory
The command runs fine if I run it as root on the machine itself:
'DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical
/usr/bin/apt-get -y -o Dpkg::Options::=--force-confold -o
Dpkg::Options::=--force-confdef dist-upgrade'
Using that command line in a ansible 'command' or 'shell' statement instead
of the apt command produces exactly the same error.
Any ideas?
cheers
Jens-Christian
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/7e6ee65a-eabc-4e49-a036-1bff92f6b7a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.