FAQ
I'm having exactly the same problem; also tried with addusers instead of
members, no difference. This is on Ubuntu 14.04.1 64bit server, my versions:
            Salt: 2014.1.7
          Python: 2.7.6 (default, Mar 22 2014, 22:59:56)
          Jinja2: 2.7.2
        M2Crypto: 0.21.1
  msgpack-python: 0.3.0
    msgpack-pure: Not Installed
        pycrypto: 2.6.1
          PyYAML: 3.10
           PyZMQ: 14.0.1
             ZMQ: 4.0.4

So 2014.1.7 does not seem to fix this, at least for me. Anyone else?


Am Donnerstag, 31. Juli 2014 02:36:20 UTC+2 schrieb Stephen Wood:
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
group.

Here is an example statefile:

test_user:
user.present

test_user_group:
group.present:
- members:
- test_user

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

local:
----------
ID: test_user
Function: user.present
Result: True
Comment: New user test_user created
Changes:
----------
fullname:

gid:
501
groups:
- test_user
home:
/home/test_user
homephone:

name:
test_user
passwd:
x
roomnumber:

shell:
/bin/bash
uid:
501
workphone:

----------
ID: test_user_group
Function: group.present
Result: True
Comment: Added group test_user_group
Changes:
----------
gid:
502
members:
name:
test_user_group
passwd:
x

Summary
------------
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
test_user:x:501:
test_user_group:x:502:

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

Previous

Follow ups

Related Discussions

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

People

Translate

site design / logo © 2022 Grokbase