mirror of
https://github.com/ansibleguy/infra_apache.git
synced 2026-10-18 17:01:27 +02:00
added status page config
This commit is contained in:
@@ -56,4 +56,4 @@
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
mode: 0644
|
||||
tags: [sites]
|
||||
tags: [sites, config]
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
|
||||
- name: Apache | Debian | Status page | Configuring listen-port
|
||||
ansible.builtin.lineinfile:
|
||||
path: '/etc/apache2/ports.conf'
|
||||
line: "Listen {{ APACHE_CONFIG.status_page.port }}"
|
||||
ignore_errors: true
|
||||
tags: [config, sites, base]
|
||||
|
||||
- name: Apache | Debian | Status page | Configuring site
|
||||
ansible.builtin.template:
|
||||
src: 'templates/etc/apache2/sites-available/status.conf.j2'
|
||||
dest: '/etc/apache2/sites-available/status.conf'
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
mode: 0644
|
||||
tags: [config, sites, base]
|
||||
|
||||
- name: Apache | Debian | Status page | Enabling site
|
||||
ansible.builtin.file:
|
||||
state: link
|
||||
src: '/etc/apache2/sites-available/status.conf'
|
||||
dest: '/etc/apache2/sites-enabled/status.conf'
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
mode: 0644
|
||||
tags: [sites, base, config]
|
||||
@@ -106,6 +106,11 @@
|
||||
- 'default-ssl.conf'
|
||||
tags: [config, base]
|
||||
|
||||
- name: Apache | Debian | Removing status page
|
||||
ansible.builtin.include_tasks: rm_status.yml
|
||||
when: APACHE_CONFIG.status_page.state != 'present'
|
||||
tags: [config, sites, base]
|
||||
|
||||
- name: Apache | Debian | Removing site
|
||||
ansible.builtin.include_tasks: rm_site.yml
|
||||
when: site.state != 'present'
|
||||
@@ -125,6 +130,11 @@
|
||||
state: reloaded
|
||||
tags: [base, config, sites, certs]
|
||||
|
||||
- name: Apache | Debian | Adding status page
|
||||
ansible.builtin.include_tasks: add_status.yml
|
||||
when: APACHE_CONFIG.status_page.state == 'present'
|
||||
tags: [config, sites, base]
|
||||
|
||||
- name: Apache | Debian | Adding site
|
||||
ansible.builtin.include_tasks: add_site.yml
|
||||
when: site.state == 'present'
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
|
||||
- name: Apache | Debian | Removing status page
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
- '/etc/apache2/sites-enabled/status.conf'
|
||||
- '/etc/apache2/sites-available/status.conf'
|
||||
Reference in New Issue
Block a user