32 lines
702 B
YAML
32 lines
702 B
YAML
---
|
|
# patching.yml
|
|
#
|
|
# This playbook can be used to patch all the servers in an inventory to the latest software available.
|
|
# Because we typically encrypt our disk storage, we don't wait for the connection to become available again.
|
|
# Variables:
|
|
# - target: the host grouper in the inventory -- default: all
|
|
#
|
|
# Patch then restart a node
|
|
#
|
|
#
|
|
- hosts: "{{ targets | default('virtual') }}"
|
|
order: sorted
|
|
serial: 4
|
|
vars:
|
|
ansible_become: yes
|
|
ansible_become_method: sudo
|
|
roles:
|
|
- patching
|
|
|
|
- hosts: physical
|
|
order: sorted
|
|
serial: 4
|
|
vars:
|
|
ansible_become: yes
|
|
ansible_become_method: sudo
|
|
tasks:
|
|
|
|
- include_role:
|
|
name: patching
|
|
when: targets is unset
|