Finally move the tasks/apache.yml to a role. This allows us to order it with the other roles.

This commit is contained in:
Kevin Fenzi 2015-05-07 19:06:35 +00:00
parent ff64a7b408
commit b5cc837e99
48 changed files with 48 additions and 55 deletions

View file

@ -0,0 +1,72 @@
---
# install apache(httpd)
- name: install apache
yum: name={{ item }} state=present
with_items:
- httpd
- httpd-tools
tags:
- packages
- apache
- name: set apache running/enabled
service: name=httpd enabled=yes
ignore_errors: true
notify:
- restart apache
tags:
- service
- apache
# install hash randomization hotfix
- name: hotfix - copy over new httpd init script
copy: src="{{ files }}/hotfix/httpd/httpd.init" dest=/etc/init.d/httpd
owner=root group=root mode=0755
notify:
- restart apache
tags:
- config
- hotfix
- apache
- name: hotfix - copy over new httpd sysconfig (el6)
copy: src="{{ files }}/hotfix/httpd/httpd.sysconfig" dest=/etc/sysconfig/httpd
when: ansible_distribution_major_version == '6'
notify:
- restart apache
tags:
- config
- hotfix
- apache
- name: hotfix - copy over new httpd sysconfig (el7)
copy: src="{{ files }}/hotfix/httpd/httpd.sysconfig" dest=/etc/sysconfig/httpd
when: ansible_distribution_major_version == '7'
notify:
- restart apache
tags:
- config
- hotfix
- apache
- name: add appserver headers.conf
template: src="{{ files }}/httpd/headers.conf.j2" dest=/etc/httpd/conf.d/headers.conf
notify:
- restart apache
tags:
- config
- apache
- name: add apache_status location for collectd
template: src="{{ files }}/httpd/apachestatus.conf" dest=/etc/httpd/conf.d/apachestatus.conf
notify:
- restart apache
tags:
- config
- apache
- name: setup logrotate to our needs
copy: src="{{ files }}/httpd/httpd.logrotate" dest=/etc/logrotate.d/httpd
tags:
- config
- apache