On 01.06.2016 15:42, Alan Harkleroad wrote:
---
- hosts: test
  sudo: yes
  tasks:
  - name: Create a test user for trials
    user: name=testuser1
    group=some-group
    groups=wheel,cdrom,additional groups
    password=somehasedpassword
    shell=/bin/bash
    state=present
    append=yes


Now I know i can set the state to absent and that removes the user
entirely. But I dont want to do that, we dont need to remove his system
access, just the elevated privilege grouping. I have run a test case where I removed wheel in the playbook under groups but it still shows in a groups
query on the test user.

Any help is appreciated. I am sure it is something simple I over looked.

According to the documentation you need append=no for that feature.

--
Kai Stian Olstad

--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/996a2618494a415d061406b4882fe5c5%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to