Created
April 19, 2017 13:09
-
-
Save anonymous/2ec96ed775bc69cddd17390a9f183179 to your computer and use it in GitHub Desktop.
trying to add users in salt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testuser: | |
user.present: | |
- fullname: testuser | |
- shell: /bin/bash | |
- home: /home/testuser | |
- gid: 700 | |
- uid: 700 | |
- gid_from_name: True | |
salt '*' state.apply user | |
results | |
[root@salt salt]# salt 'minion1.vosko.lab' state.apply users | |
minion1: | |
---------- | |
ID: testuser | |
Function: user.present | |
Result: True | |
Comment: New user testuser created | |
Started: 15:08:40.203591 | |
Duration: 127.819 ms | |
Changes: | |
---------- | |
fullname: | |
testuser | |
gid: | |
1006 | |
groups: | |
- testuser | |
home: | |
/home/testuser | |
homephone: | |
name: | |
testuser | |
passwd: | |
x | |
roomnumber: | |
shell: | |
/bin/bash | |
uid: | |
700 | |
workphone: | |
Summary for minion1 | |
------------ | |
Succeeded: 1 (changed=1) | |
Failed: 0 | |
------------ | |
Total states run: 1 | |
Total run time: 127.819 ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try something like this