Skip to content

Instantly share code, notes, and snippets.

@VuokkoVuorinnen
Last active August 29, 2015 13:56
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 VuokkoVuorinnen/8800779 to your computer and use it in GitHub Desktop.
Save VuokkoVuorinnen/8800779 to your computer and use it in GitHub Desktop.
- name: Configure Apache
hosts: web-servers
user: root
handlers:
- name: Restart Apache
action: service name=httpd state=restarted
tasks:
- name: Ensure Apache is installed
action: yum pkg=httpd state=installed
- name: Configure Apache
action: template src=templates/webapp.conf dest=/etc/httpd/conf.d/webapp.conf
notify:
- Restart Apache
- name: Ensure Apache is started
action: service name=httpd state=started enabled=yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment