Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACTUALLY corrects the behavior in #297 #303

Merged
merged 7 commits into from
Mar 9, 2021
6 changes: 0 additions & 6 deletions ash-linux/el7/STIGbyID/cat2/RHEL-07-040660.sls
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,4 @@ file_{{ stig_id }}-{{ cfgFile }}:
- not_found_content: |-
# Inserted per STIG {{ stig_id }}
{{ parmName }} {{ parmValu }}

service_{{ stig_id }}-{{ cfgFile }}:
service.running:
- name: '{{ svcName }}'
- listen:
- file: file_{{ stig_id }}-{{ cfgFile }}
{%- endif %}
6 changes: 0 additions & 6 deletions ash-linux/el7/STIGbyID/cat2/RHEL-07-040670.sls
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,4 @@ file_{{ stig_id }}-{{ cfgFile }}:
- not_found_content: |-
# Inserted per STIG {{ stig_id }}
{{ parmName }} {{ parmValu }}

service_{{ stig_id }}-{{ cfgFile }}:
service.running:
- name: '{{ svcName }}'
- listen:
- file: file_{{ stig_id }}-{{ cfgFile }}
{%- endif %}
6 changes: 0 additions & 6 deletions ash-linux/el7/STIGbyID/cat2/RHEL-07-040680.sls
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,4 @@ file_{{ stig_id }}-{{ cfgFile }}:
- not_found_content: |-
# Inserted per STIG {{ stig_id }}
{{ parmName }} {{ parmValu }}

service_{{ stig_id }}-{{ cfgFile }}:
service.running:
- name: '{{ svcName }}'
- listen:
- file: file_{{ stig_id }}-{{ cfgFile }}
{%- endif %}
6 changes: 0 additions & 6 deletions ash-linux/el7/STIGbyID/cat2/RHEL-07-040690.sls
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,4 @@ file_{{ stig_id }}-{{ cfgFile }}:
- not_found_content: |-
# Inserted per STIG {{ stig_id }}
{{ parmName }} {{ parmValu }}

service_{{ stig_id }}-{{ cfgFile }}:
service.running:
- name: '{{ svcName }}'
- listen:
- file: file_{{ stig_id }}-{{ cfgFile }}
{%- endif %}
6 changes: 0 additions & 6 deletions ash-linux/el7/STIGbyID/cat2/RHEL-07-040700.sls
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,4 @@ file_{{ stig_id }}-{{ cfgFile }}:
- not_found_content: |-
# Inserted per STIG {{ stig_id }}
{{ parmName }} {{ parmValu }}

service_{{ stig_id }}-{{ cfgFile }}:
service.running:
- name: '{{ svcName }}'
- listen:
- file: file_{{ stig_id }}-{{ cfgFile }}
{%- endif %}
21 changes: 21 additions & 0 deletions ash-linux/el7/STIGbyID/cat2/files/restart_sshd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Restart sshd service if any of:
#
# Cause changes to the /etc/ssh/sshd_config file
#
#################################################################
# Standard outputter function
diag_out() {
echo "${1}"
}

diag_out "----------------------------------------"
diag_out "Service Restart: sshd"
diag_out " Restart the sshd service if any of:"
diag_out " * file_RHEL-07-040690"
diag_out " * file_RHEL-07-040680"
diag_out " * file_RHEL-07-040660"
diag_out " * file_RHEL-07-040700"
diag_out " * file_RHEL-07-040670"
diag_out " Change the /etc/ssh/sshd_config file"
diag_out "----------------------------------------"

24 changes: 24 additions & 0 deletions ash-linux/el7/STIGbyID/cat2/restart_sshd.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Restart sshd service if any of:
#
# Cause changes to the /etc/ssh/sshd_config file
#
#################################################################
{%- set stig_id = 'SSHD_restart' %}
ferricoxide marked this conversation as resolved.
Show resolved Hide resolved
{%- set helperLoc = 'ash-linux/el7/STIGbyID/cat2/files' %}
{%- set svcName = 'sshd' %}
{%- set skipIt = salt.pillar.get('ash-linux:lookup:skip-stigs', []) %}
ferricoxide marked this conversation as resolved.
Show resolved Hide resolved

script_{{ stig_id }}-describe:
cmd.script:
- source: salt://{{ helperLoc }}/{{ stig_id }}.sh
- cwd: /root

service_sshd_restart:
service.running:
- name: '{{ svcName }}'
- onchanges:
ferricoxide marked this conversation as resolved.
Show resolved Hide resolved
- file: file_RHEL-07-040690-/etc/ssh/sshd_config
- file: file_RHEL-07-040680-/etc/ssh/sshd_config
- file: file_RHEL-07-040660-/etc/ssh/sshd_config
- file: file_RHEL-07-040700-/etc/ssh/sshd_config
- file: file_RHEL-07-040670-/etc/ssh/sshd_config