so-desktop-install

This commit is contained in:
Mike Reeves
2023-06-26 15:27:18 -04:00
parent 12d10d7d42
commit d26484fe1a

View File

@@ -12,7 +12,7 @@
{% if grains.master == grains.id.split('_')|first -%} {% if grains.master == grains.id.split('_')|first -%}
source /usr/sbin/so-common source /usr/sbin/so-common
doc_workstation_url="$DOC_BASE_URL/analyst-vm.html" doc_desktop_url="$DOC_BASE_URL/desktop.html"
pillar_file="/opt/so/saltstack/local/pillar/minions/{{grains.id}}.sls" pillar_file="/opt/so/saltstack/local/pillar/minions/{{grains.id}}.sls"
if [ -f "$pillar_file" ]; then if [ -f "$pillar_file" ]; then
@@ -48,7 +48,7 @@ if [ -f "$pillar_file" ]; then
# Add workstation pillar to the minion's pillar file # Add workstation pillar to the minion's pillar file
printf '%s\n'\ printf '%s\n'\
"workstation:"\ "desktop:"\
" gui:"\ " gui:"\
" enabled: true"\ " enabled: true"\
"" >> "$pillar_file" "" >> "$pillar_file"
@@ -64,8 +64,8 @@ if [ -f "$pillar_file" ]; then
echo "There was an issue applying the workstation state. Please review the log above or at /opt/so/log/salt/minion." echo "There was an issue applying the workstation state. Please review the log above or at /opt/so/log/salt/minion."
fi fi
else # workstation is already added else # workstation is already added
echo "The workstation pillar already exists in $pillar_file." echo "The desktop pillar already exists in $pillar_file."
echo "To enable/disable the gui, set 'workstation:gui:enabled' to true or false in $pillar_file." echo "To enable/disable the gui, set 'desktop:gui:enabled' to true or false in $pillar_file."
echo "Additional documentation can be found at $doc_workstation_url." echo "Additional documentation can be found at $doc_workstation_url."
fi fi
else # if the pillar file doesn't exist else # if the pillar file doesn't exist
@@ -83,7 +83,7 @@ echo "Since this is not a manager, the pillar values to enable analyst workstati
{#- if not Rocky #} {#- if not Rocky #}
{%- else %} {%- else %}
echo "The Analyst Workstation can only be installed on Rocky. Please view the documentation at $doc_workstation_url." echo "The Security Onion Desktop can only be installed on Rocky Linux. Please view the documentation at $doc_workstation_url."
{#- endif grains.os == Rocky #} {#- endif grains.os == Rocky #}
{% endif -%} {% endif -%}