Skip to content

Instantly share code, notes, and snippets.

@mmarcon
Created September 4, 2015 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmarcon/d05c8e7750941a57be6f to your computer and use it in GitHub Desktop.
Save mmarcon/d05c8e7750941a57be6f to your computer and use it in GitHub Desktop.
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