user.present will not create windows account (version 17.1.1)
C:\salt>salt --versions-report
Salt: 0.17.1
Python: 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)]
Jinja2: 2.7.1
M2Crypto: 0.21.1
msgpack-python: 0.3.0
msgpack-pure: Not Installed
pycrypto: 2.6
PyYAML: 3.10
PyZMQ: 13.1.0
ZMQ: 3.2.2
C:\salt>salt-call state.sls usermgmt
[INFO ] Loading fresh modules for state activity
[INFO ] Executing state user.present for Jenkins
[INFO ] Executing command 'net localgroup JenkinsGroup' in directory 'C:\\Users\\<snipped>'
[ERROR ] An exception occurred in this state: Traceback (most recent call last):
File "salt/state.py", line 1260, in call
File "salt/states/user.py", line 277, in present
File "salt/states/user.py", line 67, in _changes
KeyError: 'user.info'
[INFO ] Executing command 'attrib -R "c:\\salt\\var\\cache\\salt\\minion\\sls
.p"' in directory 'C:\\Users\\<snipped>'
←[0;31mlocal:←[0m
←[0;31m----------
State: - user←[0m
←[0;31mName: Jenkins←[0m
←[0;31mFunction: present←[0m
←[0;31mResult: False←[0m
←[0;31mComment: An exception occurred in this state: Traceback (most recent call last):
File "salt/state.py", line 1260, in call
File "salt/states/user.py", line 277, in present
File "salt/states/user.py", line 67, in _changes
KeyError: 'user.info'
←[0m
←[0;31m Changes:
←[0;36m----------←[0;36m←[0m
←[0;36m
Summary
------------←[0m
←[0;32mSucceeded: 0←[0m
←[0;31mFailed: 1←[0m
←[0;36m------------
Total: 1←[0m
Here is the usermgmt.sls
Jenkins:
user.present:
- fullname: 'Continuous Integration Account'
- groups:
- JenkinsGroup
(Edited with triple backticks for readability)
Thanks for the report! We'll definitely look into this.
Was this fix included in 17.2? I've upgraded to 17.2 but am still receiving this error.
I just checked and unfortunately the fix was overlooked for 0.17.2.
I've verified that @basepi will cherry pick it for 0.17.3.
https://github.com/saltstack/salt/pull/8500
I'm using 0.17.4 Unfortunately, still appeared like below.
Function: present
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "salt/state.py", line 1307, in call File "salt/states/user.py", line 280, in present File "salt/states/user.py", line 70, in _changes KeyError: 'user.info'
Changes:
@zeroidle Looks like the cherry-pick failed when I attempted it, not sure what happened there. (it's been awhile)
Any chance you can test on the 2014.1 RC or the develop branch?
Any word on when a fix to this problem will be included in a release? Thanks.
This fix should be in the 2014.1.0 release (coming any day now). It's also already in the 2014.1.0rc3 release that's on PyPI.