Using group module; "Failed to find required executable groupadd"

298 views
Skip to first unread message

Joshua Burke

unread,
Nov 11, 2014, 2:40:59 PM11/11/14
to ansible...@googlegroups.com
Hello, 

While attempting to provision a Digital Ocean virtual server my playbook needs to create two groups:
  - sudousers
  - sshusers

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?

Joshua Burke

unread,
Nov 12, 2014, 1:55:59 PM11/12/14
to ansible...@googlegroups.com
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.

Michael DeHaan

unread,
Nov 17, 2014, 4:25:33 PM11/17/14
to ansible...@googlegroups.com
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!



--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b9f9a4d7-168c-405d-83fc-d44271c4226c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages