Skip to content

Instantly share code, notes, and snippets.

@cmhe
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmhe/0fcfc778bfe6eab8a709 to your computer and use it in GitHub Desktop.
Save cmhe/0fcfc778bfe6eab8a709 to your computer and use it in GitHub Desktop.
# grep -Ev "^(#.*|\w*)$" /etc/salt/master
fileserver_backend:
- roots
- git
# cat /etc/salt/master.d/*.conf
gitfs_env_whitelist:
- master
gitfs_remotes:
- git@gitlab.xxxx:srvadmin/salt-top.git
- git@gitlab.xxxx:srvadmin/salt-core.git
- git@gitlab.xxxx:srvadmin/salt-users-formula.git
- git@gitlab.xxxx:srvadmin/salt-fail2ban-formula.git
ext_pillar:
- git: master git@gitlab.xxxx:srvadmin/pillar-top.git
# git clone git@gitlab.xxxx:srvadmin/salt-top.git
Cloning into 'salt-top'...
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 4 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (4/4), done.
Checking connectivity... done.
# cat salt-top/top.sls
base:
'*':
- core
# systemctl restart salt-master
# systemctl restart salt-minion
# systemctl status salt-master
● salt-master.service - The Salt Master Server
Loaded: loaded (/lib/systemd/system/salt-master.service; enabled)
Active: active (running) since Mon 2015-06-08 15:19:53 CEST; 27s ago
Main PID: 11442 (salt-master)
CGroup: /system.slice/salt-master.service
├─11442 /usr/bin/python /usr/bin/salt-master
├─11448 /usr/bin/python /usr/bin/salt-master
├─11449 /usr/bin/python /usr/bin/salt-master
├─11450 /usr/bin/python /usr/bin/salt-master
├─11453 /usr/bin/python /usr/bin/salt-master
├─11456 /usr/bin/python /usr/bin/salt-master
├─11457 /usr/bin/python /usr/bin/salt-master
├─11460 /usr/bin/python /usr/bin/salt-master
├─11463 /usr/bin/python /usr/bin/salt-master
├─11466 /usr/bin/python /usr/bin/salt-master
└─11469 /usr/bin/python /usr/bin/salt-master
Jun 08 15:19:53 host systemd[1]: Started The Salt Master Server.
# systemctl status salt-minion
● salt-minion.service - The Salt Minion
Loaded: loaded (/lib/systemd/system/salt-minion.service; enabled)
Active: active (running) since Mon 2015-06-08 15:19:57 CEST; 51s ago
Main PID: 12031 (salt-minion)
CGroup: /system.slice/salt-minion.service
├─12031 /usr/bin/python /usr/bin/salt-minion
└─12034 /usr/bin/python /usr/bin/salt-minion
Jun 08 15:19:57 host systemd[1]: Started The Salt Minion.
# salt '*' config.get fileserver_backend
host:
- roots
Why does it not apply the configuration?
# salt '*' state.highstate
host:
----------
ID: states
Function: no.None
Result: False
Comment: No Top file or external nodes data matches found
Started:
Duration:
Changes:
Summary
------------
Succeeded: 0
Failed: 1
------------
Total states run: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment