First patching playbook (WIP)

This commit is contained in:
2026-03-02 11:54:00 +01:00
parent df8eb83dc0
commit e1040ba303
5 changed files with 23 additions and 11 deletions

View File

@@ -13,6 +13,3 @@ all:
ubu24: ubu24:
ansible_host: 127.0.0.1 ansible_host: 127.0.0.1
ansible_port: 2223 ansible_port: 2223
alma9:
ansible_host: 127.0.0.1
ansible_port: 2222

9
playbooks/patching.yml Normal file
View File

@@ -0,0 +1,9 @@
---
- name: Patch Linux servers
hosts:
- all
become: true
roles:
- patching

View File

@@ -1,8 +0,0 @@
---
- name: Configure webserver with nginx
hosts:
- aton
become: true
roles:
- nginx

View File

@@ -0,0 +1,4 @@
---
- name: Reboot if required
ansible.builtin.reboot:
reboot_timeout: 600

View File

@@ -0,0 +1,10 @@
---
- name: Patch Debian-family hosts
ansible.builtin.apt:
state: present
update_cache: yes
upgrade: safe
autoremove: yes
autoclean: yes
when: ansible_os_family == 'Debian'
notify: Reboot if required