first commit

This commit is contained in:
fossilfranv 2021-04-09 13:09:38 -07:00
parent 60df5f6f27
commit 6b0d3daa01

28
example_playbook Normal file
View File

@ -0,0 +1,28 @@
---
- hosts: webserver
gather_facts: yes
become: yes
tasks:
- name: Install apache
apt: pkg=apache2 state=latest
notify:
- restart apache2
- name: Enable apache2 during boot
service: name=apache2 state=started enabled=yes
handlers:
- name: restart apache2
service: name=apache2 state=restarted
- hosts: loadbalancer
become: yes
tasks:
- name: Install nginx
apt: pkg=nginx state=latest
notify:
- restart nginx
- name: Enable nginx during boot
service: name=nginx state=started enabled=yes
handlers:
- name: restart nginx
service: name=nginx state=restarted