Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ salt:

# salt minion config:
minion_config_use_TOFS: true
# schedule delayed minion restart on configuration changes
restart_via_systemd: false
minion:

# standalone setup
Expand Down
1 change: 1 addition & 0 deletions salt/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ salt:
use_pip: false
clean_config_d_dir: true
restart_via_at: false
restart_via_systemd: false
parallel: true # salt.git module argument

config_path: /etc/salt
Expand Down
8 changes: 6 additions & 2 deletions salt/minion.sls
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ salt-minion:
- file: remove-old-minion-conf-file
- order: last
{% endif %}
{%- if not salt_settings.restart_via_at %}
{%- if not salt_settings.restart_via_at and not salt_settings.restart_via_systemd %}
cmd.run:
{%- if grains['saltversioninfo'] >= [ 2016, 3 ] %}
{%- if grains['kernel'] == 'Windows' %}
Expand Down Expand Up @@ -142,7 +142,7 @@ salt-minion:
- file: remove-old-minion-conf-file
{%- else %}

{% if grains.os_family not in ['MacOS', 'FreeBSD'] %}
{%- if grains.os_family not in ['MacOS', 'FreeBSD'] and not salt_settings.restart_via_systemd %}
{# MacOS and FreeBSD have the 'at' command; but there's no package to install #}
at:
pkg.installed:
Expand All @@ -151,7 +151,11 @@ at:

restart-salt-minion:
cmd.run:
{%- if salt_settings.restart_via_systemd %}
- name: systemd-run --on-active=1m systemctl restart salt-minion
{%- else %}
- name: echo salt-call --local service.restart {{ salt_settings.minion_service }} | at now + 1 minute
{%- endif %}
- order: last
- onchanges:
{%- if salt_settings.install_packages %}
Expand Down
1 change: 1 addition & 0 deletions salt/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Suse:
install_from_package: git
master:
gitfs_provider: pygit2
restart_via_systemd: true

Gentoo:
salt_master: app-admin/salt
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/almalinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_dulwich: python-dulwich
python_git: GitPython
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/almalinux-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_dulwich: python-dulwich
python_git: GitPython
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/amazonlinux-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ values:
python_git: GitPython
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_dulwich: python-dulwich
python_git: GitPython
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_git: python2-gitpython
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/centos-7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ values:
python_git: GitPython
release: '3003'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/centos-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_dulwich: python-dulwich
python_git: GitPython
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/centos-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_dulwich: python-dulwich
python_git: GitPython
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/debian-10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ values:
python_git: python-git
release: '3003'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/debian-11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ values:
python_dulwich: python-dulwich
python_git: python-git
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/debian-12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ values:
python_dulwich: python-dulwich
python_git: python-git
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/debian-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ values:
python_git: python-git
release: '3003'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/fedora-33.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ values:
python_git: GitPython
release: '3003'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/fedora-34.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ values:
python_git: GitPython
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/fedora-35.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ values:
python_git: GitPython
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/fedora-36.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_dulwich: python-dulwich
python_git: GitPython
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/fedora-40.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_dulwich: python-dulwich
python_git: GitPython
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/fedora-41.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_dulwich: python-dulwich
python_git: GitPython
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/freebsd-12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ values:
python_git: py39-gitpython
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/freebsd-13.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ values:
python_git: py39-gitpython
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/gentoo-2-sysd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ values:
python_git: python-git
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/gentoo-2-sysv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ values:
python_git: python-git
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/mac_os_x-10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ values:
python_git: python-git
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/mac_os_x-11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ values:
python_git: python-git
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/mac_os_x-12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ values:
python_git: python-git
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/openbsd-6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ values:
python_git: py3-GitPython
release: '3002'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/openbsd-7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ values:
python_git: py3-GitPython
release: '3003'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/opensuse-15.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_dulwich: python-dulwich
python_git: python-git
restart_via_at: false
restart_via_systemd: true
retry_options:
attempts: 5
interval: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_dulwich: python-dulwich
python_git: python-git
restart_via_at: false
restart_via_systemd: true
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/oraclelinux-7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ values:
python_git: GitPython
release: '3003'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/oraclelinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_dulwich: python-dulwich
python_git: GitPython
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/oraclelinux-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_dulwich: python-dulwich
python_git: GitPython
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/rockylinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_dulwich: python-dulwich
python_git: GitPython
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/rockylinux-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ values:
python_dulwich: python-dulwich
python_git: GitPython
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/ubuntu-18.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ values:
python_git: python-git
release: '3003'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/ubuntu-20.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ values:
python_dulwich: python-dulwich
python_git: python-git
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/ubuntu-22.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ values:
python_dulwich: python-dulwich
python_git: python-git
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/ubuntu-24.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ values:
python_dulwich: python-dulwich
python_git: python-git
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/windows-10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ values:
python_git: python-git
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ values:
python_git: python-git
release: '3003'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ values:
python_git: python-git
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ values:
python_git: python-git
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/files/_mapdata/windows-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ values:
python_git: python-git
release: '3004'
restart_via_at: false
restart_via_systemd: false
retry_options:
attempts: 5
interval: 10
Expand Down
Loading