From 32086f62131e1b813e2f3d97bc2c78f66c6a3154 Mon Sep 17 00:00:00 2001 From: Carlos Konstanski Date: Wed, 13 Dec 2017 18:54:21 -0700 Subject: adding files --- playbooks/apache.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 playbooks/apache.yaml (limited to 'playbooks/apache.yaml') diff --git a/playbooks/apache.yaml b/playbooks/apache.yaml new file mode 100644 index 0000000..f4121d8 --- /dev/null +++ b/playbooks/apache.yaml @@ -0,0 +1,30 @@ +--- +- name: "Configure apache vhost" + template: + src: ../templates/01_openbook.conf + dest: /etc/apache2/sites-available + mode: 0644 + owner: root + group: root + register: vhost_result + +- name: "Configure apache modules" + shell: | + a2enmod headers + a2enmod proxy + a2enmod proxy_http + a2enmod socache_shmcb + a2enmod redirect + a2enmod ssl + a2dissite 000-default.conf + a2dissite default-ssl.conf + rm /etc/apache2/sites-available/000-default.conf + rm /etc/apache2/sites-available/default-ssl.conf + a2ensite 01_openbook.conf + when: vhost_result["changed"] == True + +- include: apache-ctl.yaml action=restart + when: vhost_result["changed"] == True + +- include: apache-ctl.yaml action=start + when: vhost_result["changed"] == False -- cgit v1.3