diff --git a/example_playbook b/example_playbook new file mode 100644 index 0000000..b151ccd --- /dev/null +++ b/example_playbook @@ -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 + \ No newline at end of file