mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
replace centos
This commit is contained in:
@@ -10,7 +10,7 @@ def check():
|
||||
if path.exists('/var/run/reboot-required'):
|
||||
retval = 'True'
|
||||
|
||||
elif os == 'CentOS':
|
||||
elif os == 'Rocky':
|
||||
cmd = 'needs-restarting -r > /dev/null 2>&1'
|
||||
|
||||
try:
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
{% do allowed_states.append('redis') %}
|
||||
{% endif %}
|
||||
|
||||
{% if grains.os == 'CentOS' %}
|
||||
{% if grains.os == 'Rocky' %}
|
||||
{% if not ISAIRGAP %}
|
||||
{% do allowed_states.append('yum') %}
|
||||
{% endif %}
|
||||
|
||||
@@ -235,7 +235,7 @@ soversionfile:
|
||||
{% endif %}
|
||||
|
||||
{% if GLOBALS.so_model %}
|
||||
{% if GLOBALS.os == 'CentOS' %}
|
||||
{% if GLOBALS.os == 'Rocky' %}
|
||||
# Install Raid tools
|
||||
raidpkgs:
|
||||
pkg.installed:
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
# Elastic License 2.0.
|
||||
|
||||
|
||||
{# we only want the script to install the workstation if it is CentOS -#}
|
||||
{% if grains.os == 'CentOS' -%}
|
||||
{# we only want the script to install the workstation if it is Rocky -#}
|
||||
{% if grains.os == 'Rocky' -%}
|
||||
{# if this is a manager -#}
|
||||
{% if grains.master == grains.id.split('_')|first -%}
|
||||
|
||||
@@ -80,12 +80,12 @@ echo "Since this is not a manager, the pillar values to enable analyst workstati
|
||||
{#- endif if this is a manager #}
|
||||
{% endif -%}
|
||||
|
||||
{#- if not CentOS #}
|
||||
{#- if not Rocky #}
|
||||
{%- else %}
|
||||
|
||||
echo "The Analyst Workstation can only be installed on CentOS. Please view the documentation at $doc_workstation_url."
|
||||
echo "The Analyst Workstation can only be installed on Rocky. Please view the documentation at $doc_workstation_url."
|
||||
|
||||
{#- endif grains.os == CentOS #}
|
||||
{#- endif grains.os == Rocky #}
|
||||
{% endif -%}
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -14,7 +14,7 @@ mysqlpkgs:
|
||||
pkg.installed:
|
||||
- skip_suggestions: False
|
||||
- pkgs:
|
||||
{% if grains['os'] != 'CentOS' %}
|
||||
{% if grains['os'] != 'Rocky' %}
|
||||
{% if grains['oscodename'] == 'bionic' %}
|
||||
- python3-mysqldb
|
||||
{% elif grains['oscodename'] == 'focal' %}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||
{% if GLOBALS.os == 'CentOS' %}
|
||||
{% if GLOBALS.os == 'Rocky' %}
|
||||
|
||||
{% set REPOPATH = '/etc/yum.repos.d/' %}
|
||||
{% set ABSENTFILES = [
|
||||
'CentOS-Base.repo',
|
||||
'CentOS-CR.repo',
|
||||
'CentOS-Debuginfo.repo',
|
||||
'CentOS-fasttrack.repo',
|
||||
'CentOS-Media.repo',
|
||||
'CentOS-Sources.repo',
|
||||
'CentOS-Vault.repo',
|
||||
'CentOS-x86_64-kernel.repo',
|
||||
'Rocky-Base.repo',
|
||||
'Rocky-CR.repo',
|
||||
'Rocky-Debuginfo.repo',
|
||||
'Rocky-fasttrack.repo',
|
||||
'Rocky-Media.repo',
|
||||
'Rocky-Sources.repo',
|
||||
'Rocky-Vault.repo',
|
||||
'Rocky-x86_64-kernel.repo',
|
||||
'docker-ce.repo',
|
||||
'epel.repo',
|
||||
'epel-testing.repo',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||
|
||||
{% if GLOBALS.os != 'CentOS' %}
|
||||
{% if GLOBALS.os != 'Rocky' %}
|
||||
saltpymodules:
|
||||
pkg.installed:
|
||||
- pkgs:
|
||||
@@ -18,9 +18,3 @@ salt_bootstrap:
|
||||
- name: /usr/sbin/bootstrap-salt.sh
|
||||
- source: salt://salt/scripts/bootstrap-salt.sh
|
||||
- mode: 755
|
||||
|
||||
{% if GLOBALS.os == 'CentOS' %}
|
||||
remove_salt-2019-2-5.repo:
|
||||
file.absent:
|
||||
- name: /etc/yum.repos.d/salt-2019-2-5.repo
|
||||
{% endif %}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
{% set INSTALLEDSALTVERSION = salt['pkg.version']('salt-minion').split(SPLITCHAR)[0] %}
|
||||
|
||||
{% if grains.saltversion|string != SALTVERSION|string %}
|
||||
{% if grains.os|lower in ['centos', 'redhat'] %}
|
||||
{% if grains.os|lower in ['Rocky', 'redhat'] %}
|
||||
{% set UPGRADECOMMAND = 'yum clean all ; /usr/sbin/bootstrap-salt.sh -s 120 -r -F -x python3 stable ' ~ SALTVERSION %}
|
||||
{% elif grains.os|lower == 'ubuntu' %}
|
||||
{% set UPGRADECOMMAND = '/usr/sbin/bootstrap-salt.sh -s 120 -r -F -x python3 stable ' ~ SALTVERSION %}
|
||||
|
||||
@@ -41,7 +41,7 @@ trusttheca:
|
||||
- name: /etc/ssl/certs/intca.crt
|
||||
- text: {{ trusttheca_text }}
|
||||
|
||||
{% if grains['os'] != 'CentOS' %}
|
||||
{% if grains['os'] != 'Rocky' %}
|
||||
# Install packages needed for the sensor
|
||||
m2cryptopkgs:
|
||||
pkg.installed:
|
||||
|
||||
@@ -29,7 +29,7 @@ base:
|
||||
- salt.minion-state-apply-test
|
||||
- salt.minion
|
||||
|
||||
'G@os:CentOS and G@saltversion:{{saltversion}}':
|
||||
'G@os:Rocky and G@saltversion:{{saltversion}}':
|
||||
- match: compound
|
||||
- yum.packages
|
||||
|
||||
@@ -377,10 +377,10 @@ base:
|
||||
{%- endif %}
|
||||
- idh
|
||||
|
||||
'J@workstation:gui:enabled:^[Tt][Rr][Uu][Ee]$ and ( G@saltversion:{{saltversion}} and G@os:CentOS )':
|
||||
'J@workstation:gui:enabled:^[Tt][Rr][Uu][Ee]$ and ( G@saltversion:{{saltversion}} and G@os:Rocky )':
|
||||
- match: compound
|
||||
- workstation
|
||||
|
||||
'J@workstation:gui:enabled:^[Ff][Aa][Ll][Ss][Ee]$ and ( G@saltversion:{{saltversion}} and G@os:CentOS )':
|
||||
'J@workstation:gui:enabled:^[Ff][Aa][Ll][Ss][Ee]$ and ( G@saltversion:{{saltversion}} and G@os:Rocky )':
|
||||
- match: compound
|
||||
- workstation.remove_gui
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||
|
||||
{# we only want this state to run it is CentOS #}
|
||||
{% if GLOBALS.os == 'CentOS' %}
|
||||
{% if GLOBALS.os == 'Rocky' %}
|
||||
|
||||
xwindows_group:
|
||||
pkg.group_installed:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||
|
||||
{# we only want this state to run it is CentOS #}
|
||||
{% if GLOBALS.os == 'CentOS' %}
|
||||
{% if GLOBALS.os == 'Rocky' %}
|
||||
|
||||
remove_graphical_target:
|
||||
file.symlink:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||
|
||||
{# we only want this state to run it is CentOS #}
|
||||
{% if GLOBALS.os == 'CentOS' %}
|
||||
{% if GLOBALS.os == 'Rocky' %}
|
||||
|
||||
{% set global_ca_text = [] %}
|
||||
{% set global_ca_server = [] %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||
|
||||
{# we only want this state to run it is CentOS #}
|
||||
{% if GLOBALS.os == 'CentOS' %}
|
||||
{% if GLOBALS.os == 'Rocky' %}
|
||||
|
||||
include:
|
||||
- workstation.packages
|
||||
|
||||
@@ -2150,7 +2150,7 @@ set_proxy() {
|
||||
"}" > /root/.docker/config.json
|
||||
|
||||
# Set proxy for package manager
|
||||
if [[ $is_centos ]]; then
|
||||
if [[ $is_rocky ]]; then
|
||||
echo "proxy=$so_proxy" >> /etc/yum.conf
|
||||
else
|
||||
# Set it up so the updates roll through the manager
|
||||
|
||||
Reference in New Issue
Block a user