-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Frederick Witty <[email protected]>
- Loading branch information
1 parent
3d736f8
commit 8762afd
Showing
7 changed files
with
84 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
--- | ||
- name: reboot_windows | ||
ansible.windows.win_reboot: | ||
reboot_timeout: 3600 | ||
|
||
- name: change_requires_reboot | ||
ansible.builtin.set_fact: | ||
reboot_host: true | ||
tags: | ||
- always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
|
||
- name: "POST | Flush Handlers" | ||
ansible.builtin.meta: flush_handlers | ||
tags: | ||
- always | ||
|
||
- name: "POST | Reboot System Options" | ||
block: | ||
- name: "POST | Rebooting System................. Skip Reboot Has Been Set To: False" | ||
ansible.windows.win_reboot: | ||
reboot_timeout: 3600 | ||
when: | ||
- reboot_host | ||
- not skip_reboot | ||
|
||
- name: "POST | Warning A Reboot Is Required, Skip Reboot Has Been Set" | ||
ansible.builtin.debug: | ||
msg: | ||
- "Warning!! Changes Have Been Made That Require A Reboot To Be Implemented Manually." | ||
- "Skip Reboot Was Set To: True - This Can Affect Compliance Check Results." | ||
changed_when: true | ||
when: | ||
- reboot_host | ||
- skip_reboot | ||
|
||
- name: "POST | Warning A Reboot Is Required, Skip Reboot Has Been Set | Warning Count" | ||
ansible.builtin.import_tasks: | ||
file: warning_facts.yml | ||
when: | ||
- reboot_host | ||
- skip_reboot | ||
vars: | ||
warn_control_id: Reboot_Required | ||
tags: | ||
- always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
|
||
# This task is used to create variables used in giving a warning summary for manual tasks | ||
# that need attention | ||
# | ||
# The warn_control_list and warn_count vars start life in vars/main.yml but get updated | ||
# as the tasks that have a warning complete | ||
# | ||
# Those two variables are used in the tasks/main.yml to display a list of warnings | ||
# | ||
# warn_control_id is set within the task itself and has the control ID as the value | ||
# | ||
# warn_control_list is the main variable to be used and is a list made up of the warn_control_id’s | ||
# | ||
# warn_count is the main variable for the number of warnings and each time a warn_control_id is added | ||
# the count increases by a value of 1 | ||
- name: "NO CONTROL ID | AUDIT | Set fact for manual task warning." | ||
ansible.builtin.set_fact: | ||
warn_control_list: "{{ warn_control_list }} [{{ warn_control_id }}]" | ||
warn_count: "{{ warn_count | int + 1 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters