mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Normalized run_once_, made openresty handlers without when aviable and forced flush in run_once when blocks to avoid handlers with when conditions
This commit is contained in:
@@ -9,7 +9,7 @@ This Ansible role configures the OpenSSH daemon (`sshd`) by deploying a template
|
||||
- Renders `sshd_config.j2` into `/etc/ssh/sshd_config` with customizable options
|
||||
- Sets file ownership (`root:root`) and permissions (`0644`)
|
||||
- Automatically reloads and restarts the SSH service via a Systemd handler
|
||||
- Uses a `run_once_sshd` fact to ensure idempotent execution
|
||||
- Uses a `run_once_sys_svc_sshd` fact to ensure idempotent execution
|
||||
|
||||
## Features
|
||||
|
||||
@@ -25,7 +25,7 @@ This Ansible role configures the OpenSSH daemon (`sshd`) by deploying a template
|
||||
Handles daemon reload and service restart seamlessly on configuration changes.
|
||||
|
||||
- **Idempotency**
|
||||
Ensures tasks run only once per play by setting the `run_once_sshd` fact.
|
||||
Ensures tasks run only once per play by setting the `run_once_sys_svc_sshd` fact.
|
||||
|
||||
## Further Resources
|
||||
|
||||
|
@@ -6,9 +6,9 @@
|
||||
group: root
|
||||
mode: '0644'
|
||||
notify: sshd restart
|
||||
when: run_once_sshd is not defined
|
||||
when: run_once_sys_svc_sshd is not defined
|
||||
|
||||
- name: run the sshd tasks once
|
||||
set_fact:
|
||||
run_once_sshd: true
|
||||
when: run_once_sshd is not defined
|
||||
run_once_sys_svc_sshd: true
|
||||
when: run_once_sys_svc_sshd is not defined
|
||||
|
Reference in New Issue
Block a user