Manage the repo files

This commit is contained in:
Mike Reeves
2021-03-31 16:47:04 -04:00
parent f8d7241354
commit 9b84a92ced

View File

@@ -2,6 +2,7 @@
{% if sls in allowed_states %} {% if sls in allowed_states %}
{% set role = grains.id.split('_') | last %} {% set role = grains.id.split('_') | last %}
{% set managerupdates = salt['pillar.get']('global:managerupdate', '0') %}
# Remove variables.txt from /tmp - This is temp # Remove variables.txt from /tmp - This is temp
rmvariablesfile: rmvariablesfile:
@@ -84,6 +85,10 @@ crdebug:
file.absent: file.absent:
- name: /etc/yum.repos.d/CentOS-Debuginfo.repo - name: /etc/yum.repos.d/CentOS-Debuginfo.repo
crdockerce:
file.absent:
- name: /etc/yum.repos.d/docker-ce.repo
crfasttrack: crfasttrack:
file.absent: file.absent:
- name: /etc/yum.repos.d/CentOS-fasttrack.repo - name: /etc/yum.repos.d/CentOS-fasttrack.repo
@@ -120,6 +125,17 @@ crwazrepo:
file.absent: file.absent:
- name: /etc/yum.repos.d/wazuh.repo - name: /etc/yum.repos.d/wazuh.repo
crsecurityonionrepo:
file.managed:
{% if role in ['eval', 'standalone', 'import', 'manager' 'managersearch'] or managerupdates == 0 %}
- name: /etc/yum.repos.d/securityonion.repo
- source: salt://common/yum_repos.d/securityonion.repo
{% else %}
- name: /etc/yum.repos.d/securityonioncache.repo
- source: salt://commmon/yum_repos/securityonioncache.repo
{% endif %}
- mode: 644
{% endif %} {% endif %}
# Install common packages # Install common packages