瀏覽代碼

Run saltutil.sync_all when minion is started

Unfortunately this is not idempotent, however we surely want to sync
everything when salt.minion state is executed.

Change-Id: I0faaf606b57dbd7d009156abfe50d2e5f350190e
pull/36/head
Filip Pytloun 7 年之前
父節點
當前提交
a7d2ecde9b
共有 1 個檔案被更改,包括 11 行新增3 行删除
  1. +11
    -3
      salt/minion/service.sls

+ 11
- 3
salt/minion/service.sls 查看文件

@@ -33,9 +33,17 @@ salt_minion_packages:

{%- if not grains.get('noservices', False) %}
salt_minion_service:
service.running:
- name: {{ minion.service }}
- enable: true
service.running:
- name: {{ minion.service }}
- enable: true
{%- endif %}

salt_minion_sync_all:
module.run:
- name: 'saltutil.sync_all'
{%- if not grains.get('noservices', False) %}
- watch:
- service: salt_minion_service
{%- endif %}

{%- endif %}

Loading…
取消
儲存