On 8/13/20 2:30 PM, Edison Wang wrote:
> Hi There,
> 
> I am pretty new in this domain and got a question to ask. My goal is to 
> create a new user "edison" on a Ubuntu server.
> Now I've already had a user "manager" which is able to ssh to this Ubuntu 
> server. This problem I got is after I run user
> creation role with user "manager" as ansbile_user, the new user "edison" 
> always failed to be created. Role is very
> simple, my question is if this issue would be caused by ansible_user 
> "manager" that doesn't have some privilege?  

That is the most likely cause of the error which you failed to post here.

Add "become: yes" to your playbook (or to this task).

Regards
      Racke

> 
> role:
> 
> ---
>       
>       - name: manage-user - Manage user account
>       user:
>       name: "{{ user.username }}"
>       comment: "{{ user.name }}"
>       shell: "/bin/bash"
>       groups:
>       - sudo
> 
> -- 
> 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 
> <mailto:ansible-project+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/9fa919b4-74d8-4a44-8d58-6361da986e94o%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/9fa919b4-74d8-4a44-8d58-6361da986e94o%40googlegroups.com?utm_medium=email&utm_source=footer>.


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a7462d37-a2b7-4fe9-d286-5c4bc89280ef%40linuxia.de.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to