Skip to content

Instantly share code, notes, and snippets.

@hpk42
Created November 26, 2012 22:10
Show Gist options
  • Save hpk42/4150988 to your computer and use it in GitHub Desktop.
Save hpk42/4150988 to your computer and use it in GitHub Desktop.
- copy: src=files/$file dest=/www/
notify:
- restart apache
@hpk42
Copy link
Author

hpk42 commented Nov 26, 2012

  • hosts: hq2
    vars:
    http_port: 80
    max_clients: 200
    user: root
    tasks:
    • name: ensure apache is at the latest version
      action: apt pkg=apache2 state=latest
    • name: write httpd.conf
      copy: src=files/httpd.conf dest=/etc/apache2/httpd.conf
    • name: write apache2.conf
      copy: src=files/apache2.conf dest=/etc/apache2/apache2.conf
    • include: enablemod.yml mod=ssl.conf
    • include: enablemod.yml mod=ssl.load
    • include: enablemod.yml mod=userdir.conf
    • include: enablemod.yml mod=rewrite.load
    • file: path=/etc/apache2/ssl state=directory
    • copy: src=$item dest=/etc/apache2/ssl/
      with_fileglob: files/ssl/*
      notify:
      • restart apache
    • include: copywww.yml file=merlinux..inc
    • include: copywww.yml file=pytest.org..conf
    • include: copywww.yml file=pylib.org..conf
    • file: path=/www/merlinux.de/htdocs state=directory
    • file: path=/www/pytest.org state=directory
      #- name: ensure apache is running

      action: service name=httpd state=started

      handlers:
      • name: restart apache
        action: service name=httpd state=restarted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment