FAQ
My first suggestion would be to try a more recent version -- 2014.1.7 was
released recently, and salt moves pretty quickly. It may no longer be an
issue.

On Thu, Jul 31, 2014 at 3:20 PM, Stephen Wood wrote:

Anybody have any ideas why the test user is not being aded to the group?
Or while group membership is not being enforced? I have a feeling it's a
bug so I'm going to file a report. I was running this test in masterless.

Here's the missing original data regarding my versions:

Salt: 2014.1.0
Python: 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
Jinja2: 2.2.1
M2Crypto: 0.20.2
msgpack-python: 0.1.13
msgpack-pure: Not Installed
pycrypto: 2.0.1
PyYAML: 3.10
PyZMQ: 2.2.0.1
ZMQ: 3.2.4


On Wed, Jul 30, 2014 at 5:35 PM, Stephen Wood wrote:

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?


--
Stephen Wood
www.heystephenwood.com

--
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.
--
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 | 3 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