Skip to content

Instantly share code, notes, and snippets.

Created August 16, 2017 19:17
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/bec51fd363fcfdcc2969736f86559d92 to your computer and use it in GitHub Desktop.
Save anonymous/bec51fd363fcfdcc2969736f86559d92 to your computer and use it in GitHub Desktop.
{# This is the selfprovision variant of firstboot that is initiated through the reactor system.
# It should _NOT_ be run from a master #}
{% extends "firstboot.sls" %}
{% block firstboot_selfprovision_end %}
{% if centos_version == 'CentOS Linux-7' %}
Firstboot advance provisioning progress:
grains.present:
- name: deploystep
- value: 3
- require:
- <big list of states>
Firstboot restart salt-minion service:
cmd.run:
# The firewall changes shut off new packets from the minion to the master, so restart the salt-minion service
# This funky thing is to use systemd to schedule this task to run 5 seconds after we submit it
- name: systemd-run --on-active=5 --timer-property=AccuracySec=100ms systemctl restart salt-minion
- require:
- grains: Firstboot advance provisioning progress
{% endif %}
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment