- 论坛徽章:
- 5
|
我的saltstack是2015.8.8的版本 ,
master server IP : 192.168.18.21
minion server IP : 192.168.18.23
依据 雨落寒冰的博客-----自动化管理工具Saltstack之用户管理篇(6) 的方法,我在master上利用/srv/salt/user/useradd.sls来创建用户,useradd.sls的内容为:
------------------------------------------------------------------------------------------------------------------------------
leo1:
user.present:
- fullname: leo1
- shell: /bin/bash
- password: '$6$jyPMUdY8$aQHHwpBSNrTyU07sjhPTX5ccXlbM.jhilqipvmL0.PXFl0mr/9sEn18.ImmdEyBRPQLfFYcoztPUnuyyB/y300'
- home: /home/leo1
- uid: 653
- gid: 653
- groups:
- leo1
- root
- require:
- group: leo1
group.present:
- gid: 653
--------------------------------------------------------------------------------------------------------------------------------
我在master上执行命令:
[root@master ~]# salt '192.168.18.23' state.highstate
192.168.18.23:
----------
ID: leo1
Function: group.present
Result: True
Comment: Group leo1 is present and up to date
Started: 00:40:37.068791
Duration: 0.786 ms
Changes:
----------
ID: leo1
Function: user.present
Result: True
Comment: User leo1 is present and up to date
Started: 00:40:37.069660
Duration: 13.291 ms
Changes:
Summary for 192.168.18.23
------------
Succeeded: 2
Failed: 0
------------
Total states run: 2
我们来查看minion server上的leo1用户的信息:
[root@client ~]# cat /etc/passwd|grep leo1
leo1 :653:653:leo1,,,:/home/leo1:/bin/bash
现在我的问题是为什么会在第五列多出三个逗号?
|
|