forked from ISTI-ansible-roles/ansible-roles
apache role: manage the 'ports.conf' file.
This commit is contained in:
parent
ab6ff75883
commit
5d9cdab42e
|
@ -6,6 +6,9 @@ apache_group: '{{ apache_user }}'
|
|||
apache_from_ppa: False
|
||||
apache_ppa_repo: 'ppa:ondrej/apache2'
|
||||
|
||||
apache_listen_ports:
|
||||
- 80
|
||||
|
||||
# Possible choices: event, prefork (the old ones), worker (the threaded version), itm
|
||||
apache_mpm_mode: worker
|
||||
|
||||
|
|
|
@ -12,27 +12,17 @@
|
|||
- is_trusty
|
||||
tags: [ 'apache', 'apache_additional_packages' ]
|
||||
|
||||
# - name: Load the required worker module
|
||||
# apache2_module: name={{ item.name }} state={{ item.state }} force=yes
|
||||
# with_items: '{{ apache_worker_modules }}'
|
||||
# when: is_trusty
|
||||
# notify: apache2 restart
|
||||
# ignore_errors: True
|
||||
# tags: [ 'apache', 'apache_modules', 'apache_workers_modules' ]
|
||||
|
||||
# - name: Load the required modules
|
||||
# apache2_module: name={{ item }} state=present force=yes
|
||||
# with_items: '{{ apache_default_modules }}'
|
||||
# notify: apache2 reload
|
||||
# ignore_errors: True
|
||||
# tags: [ 'apache', 'apache_modules' ]
|
||||
|
||||
- name: Install the apache additional packages, if any
|
||||
apt: pkg={{ item }} state={{ apache_pkg_state }} update_cache=yes cache_valid_time=3600
|
||||
with_items: '{{ apache_additional_packages_list }}'
|
||||
when: apache_additional_packages
|
||||
tags: [ 'apache', 'apache_additional_packages' ]
|
||||
|
||||
- name: Instal the ports conf file
|
||||
template: src=ports.conf dest=/etc/apache2/ports.conf
|
||||
notify: apache2 reload
|
||||
tags: [ 'apache', 'apache_conf' ]
|
||||
|
||||
- name: Remove the default virtualhost file
|
||||
file: dest=/etc/apache2/sites-enabled/{{ item }} state=absent
|
||||
with_items:
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{% for port in apache_listen_ports %}
|
||||
Listen {{ port }}
|
||||
{% endfor %}
|
Loading…
Reference in New Issue