2024-07-14 05:45:31 +02:00
|
|
|
---
|
|
|
|
- hosts: all
|
|
|
|
become: true
|
|
|
|
pre_tasks:
|
|
|
|
|
2024-07-14 06:57:15 +02:00
|
|
|
- name: install updates for EL distros
|
2024-07-14 05:45:31 +02:00
|
|
|
tags: always
|
|
|
|
package:
|
|
|
|
update_only: yes
|
|
|
|
update_cache: yes
|
|
|
|
when: ansible_os_family == "RedHat"
|
|
|
|
|
|
|
|
- name: install updates for Debian distros
|
|
|
|
tags: always
|
|
|
|
package:
|
|
|
|
upgrade: dist
|
|
|
|
update_cache: yes
|
|
|
|
when: ansible_os_family == "Debian"
|
|
|
|
|
|
|
|
- hosts: all
|
|
|
|
become: true
|
|
|
|
roles:
|
|
|
|
- base
|
|
|
|
|
|
|
|
- hosts: web_servers
|
|
|
|
become: true
|
|
|
|
tags: web
|
|
|
|
roles:
|
|
|
|
- web_servers
|
|
|
|
|
|
|
|
- hosts: db_servers
|
|
|
|
tags: db,
|
|
|
|
become: true
|
|
|
|
roles:
|
|
|
|
- db_servers
|