SaltStack之mongoDB配置管理
环境:
OS: CentOS6.5 x64
Master:
salt-master.example.com
Minion:
salt-minion1.example.com
salt-minion2.example.com
参考文档:
mkdir -p /srv/salt/opt/mongodb/conf
cp mongod.conf /srv/salt/opt/mongodb/conf
cat
>/srv/salt/mongod_conf.sls <<HERE
mongod_init:
mongod_conf:
mongod:
HERE
salt 'slave*' cmd.run 'useradd -s /sbin/nologin -r
mongod'
salt 'slave*' state.sls mongo_conf