Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
tasks:
- name: install nginx
apt: name=nginx state=present update_cache=yes
notify:
- start nginx
- name: configure nginx
copy: src={{ item }} dest=/etc/nginx/sites-available/
with_fileglob:
- ./nginx/*
notify:
- restart nginx
handlers:
- name: start nginx
service: name=nginx state=started
- name: restart nginx
service: name=nginx state=restarted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment