Skip to content

Instantly share code, notes, and snippets.

@wtospit
Last active November 8, 2016 15:45
Show Gist options
  • Save wtospit/90ce7ebbba922faa9a10528235e42cfb to your computer and use it in GitHub Desktop.
Save wtospit/90ce7ebbba922faa9a10528235e42cfb to your computer and use it in GitHub Desktop.

Revisions

  1. wtospit renamed this gist Nov 8, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. wtospit created this gist Nov 8, 2016.
    18 changes: 18 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    ---
    - hosts: webservers
    vars:
    http_port: 80
    max_clients: 200
    remote_user: root
    tasks:
    - name: ensure apache is at the latest version
    yum: name=httpd state=latest
    - name: write the apache config file
    template: src=/srv/httpd.j2 dest=/etc/httpd.conf
    notify:
    - restart apache
    - name: ensure apache is running (and enable it at boot)
    service: name=httpd state=started enabled=yes
    handlers:
    - name: restart apache
    service: name=httpd state=restarted