From b6ab1b1d543908ea050cdb928a255dd4e2a3384d Mon Sep 17 00:00:00 2001 From: sticky-note Date: Tue, 30 Jun 2020 11:48:51 +1100 Subject: [PATCH] fix(freebsd): command `at` is already present in base system --- salt/minion.sls | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/salt/minion.sls b/salt/minion.sls index 2cf44c7a5..18c45d3fe 100644 --- a/salt/minion.sls +++ b/salt/minion.sls @@ -122,18 +122,17 @@ salt-minion: - file: remove-old-minion-conf-file {%- else %} - {% if grains.os != 'MacOS' %} - {# MacOS has 'at' command; but there's no package to install #} + {% if grains.os_family not in ['MacOS', 'FreeBSD'] %} + {# MacOS and FreeBSD have the 'at' command; but there's no package to install #} at: - pkg.installed: [] + pkg.installed: + - require_in: restart-salt-minion {% endif %} restart-salt-minion: cmd.run: - name: echo salt-call --local service.restart {{ salt_settings.minion_service }} | at now + 1 minute - order: last - - require: - - pkg: at - onchanges: {%- if salt_settings.install_packages %} {%- if grains.os == 'MacOS' and salt_settings.salt_minion_pkg_source %}