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