36 lines
594 B
YAML
36 lines
594 B
YAML
|
---
|
||
|
- hosts: all
|
||
|
become: true
|
||
|
pre_tasks:
|
||
|
|
||
|
- name: install updates for RHEL distros
|
||
|
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
|