Hi folks,
I’m not certain (in fact I’m entirely uncertain) that this is directly an Ansible issue, but I’ve only come across it with instances launched using the “ec2” module. Occasionally (maybe 1 in 5 or fewer) the first command (apt: update=dist update-cache=yes) run after waiting for ssh to become available results in an error along these lines:
failed: [a.b.c.d] => {“changed”: true, “cmd”: [“apt-get”, “update”], “delta”: “0:00:01.103811”, “end”: “2013-10-02 23:50:06.322064”, “item”: “”, “rc”: 100, “start”: “2013-10-02 23:50:05.218253”}
stderr: E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise_Release - open (2: No such file or directory)
E: Unable to determine the file size - fstat (9: Bad file descriptor)
stdout: Hit http://archive.ubuntu.com precise Release.gpg
Get:1 http://archive.ubuntu.com precise-updates Release.gpg [198 B]
Get:2 http://security.ubuntu.com precise-security Release.gpg [198 B]
Hit http://archive.ubuntu.com precise Release
Get:3 http://archive.ubuntu.com precise-updates Release [49.6 kB]
Get:4 http://security.ubuntu.com precise-security Release [49.6 kB]
FATAL: all hosts have already failed – aborting
I haven’t been able to determine if this is an occasional EC2 problem, or an issue of how I’m running my plays, but thought I’d toss it out there and see if anyone else has experienced this.