diff --git a/salt/common/soup_scripts.sls b/salt/common/soup_scripts.sls index 508b95b67..da9fd1a90 100644 --- a/salt/common/soup_scripts.sls +++ b/salt/common/soup_scripts.sls @@ -11,6 +11,7 @@ {% else %} {% set UPDATE_DIR='/tmp/sogh/securityonion' %} {% endif %} +{% set SOVERSION = salt['file.read']('/etc/version').strip() %} remove_common_soup: file.absent: @@ -107,6 +108,17 @@ copy_so-repo-sync_sbin: - force: True - preserve: True +{# this is added in 2.4.120 to remove salt repo files pointing to saltproject.io to accomodate the move to broadcom and new bootstrap-salt script #} +{% if salt['pkg.version_cmp'](SOVERSION, '2.4.120') == -1 %} +{% set saltrepofile = '/etc/yum.repos.d/salt.repo' %} +{% if grains.os_family == 'Debian' %} +{% set saltrepofile = '/etc/apt/sources.list.d/salt.list' %} +{% endif %} +remove_saltproject_io_repo: + file.absent: + - name: {{ saltrepofile }} +{% endif %} + {% else %} fix_23_soup_sbin: cmd.run: