Unfortunately this is not idempotent, however we surely want to sync everything when salt.minion state is executed. Change-Id: I0faaf606b57dbd7d009156abfe50d2e5f350190epull/36/head
{%- if not grains.get('noservices', False) %} | {%- if not grains.get('noservices', False) %} | ||||
salt_minion_service: | salt_minion_service: | ||||
service.running: | |||||
- name: {{ minion.service }} | |||||
- enable: true | |||||
service.running: | |||||
- name: {{ minion.service }} | |||||
- enable: true | |||||
{%- endif %} | {%- endif %} | ||||
salt_minion_sync_all: | |||||
module.run: | |||||
- name: 'saltutil.sync_all' | |||||
{%- if not grains.get('noservices', False) %} | |||||
- watch: | |||||
- service: salt_minion_service | |||||
{%- endif %} | |||||
{%- endif %} | {%- endif %} |