mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2025-01-18 07:20:19 +01:00
1b07bbd126
Current vhosts defenition limit them to listen only on single IP/port. In the meanwhile, there are usecases where vhosts on the same server might wanna listen on different quite independent set of IPs/ports, which is not currently possible. This patch adds such functionality, and an operator might define extra properties for apache_vhosts to make them listening on required ports/interfaces.
25 lines
617 B
YAML
25 lines
617 B
YAML
---
|
|
- name: Converge
|
|
hosts: all
|
|
become: true
|
|
|
|
vars:
|
|
apache_listen_port_ssl: 443
|
|
apache_create_vhosts: true
|
|
apache_vhosts_filename: "vhosts.conf"
|
|
apache_vhosts:
|
|
- servername: "example.com"
|
|
documentroot: "/var/www/vhosts/example_com"
|
|
- servername: "local.example.com"
|
|
documentroot: "/var/www/vhosts/example_com"
|
|
listen_ip: 127.0.0.1
|
|
listen_port: 8080
|
|
|
|
pre_tasks:
|
|
- name: Update apt cache.
|
|
apt: update_cache=yes cache_valid_time=600
|
|
when: ansible_os_family == 'Debian'
|
|
changed_when: false
|
|
|
|
roles:
|
|
- role: geerlingguy.apache
|