Work like a charm! Thank you!

On Tue, Jan 15, 2019 at 12:51 AM James Cassell
<fedoraproj...@cyberpear.com> wrote:
>
>
>
> On Mon, Jan 14, 2019, at 5:44 PM, boncalo mihai wrote:
> > Hi
> > Sorry , this must be to easy for you but I can't figure it out. I was
> > following some ansible video  tutorials and I can't go further because
> > of some errors
> >
> > ansible all -m user -a name=linda
> > ansible3 | FAILED! => {
> >     "changed": false,
> >     "msg": "useradd: Permission denied.\nuseradd: cannot lock
> > /etc/passwd; try again later.\n",
> >     "name": "linda",
> >     "rc": 1
> > }
> > ansible4 | FAILED! => {
> >     "changed": false,
> >     "msg": "useradd: Permission denied.\nuseradd: cannot lock
> > /etc/passwd; try again later.\n",
> >     "name": "linda",
> >     "rc": 1
> > }
> > ansible2 | FAILED! => {
> >     "changed": false,
> >     "cmd": "/sbin/useradd -m linda",
> >     "msg": "[Errno 13] Permission denied",
> >     "rc": 13
> > }
> > ansible1 | FAILED! => {
> >     "changed": false,
> >     "cmd": "/sbin/useradd -m linda",
> >     "msg": "[Errno 13] Permission denied",
> >     "rc": 13
> >
> >
> > I'm trying to add an user on 4 machines.
> > -created project directory
> > -created ansible.cfg file with this content:
> > [defaults]
> > remote_user = ansible
> > host_key_checking = false
> > inventory = inventory
> >
> > [priviledge_escalation]
>
> Try priviledge_escalation -> privilege_escalation
>
> V/r,
> James Cassell
>
> > become = True
> > become_method = sudo
> > become_user = root
> > become_ask_pass = False
> > -created inventory file:
> > [all]
> > ansible1
> > ansible2
> > ansible3
> > ansible4
> >
> > -user ansible was created on all machines and has sudo access
> > -ssh-copy-id was used for all machines
> > -all machines are in /etc hosts with the name from inventory file
> >
> > From what I see, ansible is trying to add the user without becoming root
> > Adding user or becoming root works without any issue
> >
> > Thank you,
> > Mihai.
> >
>
> --
> 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-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/1547506254.3074073.1634602840.220124BD%40webmail.messagingengine.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAOK917TqHith9oxaZAacaD3TcW481xNMyqrnZ5F655UYR_QCqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to