added ntfy alerts and removed sudo

This commit is contained in:
2025-10-02 08:50:43 +02:00
parent 1c4c7f0c24
commit 00f7f43ebd
4 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
---
- name: system setup | ntfy alerts | install curl
tags: ntfy,hardening,system
package:
name: curl
state: present
- name: system setup | ntfy alerts | create ssh login alert script
tags: ntfy,hardening,system
copy:
dest: /etc/ssh/sshrc
owner: root
group: root
mode: '0755'
content: |
#!/bin/sh
# Managed by Ansible
# Send SSH login alert to ntfy topic.
MESSAGE="{{ ntfy_ssh_login_message }}"
curl -s -d "$MESSAGE" "{{ ntfy_url }}" > /dev/null

View File

@@ -13,6 +13,7 @@
- postfix
- cups*
- avahi-daemon
- sudo
# Common utilities not required for a minimal system
- popularity-contest
- whoopsie
@@ -37,6 +38,7 @@
- postfix
- cups*
- avahi
- sudo
state: absent
notify: Update_aide_database
when: ansible_os_family == "RedHat"