I am running a very simple statefile that doesn't appear to be working.

The state creates a user, then a group, then adders (some) users to a

Here is an example statefile:


     - members:
       - test_user

The state runs successfully but the "members" field is empty:

           ID: test_user
     Function: user.present
       Result: True
      Comment: New user test_user created

                   - test_user



           ID: test_user_group
     Function: group.present
       Result: True
      Comment: Added group test_user_group

Succeeded: 2
Failed: 0
Total: 2

when I check membership, my test user is not added (or removed if I remove
it from the list under "members").

$ cat /etc/group | grep test

I can successfully add the user to the group if I specify it as a parameter
for user.present, but I'd rather not:

    - I want group membership to be done via the group.present function,
    since it's pulling from a pillar value
    - I want to avoid conflict where the user.present adds a user to a group
    but then group membership deletes it within the same state run.

Any ideas what I'm doing wrong here or how I can work around this?

You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 5 | next ›
Discussion Overview
groupsalt-users @
postedJul 31, '14 at 12:36a
activeSep 12, '14 at 5:38p



site design / logo © 2022 Grokbase