Skip to content

Commit

Permalink
Fix the rerunning of sshd_config states in a way that avoids systemd …
Browse files Browse the repository at this point in the history
…errors
  • Loading branch information
ferricoxide committed Mar 9, 2021
1 parent bb38553 commit 062a494
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ash-linux/el7/STIGbyID/cat2/RHEL-07-040660.sls
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ notify_{{ stig_id }}-skipSet:
- cwd: /root
- stateful: True
{%- else %}
include:
- ash-linux.el7.STIGbyID.cat2.restart_sshd

file_{{ stig_id }}-{{ cfgFile }}:
file.replace:
- name: '{{ cfgFile }}'
Expand All @@ -53,4 +56,6 @@ file_{{ stig_id }}-{{ cfgFile }}:
- not_found_content: |-
# Inserted per STIG {{ stig_id }}
{{ parmName }} {{ parmValu }}
- onchanges_in:
- service: service_sshd_restart
{%- endif %}
5 changes: 5 additions & 0 deletions ash-linux/el7/STIGbyID/cat2/RHEL-07-040670.sls
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ notify_{{ stig_id }}-skipSet:
- cwd: /root
- stateful: True
{%- else %}
include:
- ash-linux.el7.STIGbyID.cat2.restart_sshd

file_{{ stig_id }}-{{ cfgFile }}:
file.replace:
- name: '{{ cfgFile }}'
Expand All @@ -51,4 +54,6 @@ file_{{ stig_id }}-{{ cfgFile }}:
- not_found_content: |-
# Inserted per STIG {{ stig_id }}
{{ parmName }} {{ parmValu }}
- onchanges_in:
- service: service_sshd_restart
{%- endif %}
5 changes: 5 additions & 0 deletions ash-linux/el7/STIGbyID/cat2/RHEL-07-040680.sls
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ notify_{{ stig_id }}-skipSet:
- cwd: /root
- stateful: True
{%- else %}
include:
- ash-linux.el7.STIGbyID.cat2.restart_sshd

file_{{ stig_id }}-{{ cfgFile }}:
file.replace:
- name: '{{ cfgFile }}'
Expand All @@ -42,4 +45,6 @@ file_{{ stig_id }}-{{ cfgFile }}:
- not_found_content: |-
# Inserted per STIG {{ stig_id }}
{{ parmName }} {{ parmValu }}
- onchanges_in:
- service: service_sshd_restart
{%- endif %}
5 changes: 5 additions & 0 deletions ash-linux/el7/STIGbyID/cat2/RHEL-07-040690.sls
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ notify_{{ stig_id }}-skipSet:
- name: 'printf "\nchanged=no comment=''Handler for {{ stig_id }} has been selected for skip.''\n"'
- cwd: /root
{%- else %}
include:
- ash-linux.el7.STIGbyID.cat2.restart_sshd

file_{{ stig_id }}-{{ cfgFile }}:
file.replace:
- name: '{{ cfgFile }}'
Expand All @@ -40,4 +43,6 @@ file_{{ stig_id }}-{{ cfgFile }}:
- not_found_content: |-
# Inserted per STIG {{ stig_id }}
{{ parmName }} {{ parmValu }}
- onchanges_in:
- service: service_sshd_restart
{%- endif %}
5 changes: 5 additions & 0 deletions ash-linux/el7/STIGbyID/cat2/RHEL-07-040700.sls
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ notify_{{ stig_id }}-skipSet:
- cwd: /root
- stateful: True
{%- else %}
include:
- ash-linux.el7.STIGbyID.cat2.restart_sshd

file_{{ stig_id }}-{{ cfgFile }}:
file.replace:
- name: '{{ cfgFile }}'
Expand All @@ -42,4 +45,6 @@ file_{{ stig_id }}-{{ cfgFile }}:
- not_found_content: |-
# Inserted per STIG {{ stig_id }}
{{ parmName }} {{ parmValu }}
- onchanges_in:
- service: service_sshd_restart
{%- endif %}

0 comments on commit 062a494

Please sign in to comment.