Advertisement
Guest User

Untitled

a guest
Jan 11th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. {% if s3_grains_url %}
  2. # Sync the grains from S3 if the pillar value exists.
  3. s3_grains_file:
  4. file:
  5. - managed
  6. - name: '/etc/salt/grains'
  7. - source: '{{ s3_grains_url }}'
  8. - source_hash: '{{ s3_grains_sha1 }}'
  9. - user: 'root'
  10. - group: 'root'
  11. - mode: 0400
  12.  
  13. # Inspect the process tree to kill the current salt-call invocation and start a fresh highstate run.
  14. restart_salt_run:
  15. cmd.run:
  16. - user: 'root'
  17. - cwd: '/root'
  18. - shell: '/bin/bash'
  19. - name: |
  20. pkill --signal SIGTERM "[s]alt-call" && \
  21. salt-call state.highstate > /tmp/grains_reload
  22. - onchanges:
  23. - file: '/etc/salt/grains'
  24. {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement