2014-04-22 14:34:37 +02:00
|
|
|
---
|
2014-05-10 20:33:06 +02:00
|
|
|
- name: Ensure Apache is installed (RedHat).
|
2014-04-22 14:34:37 +02:00
|
|
|
yum: >
|
|
|
|
name={{ item }}
|
|
|
|
state=installed
|
|
|
|
enablerepo={{ apache_enablerepo }}
|
|
|
|
with_items: apache_packages
|
|
|
|
|
2014-05-10 20:33:06 +02:00
|
|
|
- name: Configure Apache (RedHat).
|
2014-04-22 14:34:37 +02:00
|
|
|
lineinfile: >
|
|
|
|
dest={{ apache_server_root }}/conf/{{ apache_daemon }}.conf
|
|
|
|
regexp="{{ item.regexp }}"
|
|
|
|
line="{{ item.line }}"
|
|
|
|
state=present
|
|
|
|
with_items:
|
|
|
|
- {
|
|
|
|
regexp: "^Listen ",
|
|
|
|
line: "Listen {{ apache_listen_port }}"
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
regexp: "^NameVirtualHost ",
|
|
|
|
line: "NameVirtualHost *:{{ apache_listen_port }}"
|
|
|
|
}
|
|
|
|
notify: restart apache
|