Create notification system for workstations to know when Ansible has been run.

This commit is contained in:
2026-05-08 09:25:10 -07:00
parent edb1db9a9a
commit 465ba8e053
5 changed files with 56 additions and 5 deletions

View File

@@ -0,0 +1,8 @@
---
# Create and manage permissions for notify log.
- name: General | Notify | Update File
shell: "{{ item }}"
loop:
- touch "{{ notify_log_file }}"
- chmod 777 "{{ notify_log_file }}"

View File

@@ -1099,6 +1099,15 @@
if [ -f ~/.rc_shared ]; then
source ~/.rc_shared
fi
process_notify_log: |
if [[ -e {{ notify_log_file }} ]]; then
cp "{{ notify_log_file }}" "{{ notify_log_file_wip }}" 1>/dev/null
echo -n "" > "{{ notify_log_file }}"
cat "{{ notify_log_file_wip }}" | while read title message; do
notify-send "$title" "$message"
done
sh -c "rm '{{ notify_log_file_wip }}'"
fi
- name: General | Account Management | Users | Files | Common Variable
@@ -1181,6 +1190,7 @@
{{ alias_flatpak_clean }}
{{ alias_commit }}
{{ function_loop }}
{{ process_notify_log }}
- name: General | Account Management | Users | Files | .bashrc
blockinfile:

View File

@@ -247,7 +247,7 @@
true && inc_dconf &&
dconf write /org/gnome/desktop/notifications/show-banners \
false && inc_dconf &&
true && inc_dconf &&
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify/enable-sound-alerts \
false && inc_dconf &&
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify/enable \