refactor ♻️: Refactor README and update role for Proxmox VE provisioning
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 11s
Gitleaks Scan / gitleaks (push) Successful in 5s
Markdown Lint / markdown-lint (push) Failing after 4s

This refactoring includes updating the README, changing the role name to focus on Proxmox VE, enhancing compatibility matrix, and refactoring default values for role variables. Handlers are updated to manage apt cache, restart pveproxy, and reload systemd. Role metadata is also updated for better Proxmox VE provisioning.
This commit is contained in:
2026-02-07 08:29:45 +01:00
parent 8c9ad60602
commit 8341d6e295
15 changed files with 212 additions and 162 deletions

View File

@@ -1,45 +1,15 @@
---
# ansible-role-template/handlers/main.yml
# ansible_role_proxmox_provision/handlers/main.yml
# Handlers for role
# ==================
- name: apt update
apt:
update_cache: yes
# Service handlers
- name: Restart {{ role_template_service_name }}
ansible.builtin.service:
name: "{{ role_template_service_name }}"
- name: restart pveproxy
systemd:
name: pveproxy
state: restarted
listen: "restart {{ role_template_service_name }}"
when: role_template_service_enabled
- name: Reload systemd
ansible.builtin.systemd:
daemon_reload: true
listen: "restart {{ role_template_service_name }}"
when: role_template_systemd_enabled
# Configuration handlers
- name: Reload nginx
ansible.builtin.service:
name: nginx
state: reloaded
listen: "reload nginx"
when: "'nginx' in role_template_service_name"
# Backup handlers
- name: Rotate logs
ansible.builtin.command: logger -p local0.info "Rotating logs for {{ role_template_service_name }}"
changed_when: true
listen: "rotate logs"
# Monitoring handlers
- name: Notify monitoring
ansible.builtin.uri:
url: "{{ role_template_monitoring_webhook_url }}"
method: POST
body_format: json
body: "{{ lookup('template', 'monitoring_notification.json.j2') }}"
status_code: 200
delegate_to: localhost
run_once: true
listen: "notify monitoring"
when: role_template_monitoring_enabled
- name: reload systemd
command: systemctl daemon-reexec