only add sosyncuser cron if startup_states: highstate is set in minion config

This commit is contained in:
m0duspwnens
2021-06-22 08:23:16 -04:00
parent e4e3b199fc
commit bc86590411

View File

@@ -62,10 +62,13 @@ soccustom:
- mode: 600 - mode: 600
- template: jinja - template: jinja
# we dont want this added to early in setup, so we add the onlyif to verify 'startup_states: highstate'
# is in the minion config. that is added before the final highstate during setup
sosyncusers: sosyncusers:
cron.present: cron.present:
- user: root - user: root
- name: 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin /usr/sbin/so-user sync &>> /opt/so/log/soc/sync.log' - name: 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin /usr/sbin/so-user sync &>> /opt/so/log/soc/sync.log'
- onlyif: "grep 'startup_states: highstate' /etc/salt/minion"
so-soc: so-soc:
docker_container.running: docker_container.running: