msg: [Errno 2] No such file or directory

Hi

I'm getting a "msg: [Errno 2] No such file or directory" on "apt" with the most simple playbook.

This is with version v1.9.1-1

I checked my syntax etc... and the only way I can fix it is to go to version v1.5.0. Googling, I see that this was an issue but it was fixed in 1.5.2.

Can there be something specific in my environment that causes this? A problem with sudo? Anybody else running into this?

Here is the full result:
TASK: [baselinux | install important packages] ********************************
failed: [tuck] => {"cmd": "DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical /usr/bin/apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install tmux", "failed": true, "rc": 2}
msg: [Errno 2] No such file or directory

FATAL: all hosts have already failed -- aborting

Is the issue that it tries to run 'DEBIAN_FRONTEND"?

DEBIAN_FRONTEND is just being set as an environment variable to tell
apt not to prompt.

what OS are you running against? can you share the 'simple play'?

DEBIAN_FRONTEND is just being set as an environment variable to tell
apt not to prompt.

I realise that, I knew you could do that with shell, but I hadn't realised it
worked with cmd which I thought was a C exec of a binary command.

what OS are you running against? can you share the 'simple play'?

Ubuntu 14.04, although, in an LXC container, but I can ssh into that
container, and "sudo apt-get install tmux", and the sysctl module does work.
As far as ansible is concerned, that container is just another Ubuntu machine:

main.yaml in role:
    - name: swappiness
      sysctl: name=vm.swappiness value=0 reload=yes checks=none

    - name: install important packages
      apt: name=tmux

site.yaml
    - name: Apply base Linux config
      hosts: all
      gather_facts: no
      sudo: yes
      remote_user: yves

      roles:
        - baselinux

The command I use to run it:
    ansible-playbook --user yves -K site.yaml

Ok, solved, the issue was with submodules, I did:

git submodule update --init lib/ansible/modules/core
git submodule update --init lib/ansible/modules/extras

and it works now. I think it was using the core modules from an old version.

I had not used ansible for a while, and had not re-read the doc, I see it now:

http://docs.ansible.com/intro_installation.html
    git pull --rebase
    git submodule update --init --recursive