mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
added warning about installing and ensure can only install workstation on centos
This commit is contained in:
@@ -14,13 +14,14 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
{# we only want the script to install the workstation if it is CentOS #}
|
||||
|
||||
doc_workstation_url="https://docs.securityonion.net/en/2.3/analyst-vm.html"
|
||||
{# we only want the script to install the workstation if it is CentOS -#}
|
||||
{% if grains.os == 'CentOS' -%}
|
||||
{# if this is a manager -#}
|
||||
{% if grains.master == grains.id.split('_')|first -%}
|
||||
|
||||
source /usr/sbin/so-common
|
||||
doc_workstation_url="https://docs.securityonion.net/en/2.3/analyst-vm.html"
|
||||
pillar_file="/opt/so/saltstack/local/pillar/minions/{{grains.id}}.sls"
|
||||
|
||||
if [ -f "$pillar_file" ]; then
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
{# we only want this state to run it is CentOS #}
|
||||
{% if grains.os == 'CentOS' %}
|
||||
|
||||
xwindows_group:
|
||||
pkg.group_installed:
|
||||
- name: X Window System
|
||||
@@ -45,3 +48,11 @@ workstation_packages:
|
||||
- perl-Net-DNS
|
||||
- securityonion-chaosreader
|
||||
- securityonion-analyst-extras
|
||||
|
||||
{% else %}
|
||||
|
||||
workstation_packages_os_fail:
|
||||
test.fail_without_changes:
|
||||
- comment: 'SO Analyst Workstation can only be installed on CentOS'
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
{# we only want this state to run it is CentOS #}
|
||||
{% if grains.os == 'CentOS' %}
|
||||
|
||||
remove_graphical_target:
|
||||
file.symlink:
|
||||
- name: /etc/systemd/system/default.target
|
||||
- target: /lib/systemd/system/multi-user.target
|
||||
- force: True
|
||||
|
||||
{% else %}
|
||||
workstation_trusted-ca_os_fail:
|
||||
test.fail_without_changes:
|
||||
- comment: 'SO Analyst Workstation can only be installed on CentOS'
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
|
||||
{% set global_ca_text = [] %}
|
||||
{% set global_ca_server = [] %}
|
||||
{% set manager = salt['grains.get']('master') %}
|
||||
{% set x509dict = salt['mine.get'](manager | lower~'*', 'x509.get_pem_entries') %}
|
||||
{# we only want this state to run it is CentOS #}
|
||||
{% if grains.os == 'CentOS' %}
|
||||
|
||||
{% set global_ca_text = [] %}
|
||||
{% set global_ca_server = [] %}
|
||||
{% set manager = salt['grains.get']('master') %}
|
||||
{% set x509dict = salt['mine.get'](manager | lower~'*', 'x509.get_pem_entries') %}
|
||||
{% for host in x509dict %}
|
||||
{% if host.split('_')|last in ['manager', 'managersearch', 'standalone', 'import'] %}
|
||||
{% do global_ca_text.append(x509dict[host].get('/etc/pki/ca.crt')|replace('\n', '')) %}
|
||||
{% do global_ca_server.append(host) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% set trusttheca_text = global_ca_text[0] %}
|
||||
{% set ca_server = global_ca_server[0] %}
|
||||
{% set trusttheca_text = global_ca_text[0] %}
|
||||
{% set ca_server = global_ca_server[0] %}
|
||||
|
||||
trusted_ca:
|
||||
x509.pem_managed:
|
||||
@@ -22,3 +25,11 @@ update_ca_certs:
|
||||
- name: update-ca-trust
|
||||
- onchanges:
|
||||
- x509: trusted_ca
|
||||
|
||||
{% else %}
|
||||
|
||||
workstation_trusted-ca_os_fail:
|
||||
test.fail_without_changes:
|
||||
- comment: 'SO Analyst Workstation can only be installed on CentOS'
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
|
||||
{# we only want this state to run it is CentOS #}
|
||||
{% if grains.os == 'CentOS' %}
|
||||
|
||||
include:
|
||||
- workstation.packages
|
||||
|
||||
@@ -9,3 +13,11 @@ graphical_target:
|
||||
- require:
|
||||
- pkg: X Window System
|
||||
- pkg: graphical_extras
|
||||
|
||||
{% else %}
|
||||
|
||||
workstation_xwindows_os_fail:
|
||||
test.fail_without_changes:
|
||||
- comment: 'SO Analyst Workstation can only be installed on CentOS'
|
||||
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user