ansible-role-apache/tasks/main.yml

22 lines
627 B
YAML
Raw Normal View History

---
# Apache.
- name: Install Apache.
2014-03-14 17:28:08 +01:00
yum: name={{ item }} state=installed enablerepo={{ apache_enablerepo }}
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