Skip to content

Instantly share code, notes, and snippets.

@openfly
Created September 17, 2015 19:39
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save openfly/905963795159e7f791ca to your computer and use it in GitHub Desktop.
weird saltstack behavior....
# cat actions/restart.sls
include:
- jenkins.actions.stop
- jenkins.actions.start
# cat actions/start.sls
# Starts the tomcat service
tomcat_start:
service.running:
- name: tomcat
- enable: True
- full_restart: True
# Not functional atm see --> https://github.com/saltstack/salt/issues/20631
# - init_delay: 120
# initiate a 120 second delay after any service start to let tomcat come up.
tomcat_wait:
module.run:
- name: test.sleep
- length: 60
# cat actions/stop.sls
# Stops the tomcat service
tomcat_stop:
service.dead:
- name: tomcat
# salt '*jenkins-box*' state.highstate
test-node:
Data failed to compile:
----------
ID stop in SLS jenkins.actions.restart is not a dictionary
# salt '*jenkins-mj*' state.sls jenkins.actions.restart saltenv=dev
test-node:
----------
ID: tomcat_stop
Function: service.dead
Name: tomcat
Result: True
Comment: Service tomcat was killed
Started: 19:35:40.755414
Duration: 861.445 ms
Changes:
----------
tomcat:
True
----------
ID: tomcat_start
Function: service.running
Name: tomcat
Result: True
Comment: Service tomcat is already enabled, and is running
Started: 19:35:41.617015
Duration: 243.916 ms
Changes:
----------
tomcat:
True
----------
ID: tomcat_wait
Function: module.run
Name: test.sleep
Result: True
Comment: Module function test.sleep executed
Started: 19:35:41.861405
Duration: 60101.481 ms
Changes:
----------
ret:
True
Summary
------------
Succeeded: 3 (changed=3)
Failed: 0
------------
Total states run: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment