Hello,
While attempting to provision a Digital Ocean virtual server my playbook needs to create two groups:
Creation of the virtual server is successful however creating the groups fails with the message:
msg: Failed to find required executable groupadd
The OS is Ubuntu 14.04 LTS, freshly provisioned.
Sending the which groupadd command after SSH to the server yeilds:
which groupadd
/usr/sbin/groupadd
Sending the command groupadd results in a help page, so the executable is definitely there.
Ansible versions:
- ansible 1.7.1
- ansible-playbook 1.7.1
Any ideas what I may be doing wrong here?
Hello All,
I found that the problem was my use of the “-c local” flag in my CLI invocation of the playbook.
Additionally I upgraded from Ansible version 1.7.1 to version 1.7.2
Originally the command that failed was:
ansible-playbook -v -c local -i localhost someplaybook.yml
After changing the command to
ansible-playbook -v -i localhost someplaybook.yml
The playbook ran as expected.
Just wanted to post a solution for everyone, in case of future similar problems.
Yes, -c local will force every host in your playbook to run locally. It’s good for a simple playbook targetting localhost, but you shouldn’t do it in general with playbooks targetting your whole infra.
Glad you figured it out!