Create notification system for workstations to know when Ansible has been run.
This commit is contained in:
38
local.yml
38
local.yml
@@ -21,6 +21,19 @@
|
||||
- include_tasks: facts/general/user.yml
|
||||
|
||||
|
||||
####### Start #######
|
||||
|
||||
- name: Main | Start
|
||||
block:
|
||||
|
||||
- name: Main | Start | Notify | Touch File
|
||||
include_tasks: tasks/general/acct_mgmt/notify.yml
|
||||
|
||||
- name: Main | Start | Notify | Add Message
|
||||
shell : echo "'Ansible' 'Provisioning started @ `date`'" >> "{{ notify_log_file }}"
|
||||
|
||||
when: workstation == true
|
||||
|
||||
####### NixOS #######
|
||||
# Install the .nix files and do a little data setup.
|
||||
|
||||
@@ -246,8 +259,25 @@
|
||||
####### Reporting #######
|
||||
# Provide information for analysis.
|
||||
|
||||
- include_tasks: tasks/general/software/telegraf.yml
|
||||
- name: Main | Reporting
|
||||
block:
|
||||
|
||||
- include_tasks: tasks/general/tests/services.yml
|
||||
- include_tasks: tasks/general/tests/lynis.yml
|
||||
- include_tasks: tasks/general/tests/nmap.yml
|
||||
- include_tasks: tasks/general/software/telegraf.yml
|
||||
|
||||
- include_tasks: tasks/general/tests/services.yml
|
||||
- include_tasks: tasks/general/tests/lynis.yml
|
||||
- include_tasks: tasks/general/tests/nmap.yml
|
||||
|
||||
|
||||
####### Finish #######
|
||||
|
||||
- name: Main | Finish
|
||||
block:
|
||||
|
||||
- name: Main | Finish | Notify | Touch File
|
||||
include_tasks: tasks/general/acct_mgmt/notify.yml
|
||||
|
||||
- name: Main | Finish | Notify | Add Message
|
||||
shell : echo "'Ansible' 'Provisioning finished @ `date`'" >> "{{ notify_log_file }}"
|
||||
|
||||
when: workstation == true
|
||||
|
||||
Reference in New Issue
Block a user