Skip to content

Instantly share code, notes, and snippets.

Created June 18, 2015 15:42
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 anonymous/d90b9ebdadfc14be85a3 to your computer and use it in GitHub Desktop.
Save anonymous/d90b9ebdadfc14be85a3 to your computer and use it in GitHub Desktop.
root@xxx:/srv/salt/stag-backup# salt '*' state.highstate
10-xxxxxxx:
----------
ID: sshd_config
Function: file.managed
Result: False
Comment: The following requisites were not found:
require:
pkg: openssh-server
Started:
Duration:
Changes:
----------
ID: ssh-service
Function: service.running
Result: False
Comment: One or more requisite failed: sshd_config.sshd_config
Started:
Duration:
Changes:
Summary
------------
Succeeded: 0
Failed: 2
------------
Total states run: 2
root@xxxx:/srv/salt/stag-backup# pwd
/srv/salt/stag-backup
root@xxxxx:/srv/salt/stag-backup# more sshd_config.sls
sshd_config:
file.managed:
- user: root
- group: root
- mode: 644
- source: salt://sshd_config/files/sshd_config
- require:
- pkg: openssh-server
ssh-service: # State ID.
service.running: # Make sure the ssh service is running and
- enable: True # that is configured to start at boot.
- watch: # Restart the service if there are
- file: sshd_config # changes in the ssh config file.
root@xxxxx:/srv/salt/stag-backup# more top.sls
stag-backup:
'10.xxxxxx.0/24':
- match: ipcidr
- sshd_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment