First patching playbook (WIP)
This commit is contained in:
@@ -13,6 +13,3 @@ all:
|
||||
ubu24:
|
||||
ansible_host: 127.0.0.1
|
||||
ansible_port: 2223
|
||||
alma9:
|
||||
ansible_host: 127.0.0.1
|
||||
ansible_port: 2222
|
||||
|
||||
9
playbooks/patching.yml
Normal file
9
playbooks/patching.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Patch Linux servers
|
||||
hosts:
|
||||
- all
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- patching
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: Configure webserver with nginx
|
||||
hosts:
|
||||
- aton
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- nginx
|
||||
4
roles/patching/handlers/main.yml
Normal file
4
roles/patching/handlers/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
- name: Reboot if required
|
||||
ansible.builtin.reboot:
|
||||
reboot_timeout: 600
|
||||
10
roles/patching/tasks/main.yml
Normal file
10
roles/patching/tasks/main.yml
Normal 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
|
||||
Reference in New Issue
Block a user