2014-02-28 23:23:24 +01:00
|
|
|
---
|
|
|
|
# Apache.
|
|
|
|
- name: Install Apache.
|
2014-03-14 17:28:08 +01:00
|
|
|
yum: name={{ item }} state=installed enablerepo={{ apache_enablerepo }}
|
2014-02-28 23:23:24 +01:00
|
|
|
with_items:
|
|
|
|
- httpd
|
|
|
|
- httpd-devel
|
|
|
|
- mod_ssl
|
|
|
|
- openssh
|
|
|
|
|
|
|
|
# Copy httpd config into place.
|
|
|
|
- name: Copy httpd config files into place.
|
|
|
|
template: src={{ item.src }} dest={{ item.dest }} owner=root group=root mode=0644
|
|
|
|
notify: restart apache
|
|
|
|
with_items:
|
|
|
|
- {src: 'httpd.conf.j2', dest: '/etc/httpd/conf/httpd.conf'}
|
|
|
|
- {src: 'vhosts.conf.j2', dest: '/etc/httpd/conf/vhosts.conf'}
|
|
|
|
|
|
|
|
# Set Apache to run at startup.
|
|
|
|
- name: Ensure Apache is started.
|
|
|
|
service: name=httpd state=started enabled=yes
|