-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathmain.yml
More file actions
14 lines (13 loc) · 585 Bytes
/
main.yml
File metadata and controls
14 lines (13 loc) · 585 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
---
- hosts: all
become: yes
roles:
- { role: apt_update, when: ( ansible_distribution == "Ubuntu" ) or
( ansible_distribution == "Debian" ) }
- { role: yum_update, when: ( ansible_distribution == "CentOS" ) or
( ansible_distribution == "Amazon" ) or
( ansible_distribution == "RedHat" ) }
vars:
reboot_ok: false
# How to run
# ansible-playbook -b -u <user> --private-key <path to key> -i hosts -l <host-group> main.yml [--extra-vars reboot_ok=true]