ansible

Log | Files | Refs | README

commit 1ac0ac75f196f3714593fe0b9da9290ff76d0ecd
parent fa332176a1fcf403893bcad6936ed864dc554fe4
Author: Chris Roberts <chris.roberts@learningunix.net>
Date:   Mon,  1 Jun 2026 11:03:32 -0500

added pushover role for notifications.

Diffstat:
Aroles/pushover/tasks/main.yml | 30++++++++++++++++++++++++++++++
Aroles/pushover/templates/pushover.j2 | 4++++
Msite.yml | 3+++
3 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/roles/pushover/tasks/main.yml b/roles/pushover/tasks/main.yml @@ -0,0 +1,30 @@ +--- +- name: Clone scripts repo + git: + repo: "https://gitea.learningunix.net/cjr/scripts.git" + dest: "/home/cjr/.scripts" + update: yes + become: false + +- name: Deploy pushover credentials + template: + src: pushover.j2 + dest: /home/cjr/.pushover + owner: cjr + group: cjr + mode: '0600' + become: false + +- name: Source .pushover in .bashrc + lineinfile: + path: /home/cjr/.bashrc + line: "source ~/.pushover" + create: yes + become: false + +- name: Send test notification + shell: source /home/cjr/.pushover && /home/cjr/.scripts/notify.sh "Ansible" "Deployment complete" + args: + executable: /bin/bash + become: false + diff --git a/roles/pushover/templates/pushover.j2 b/roles/pushover/templates/pushover.j2 @@ -0,0 +1,4 @@ +export PUSHOVER_TOKEN="{{ pushover_token }}" +export PUSHOVER_USER="{{ pushover_user }}" + + diff --git a/site.yml b/site.yml @@ -18,5 +18,8 @@ tags: nginx - role: hugo tags: hugo + - role: pushover + become: false + tags: pushover