Add fail2ban role and clean up yaml lint noise

This commit is contained in:
2026-08-08 23:50:32 -05:00
parent 9b837dd780
commit 6c7ecfc724
352 changed files with 4632 additions and 4186 deletions
+3 -8
View File
@@ -1,16 +1,13 @@
---
language: python
python: "2.7"
python: '2.7'
# Use the new container infrastructure
sudo: false
# Install ansible
addons:
apt:
packages:
- python-pip
packages: [python-pip]
install:
# Install ansible
- pip install ansible
@@ -20,10 +17,8 @@ install:
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
webhooks: https://galaxy.ansible.com/api/v1/notifications/
+2 -2
View File
@@ -1,4 +1,4 @@
---
# defaults file for ensure_apache
lets_encrypt_admin: 'root@example.com'
lets_encrypt_url: 'https://acme-v02.api.letsencrypt.org/directory'
lets_encrypt_admin: root@example.com
lets_encrypt_url: https://acme-v02.api.letsencrypt.org/directory
+5 -7
View File
@@ -1,17 +1,17 @@
---
# handlers file for ensure_apache
- name: 'ensure_apache.package_facts'
- name: ensure_apache.package_facts
ansible.builtin.package_facts:
- name: 'ensure_apache.service_facts'
- name: ensure_apache.service_facts
ansible.builtin.service_facts:
- name: 'ensure_apache.service_reload'
- name: ensure_apache.service_reload
when:
- ansible_facts["system"] == 'Linux'
- ansible_facts["service_mgr"] == 'systemd'
- ensure_apache is defined
ansible.builtin.systemd:
daemon_reload: 'yes'
- name: 'ensure_apache.service_restart'
- name: ensure_apache.service_restart
when:
- ansible_facts["system"] == 'Linux'
- ensure_apache is defined
@@ -21,9 +21,7 @@
ansible.builtin.service:
enabled: '{{ item.enabled }}'
name: '{{ item.name }}'
state: 'restarted'
state: restarted
loop: '{{ ensure_apache.service_list }}'
loop_control:
label: '{{ item.name }} will be restarted'
...
+1 -4
View File
@@ -1,3 +1,4 @@
---
galaxy_info:
author: Jason Rothstein
description: Ensure Apache is installed, running, and functional
@@ -15,7 +16,6 @@ galaxy_info:
# - Apache-2.0
# - CC-BY-4.0
license: LGPL-3.0-or-later
min_ansible_version: 2.9
# If this a Container Enabled role, provide the minimum Ansible Container version.
@@ -38,7 +38,6 @@ galaxy_info:
# - 1.0
# - 7
# - 99.99
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
@@ -46,8 +45,6 @@ galaxy_info:
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
+71 -70
View File
@@ -1,35 +1,37 @@
---
# tasks file for ensure_apache
- name: 'include variables'
when:
- ansible_facts["system"] == 'Linux'
- name: include variables
when: ["ansible_facts[\"system\"] == 'Linux'"]
ansible.builtin.include_vars:
file: '{{ lookup("first_found", findme) }}'
name: 'ensure_apache'
name: ensure_apache
vars:
findme:
files:
- '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"] }}-{{ ansible_facts["architecture"] }}.yml'
- '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"] }}-default.yml'
- '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"]
}}-{{ ansible_facts["architecture"] }}.yml'
- '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"]
}}-default.yml'
- '{{ ansible_facts["distribution"] }}-default.yml'
- '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"] }}-{{ ansible_facts["architecture"] }}.yml'
- '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"] }}-default.yml'
- '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"]
}}-{{ ansible_facts["architecture"] }}.yml'
- '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"]
}}-default.yml'
- '{{ ansible_facts["os_family"] }}-default.yml'
- 'default.yml'
paths:
- '../vars/'
errors: 'ignore'
- name: 'package discovery'
- default.yml
paths: [../vars/]
errors: ignore
- name: package discovery
when:
- ansible_facts["system"] == 'Linux'
- ansible_facts["packages"] is not defined
ansible.builtin.package_facts:
- name: 'service discovery'
- name: service discovery
when:
- ansible_facts["system"] == 'Linux'
- ansible_facts["services"] is not defined
ansible.builtin.service_facts:
- name: 'ensure sysctl'
- name: ensure sysctl
when:
- ansible_facts["system"] == 'Linux'
- ensure_apache is defined
@@ -46,11 +48,11 @@
loop_control:
label: '{{ item.name }} will be {{ item.value }}'
notify:
- 'ensure_apache.package_facts'
- 'ensure_apache.service_facts'
- 'ensure_apache.service_reload'
- 'ensure_apache.service_restart'
- name: 'ensure packages'
- ensure_apache.package_facts
- ensure_apache.service_facts
- ensure_apache.service_reload
- ensure_apache.service_restart
- name: ensure packages
when:
- ansible_facts["system"] == 'Linux'
- ensure_apache is defined
@@ -63,11 +65,11 @@
loop_control:
label: '{{ item.name }} will be {{ item.state }}'
notify:
- 'ensure_apache.package_facts'
- 'ensure_apache.service_facts'
- 'ensure_apache.service_reload'
- 'ensure_apache.service_restart'
- name: 'ensure seboolean'
- ensure_apache.package_facts
- ensure_apache.service_facts
- ensure_apache.service_reload
- ensure_apache.service_restart
- name: ensure seboolean
when:
- ansible_facts["system"] == 'Linux'
- ensure_apache is defined
@@ -81,11 +83,11 @@
loop_control:
label: '{{ item.name }} will be {{ item.state }}'
notify:
- 'ensure_apache.package_facts'
- 'ensure_apache.service_facts'
- 'ensure_apache.service_reload'
- 'ensure_apache.service_restart'
- name: 'ensure configurations'
- ensure_apache.package_facts
- ensure_apache.service_facts
- ensure_apache.service_reload
- ensure_apache.service_restart
- name: ensure configurations
when:
- ansible_facts["system"] == 'Linux'
- http_vhost is defined
@@ -107,11 +109,11 @@
loop_control:
label: '{{ item.dest }} will be ensured'
notify:
- 'ensure_apache.package_facts'
- 'ensure_apache.service_facts'
- 'ensure_apache.service_reload'
- 'ensure_apache.service_restart'
- name: 'ensure firewall'
- ensure_apache.package_facts
- ensure_apache.service_facts
- ensure_apache.service_reload
- ensure_apache.service_restart
- name: ensure firewall
when:
- ansible_facts["system"] == 'Linux'
- ansible_facts.packages["firewalld"] is defined
@@ -127,11 +129,11 @@
loop_control:
label: '{{ item.service }} will be {{ item.state }}'
notify:
- 'ensure_apache.package_facts'
- 'ensure_apache.service_facts'
- 'ensure_apache.service_reload'
- 'ensure_apache.service_restart'
- name: 'ensure permissions'
- ensure_apache.package_facts
- ensure_apache.service_facts
- ensure_apache.service_reload
- ensure_apache.service_restart
- name: ensure permissions
when:
- ansible_facts["system"] == 'Linux'
- ensure_apache is defined
@@ -158,11 +160,11 @@
loop_control:
label: '{{ item.path }} will be ensured'
notify:
- 'ensure_apache.package_facts'
- 'ensure_apache.service_facts'
- 'ensure_apache.service_reload'
- 'ensure_apache.service_restart'
- name: 'ensure vhost document roots'
- ensure_apache.package_facts
- ensure_apache.service_facts
- ensure_apache.service_reload
- ensure_apache.service_restart
- name: ensure vhost document roots
when:
- ansible_facts["system"] == 'Linux'
- ensure_apache is defined
@@ -170,21 +172,21 @@
- http_vhost is iterable
- item.fqdn is defined
ansible.builtin.file:
path: '/srv/http/{{ item.fqdn }}'
state: 'directory'
owner: 'root'
group: 'root'
path: /srv/http/{{ item.fqdn }}
state: directory
owner: root
group: root
mode: '0755'
setype: 'httpd_sys_content_t'
setype: httpd_sys_content_t
loop: '{{ http_vhost }}'
loop_control:
label: '/srv/http/{{ item.fqdn }} will be ensured'
label: /srv/http/{{ item.fqdn }} will be ensured
notify:
- 'ensure_apache.package_facts'
- 'ensure_apache.service_facts'
- 'ensure_apache.service_reload'
- 'ensure_apache.service_restart'
- name: 'ensure website content from git repos'
- ensure_apache.package_facts
- ensure_apache.service_facts
- ensure_apache.service_reload
- ensure_apache.service_restart
- name: ensure website content from git repos
when:
- ansible_facts["system"] == 'Linux'
- ensure_apache is defined
@@ -194,17 +196,17 @@
- item.repo is defined
ansible.builtin.git:
accept_hostkey: 'yes'
dest: '/srv/http/{{ item.fqdn }}'
dest: /srv/http/{{ item.fqdn }}
repo: '{{ item.repo }}'
loop: '{{ http_vhost }}'
loop_control:
label: '/srv/http/{{ item.fqdn }} will be populated...'
label: /srv/http/{{ item.fqdn }} will be populated...
notify:
- 'ensure_apache.package_facts'
- 'ensure_apache.service_facts'
- 'ensure_apache.service_reload'
- 'ensure_apache.service_restart'
- name: 'ensure services'
- ensure_apache.package_facts
- ensure_apache.service_facts
- ensure_apache.service_reload
- ensure_apache.service_restart
- name: ensure services
when:
- ansible_facts["system"] == 'Linux'
- ensure_apache is defined
@@ -218,10 +220,9 @@
loop_control:
label: '{{ item.name }} will be {{ item.state }}'
notify:
- 'ensure_apache.package_facts'
- 'ensure_apache.service_facts'
- 'ensure_apache.service_reload'
- 'ensure_apache.service_restart'
- name: 'flush handlers'
ansible.builtin.meta: 'flush_handlers'
...
- ensure_apache.package_facts
- ensure_apache.service_facts
- ensure_apache.service_reload
- ensure_apache.service_restart
- name: flush handlers
ansible.builtin.meta: flush_handlers
+1 -2
View File
@@ -1,5 +1,4 @@
---
- hosts: localhost
remote_user: root
roles:
- ensure_apache
roles: [ensure_apache]
+209 -179
View File
@@ -1,229 +1,259 @@
---
# vars file for ensure_apache
package_list:
- name: 'httpd'
state: 'present'
- name: 'httpd-filesystem'
state: 'present'
- name: 'httpd-tools'
state: 'present'
- name: 'mod_http2'
state: 'present'
- name: 'mod_md'
state: 'present'
- name: 'mod_ssl'
state: 'present'
- name: 'php'
state: 'present'
- name: 'php-cli'
state: 'present'
- name: 'php-common'
state: 'present'
- name: 'php-fpm'
state: 'present'
- name: 'php-mbstring'
state: 'present'
- name: 'php-mysqlnd'
state: 'present'
- name: 'php-opcache'
state: 'present'
- name: 'php-pdo'
state: 'present'
- name: 'php-sodium'
state: 'present'
- name: 'php-xml'
state: 'present'
- name: httpd
state: present
- name: httpd-filesystem
state: present
- name: httpd-tools
state: present
- name: mod_http2
state: present
- name: mod_md
state: present
- name: mod_ssl
state: present
- name: php
state: present
- name: php-cli
state: present
- name: php-common
state: present
- name: php-fpm
state: present
- name: php-mbstring
state: present
- name: php-mysqlnd
state: present
- name: php-opcache
state: present
- name: php-pdo
state: present
- name: php-sodium
state: present
- name: php-xml
state: present
firewall_list:
- permanent: 'yes'
service: 'http'
state: 'enabled'
service: http
state: enabled
- permanent: 'yes'
service: 'https'
state: 'enabled'
service: https
state: enabled
permission_list:
- path: '/etc/httpd/md'
group: 'apache'
owner: 'root'
- path: /etc/httpd/md
group: apache
owner: root
mode: '0770'
state: 'directory'
setype: 'httpd_var_lib_t'
state: directory
setype: httpd_var_lib_t
seboolean_list:
- name: 'httpd_can_network_connect'
- name: httpd_can_network_connect
persistent: 'yes'
state: 'yes'
- name: 'httpd_can_network_connect_db'
- name: httpd_can_network_connect_db
persistent: 'yes'
state: 'yes'
service_list:
- name: 'httpd.service'
state: 'started'
- name: httpd.service
state: started
enabled: 'yes'
- name: 'httpd-reload.timer'
state: 'started'
- name: httpd-reload.timer
state: started
enabled: 'yes'
- name: 'php-fpm.service'
state: 'started'
- name: php-fpm.service
state: started
enabled: 'yes'
template_list:
- dest: '/etc/httpd/conf.d/autoindex.conf'
group: 'root'
- dest: /etc/httpd/conf.d/autoindex.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/autoindex.conf'
- dest: '/etc/httpd/conf.d/README'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/autoindex.conf'
- dest: /etc/httpd/conf.d/README
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/README'
- dest: '/etc/httpd/conf.d/vhost.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/README'
- dest: /etc/httpd/conf.d/vhost.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/vhost.conf'
- dest: '/etc/httpd/conf.d/ssl.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/vhost.conf'
- dest: /etc/httpd/conf.d/ssl.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/ssl.conf'
- dest: '/etc/httpd/conf.d/userdir.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/ssl.conf'
- dest: /etc/httpd/conf.d/userdir.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/userdir.conf'
- dest: '/etc/httpd/conf.d/welcome.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/userdir.conf'
- dest: /etc/httpd/conf.d/welcome.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/welcome.conf'
- dest: '/etc/httpd/conf/httpd.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/welcome.conf'
- dest: /etc/httpd/conf/httpd.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf/httpd.conf'
- dest: '/etc/httpd/conf/magic'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf/httpd.conf'
- dest: /etc/httpd/conf/magic
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf/magic'
- dest: '/etc/httpd/conf.modules.d/00-base.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf/magic'
- dest: /etc/httpd/conf.modules.d/00-base.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-base.conf'
- dest: '/etc/httpd/conf.modules.d/00-brotli.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-base.conf'
- dest: /etc/httpd/conf.modules.d/00-brotli.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-brotli.conf'
- dest: '/etc/httpd/conf.modules.d/00-dav.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-brotli.conf'
- dest: /etc/httpd/conf.modules.d/00-dav.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-dav.conf'
- dest: '/etc/httpd/conf.modules.d/00-lua.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-dav.conf'
- dest: /etc/httpd/conf.modules.d/00-lua.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-lua.conf'
- dest: '/etc/httpd/conf.modules.d/00-mpm.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-lua.conf'
- dest: /etc/httpd/conf.modules.d/00-mpm.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-mpm.conf'
- dest: '/etc/httpd/conf.modules.d/00-optional.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-mpm.conf'
- dest: /etc/httpd/conf.modules.d/00-optional.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-optional.conf'
- dest: '/etc/httpd/conf.modules.d/00-proxy.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-optional.conf'
- dest: /etc/httpd/conf.modules.d/00-proxy.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-proxy.conf'
- dest: '/etc/httpd/conf.modules.d/00-ssl.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-proxy.conf'
- dest: /etc/httpd/conf.modules.d/00-ssl.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-ssl.conf'
- dest: '/etc/httpd/conf.modules.d/00-systemd.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-ssl.conf'
- dest: /etc/httpd/conf.modules.d/00-systemd.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-systemd.conf'
- dest: '/etc/httpd/conf.modules.d/01-cgi.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-systemd.conf'
- dest: /etc/httpd/conf.modules.d/01-cgi.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/01-cgi.conf'
- dest: '/etc/httpd/conf.modules.d/01-md.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/01-cgi.conf'
- dest: /etc/httpd/conf.modules.d/01-md.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/01-md.conf'
- dest: '/etc/httpd/conf.modules.d/10-h2.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/01-md.conf'
- dest: /etc/httpd/conf.modules.d/10-h2.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/10-h2.conf'
- dest: '/etc/httpd/conf.modules.d/10-proxy_h2.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/10-h2.conf'
- dest: /etc/httpd/conf.modules.d/10-proxy_h2.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/10-proxy_h2.conf'
- dest: '/etc/httpd/conf.modules.d/README'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/10-proxy_h2.conf'
- dest: /etc/httpd/conf.modules.d/README
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/README'
- dest: '/etc/logrotate.d/httpd'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/README'
- dest: /etc/logrotate.d/httpd
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/logrotate.d/httpd'
- dest: '/etc/sysconfig/htcacheclean'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/logrotate.d/httpd'
- dest: /etc/sysconfig/htcacheclean
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/sysconfig/htcacheclean'
- dest: '/usr/lib/systemd/system/htcacheclean.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/sysconfig/htcacheclean'
- dest: /usr/lib/systemd/system/htcacheclean.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/htcacheclean.service'
- dest: '/usr/lib/systemd/system/httpd.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/htcacheclean.service'
- dest: /usr/lib/systemd/system/httpd.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd.service'
- dest: '/usr/lib/systemd/system/httpd.socket'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd.service'
- dest: /usr/lib/systemd/system/httpd.socket
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd.socket'
- dest: '/usr/lib/systemd/system/httpd-init.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd.socket'
- dest: /usr/lib/systemd/system/httpd-init.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd-init.service'
- dest: '/usr/lib/systemd/system/httpd-reload.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd-init.service'
- dest: /usr/lib/systemd/system/httpd-reload.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd-reload.service'
- dest: '/usr/lib/systemd/system/httpd-reload.timer'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd-reload.service'
- dest: /usr/lib/systemd/system/httpd-reload.timer
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd-reload.timer'
- dest: '/usr/lib/systemd/system/httpd@.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd-reload.timer'
- dest: /usr/lib/systemd/system/httpd@.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd@.service'
- dest: '/usr/lib/systemd/system/httpd.socket.d/10-listen443.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd@.service'
- dest: /usr/lib/systemd/system/httpd.socket.d/10-listen443.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd.socket.d/10-listen443.conf'
...
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd.socket.d/10-listen443.conf'
+209 -179
View File
@@ -1,229 +1,259 @@
---
# vars file for ensure_apache
package_list:
- name: 'httpd'
state: 'present'
- name: 'httpd-filesystem'
state: 'present'
- name: 'httpd-tools'
state: 'present'
- name: 'mod_http2'
state: 'present'
- name: 'mod_md'
state: 'present'
- name: 'mod_ssl'
state: 'present'
- name: 'php'
state: 'present'
- name: 'php-cli'
state: 'present'
- name: 'php-common'
state: 'present'
- name: 'php-fpm'
state: 'present'
- name: 'php-mbstring'
state: 'present'
- name: 'php-mysqlnd'
state: 'present'
- name: 'php-opcache'
state: 'present'
- name: 'php-pdo'
state: 'present'
- name: 'php-sodium'
state: 'present'
- name: 'php-xml'
state: 'present'
- name: httpd
state: present
- name: httpd-filesystem
state: present
- name: httpd-tools
state: present
- name: mod_http2
state: present
- name: mod_md
state: present
- name: mod_ssl
state: present
- name: php
state: present
- name: php-cli
state: present
- name: php-common
state: present
- name: php-fpm
state: present
- name: php-mbstring
state: present
- name: php-mysqlnd
state: present
- name: php-opcache
state: present
- name: php-pdo
state: present
- name: php-sodium
state: present
- name: php-xml
state: present
firewall_list:
- permanent: 'yes'
service: 'http'
state: 'enabled'
service: http
state: enabled
- permanent: 'yes'
service: 'https'
state: 'enabled'
service: https
state: enabled
permission_list:
- path: '/etc/httpd/md'
group: 'apache'
owner: 'root'
- path: /etc/httpd/md
group: apache
owner: root
mode: '0770'
state: 'directory'
setype: 'httpd_var_lib_t'
state: directory
setype: httpd_var_lib_t
seboolean_list:
- name: 'httpd_can_network_connect'
- name: httpd_can_network_connect
persistent: 'yes'
state: 'yes'
- name: 'httpd_can_network_connect_db'
- name: httpd_can_network_connect_db
persistent: 'yes'
state: 'yes'
service_list:
- name: 'httpd.service'
state: 'started'
- name: httpd.service
state: started
enabled: 'yes'
- name: 'httpd-reload.timer'
state: 'started'
- name: httpd-reload.timer
state: started
enabled: 'yes'
- name: 'php-fpm.service'
state: 'started'
- name: php-fpm.service
state: started
enabled: 'yes'
template_list:
- dest: '/etc/httpd/conf.d/autoindex.conf'
group: 'root'
- dest: /etc/httpd/conf.d/autoindex.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/autoindex.conf'
- dest: '/etc/httpd/conf.d/README'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/autoindex.conf'
- dest: /etc/httpd/conf.d/README
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/README'
- dest: '/etc/httpd/conf.d/vhost.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/README'
- dest: /etc/httpd/conf.d/vhost.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/vhost.conf'
- dest: '/etc/httpd/conf.d/ssl.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/vhost.conf'
- dest: /etc/httpd/conf.d/ssl.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/ssl.conf'
- dest: '/etc/httpd/conf.d/userdir.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/ssl.conf'
- dest: /etc/httpd/conf.d/userdir.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/userdir.conf'
- dest: '/etc/httpd/conf.d/welcome.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/userdir.conf'
- dest: /etc/httpd/conf.d/welcome.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/welcome.conf'
- dest: '/etc/httpd/conf/httpd.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/welcome.conf'
- dest: /etc/httpd/conf/httpd.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf/httpd.conf'
- dest: '/etc/httpd/conf/magic'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf/httpd.conf'
- dest: /etc/httpd/conf/magic
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf/magic'
- dest: '/etc/httpd/conf.modules.d/00-base.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf/magic'
- dest: /etc/httpd/conf.modules.d/00-base.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-base.conf'
- dest: '/etc/httpd/conf.modules.d/00-brotli.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-base.conf'
- dest: /etc/httpd/conf.modules.d/00-brotli.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-brotli.conf'
- dest: '/etc/httpd/conf.modules.d/00-dav.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-brotli.conf'
- dest: /etc/httpd/conf.modules.d/00-dav.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-dav.conf'
- dest: '/etc/httpd/conf.modules.d/00-lua.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-dav.conf'
- dest: /etc/httpd/conf.modules.d/00-lua.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-lua.conf'
- dest: '/etc/httpd/conf.modules.d/00-mpm.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-lua.conf'
- dest: /etc/httpd/conf.modules.d/00-mpm.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-mpm.conf'
- dest: '/etc/httpd/conf.modules.d/00-optional.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-mpm.conf'
- dest: /etc/httpd/conf.modules.d/00-optional.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-optional.conf'
- dest: '/etc/httpd/conf.modules.d/00-proxy.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-optional.conf'
- dest: /etc/httpd/conf.modules.d/00-proxy.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-proxy.conf'
- dest: '/etc/httpd/conf.modules.d/00-ssl.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-proxy.conf'
- dest: /etc/httpd/conf.modules.d/00-ssl.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-ssl.conf'
- dest: '/etc/httpd/conf.modules.d/00-systemd.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-ssl.conf'
- dest: /etc/httpd/conf.modules.d/00-systemd.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-systemd.conf'
- dest: '/etc/httpd/conf.modules.d/01-cgi.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-systemd.conf'
- dest: /etc/httpd/conf.modules.d/01-cgi.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/01-cgi.conf'
- dest: '/etc/httpd/conf.modules.d/01-md.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/01-cgi.conf'
- dest: /etc/httpd/conf.modules.d/01-md.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/01-md.conf'
- dest: '/etc/httpd/conf.modules.d/10-h2.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/01-md.conf'
- dest: /etc/httpd/conf.modules.d/10-h2.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/10-h2.conf'
- dest: '/etc/httpd/conf.modules.d/10-proxy_h2.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/10-h2.conf'
- dest: /etc/httpd/conf.modules.d/10-proxy_h2.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/10-proxy_h2.conf'
- dest: '/etc/httpd/conf.modules.d/README'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/10-proxy_h2.conf'
- dest: /etc/httpd/conf.modules.d/README
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/README'
- dest: '/etc/logrotate.d/httpd'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/README'
- dest: /etc/logrotate.d/httpd
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/logrotate.d/httpd'
- dest: '/etc/sysconfig/htcacheclean'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/logrotate.d/httpd'
- dest: /etc/sysconfig/htcacheclean
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/sysconfig/htcacheclean'
- dest: '/usr/lib/systemd/system/htcacheclean.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/sysconfig/htcacheclean'
- dest: /usr/lib/systemd/system/htcacheclean.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/htcacheclean.service'
- dest: '/usr/lib/systemd/system/httpd.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/htcacheclean.service'
- dest: /usr/lib/systemd/system/httpd.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd.service'
- dest: '/usr/lib/systemd/system/httpd.socket'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd.service'
- dest: /usr/lib/systemd/system/httpd.socket
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd.socket'
- dest: '/usr/lib/systemd/system/httpd-init.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd.socket'
- dest: /usr/lib/systemd/system/httpd-init.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd-init.service'
- dest: '/usr/lib/systemd/system/httpd-reload.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd-init.service'
- dest: /usr/lib/systemd/system/httpd-reload.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd-reload.service'
- dest: '/usr/lib/systemd/system/httpd-reload.timer'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd-reload.service'
- dest: /usr/lib/systemd/system/httpd-reload.timer
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd-reload.timer'
- dest: '/usr/lib/systemd/system/httpd@.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd-reload.timer'
- dest: /usr/lib/systemd/system/httpd@.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd@.service'
- dest: '/usr/lib/systemd/system/httpd.socket.d/10-listen443.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd@.service'
- dest: /usr/lib/systemd/system/httpd.socket.d/10-listen443.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd.socket.d/10-listen443.conf'
...
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd.socket.d/10-listen443.conf'
+214 -183
View File
@@ -1,234 +1,265 @@
---
# vars file for ensure_apache
package_list:
- name: 'httpd'
state: 'present'
- name: 'httpd-filesystem'
state: 'present'
- name: 'httpd-tools'
state: 'present'
- name: 'mod_http2'
state: 'present'
- name: 'mod_md'
state: 'present'
- name: 'mod_ssl'
state: 'present'
- name: 'php'
state: 'present'
- name: 'php-cli'
state: 'present'
- name: 'php-common'
state: 'present'
- name: 'php-fpm'
state: 'present'
- name: 'php-mbstring'
state: 'present'
- name: 'php-mysqlnd'
state: 'present'
- name: 'php-opcache'
state: 'present'
- name: 'php-pdo'
state: 'present'
- name: 'php-sodium'
state: 'present'
- name: 'php-xml'
state: 'present'
- name: httpd
state: present
- name: httpd-filesystem
state: present
- name: httpd-tools
state: present
- name: mod_http2
state: present
- name: mod_md
state: present
- name: mod_ssl
state: present
- name: php
state: present
- name: php-cli
state: present
- name: php-common
state: present
- name: php-fpm
state: present
- name: php-mbstring
state: present
- name: php-mysqlnd
state: present
- name: php-opcache
state: present
- name: php-pdo
state: present
- name: php-sodium
state: present
- name: php-xml
state: present
firewall_list:
- permanent: 'yes'
service: 'http'
state: 'enabled'
service: http
state: enabled
- permanent: 'yes'
service: 'https'
state: 'enabled'
service: https
state: enabled
permission_list:
- path: '/etc/httpd/md'
group: 'apache'
owner: 'root'
- path: /etc/httpd/md
group: apache
owner: root
mode: '0770'
state: 'directory'
setype: 'httpd_var_lib_t'
state: directory
setype: httpd_var_lib_t
seboolean_list:
- name: 'httpd_can_network_connect'
- name: httpd_can_network_connect
persistent: 'yes'
state: 'yes'
- name: 'httpd_can_network_connect_db'
- name: httpd_can_network_connect_db
persistent: 'yes'
state: 'yes'
service_list:
- name: 'httpd.service'
state: 'started'
- name: httpd.service
state: started
enabled: 'yes'
- name: 'httpd-reload.timer'
state: 'started'
- name: httpd-reload.timer
state: started
enabled: 'yes'
- name: 'php-fpm.service'
state: 'started'
- name: php-fpm.service
state: started
enabled: 'yes'
template_list:
- dest: '/etc/httpd/conf.d/autoindex.conf'
group: 'root'
- dest: /etc/httpd/conf.d/autoindex.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/autoindex.conf'
- dest: '/etc/httpd/conf.d/README'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/autoindex.conf'
- dest: /etc/httpd/conf.d/README
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/README'
- dest: '/etc/httpd/conf.d/vhost.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/README'
- dest: /etc/httpd/conf.d/vhost.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/vhost.conf'
- dest: '/etc/httpd/conf.d/ssl.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/vhost.conf'
- dest: /etc/httpd/conf.d/ssl.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/ssl.conf'
- dest: '/etc/httpd/conf.d/userdir.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/ssl.conf'
- dest: /etc/httpd/conf.d/userdir.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/userdir.conf'
- dest: '/etc/httpd/conf.d/welcome.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/userdir.conf'
- dest: /etc/httpd/conf.d/welcome.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.d/welcome.conf'
- dest: '/etc/httpd/conf/httpd.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.d/welcome.conf'
- dest: /etc/httpd/conf/httpd.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf/httpd.conf'
- dest: '/etc/httpd/conf/magic'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf/httpd.conf'
- dest: /etc/httpd/conf/magic
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf/magic'
- dest: '/etc/httpd/conf.modules.d/00-base.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf/magic'
- dest: /etc/httpd/conf.modules.d/00-base.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-base.conf'
- dest: '/etc/httpd/conf.modules.d/00-brotli.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-base.conf'
- dest: /etc/httpd/conf.modules.d/00-brotli.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-brotli.conf'
- dest: '/etc/httpd/conf.modules.d/00-dav.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-brotli.conf'
- dest: /etc/httpd/conf.modules.d/00-dav.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-dav.conf'
- dest: '/etc/httpd/conf.modules.d/00-lua.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-dav.conf'
- dest: /etc/httpd/conf.modules.d/00-lua.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-lua.conf'
- dest: '/etc/httpd/conf.modules.d/00-mpm.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-lua.conf'
- dest: /etc/httpd/conf.modules.d/00-mpm.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-mpm.conf'
- dest: '/etc/httpd/conf.modules.d/00-optional.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-mpm.conf'
- dest: /etc/httpd/conf.modules.d/00-optional.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-optional.conf'
- dest: '/etc/httpd/conf.modules.d/00-proxy.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-optional.conf'
- dest: /etc/httpd/conf.modules.d/00-proxy.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-proxy.conf'
- dest: '/etc/httpd/conf.modules.d/00-ssl.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-proxy.conf'
- dest: /etc/httpd/conf.modules.d/00-ssl.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-ssl.conf'
- dest: '/etc/httpd/conf.modules.d/00-systemd.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-ssl.conf'
- dest: /etc/httpd/conf.modules.d/00-systemd.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/00-systemd.conf'
- dest: '/etc/httpd/conf.modules.d/01-cgi.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/00-systemd.conf'
- dest: /etc/httpd/conf.modules.d/01-cgi.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/01-cgi.conf'
- dest: '/etc/httpd/conf.modules.d/01-md.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/01-cgi.conf'
- dest: /etc/httpd/conf.modules.d/01-md.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/01-md.conf'
- dest: '/etc/httpd/conf.modules.d/10-h2.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/01-md.conf'
- dest: /etc/httpd/conf.modules.d/10-h2.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/10-h2.conf'
- dest: '/etc/httpd/conf.modules.d/10-proxy_h2.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/10-h2.conf'
- dest: /etc/httpd/conf.modules.d/10-proxy_h2.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/10-proxy_h2.conf'
- dest: '/etc/httpd/conf.modules.d/README'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/10-proxy_h2.conf'
- dest: /etc/httpd/conf.modules.d/README
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/httpd/conf.modules.d/README'
- dest: '/etc/logrotate.d/httpd'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/httpd/conf.modules.d/README'
- dest: /etc/logrotate.d/httpd
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/logrotate.d/httpd'
- dest: '/etc/sysconfig/htcacheclean'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/logrotate.d/httpd'
- dest: /etc/sysconfig/htcacheclean
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/etc/sysconfig/htcacheclean'
- dest: '/usr/lib/systemd/system/htcacheclean.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/sysconfig/htcacheclean'
- dest: /usr/lib/systemd/system/htcacheclean.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/htcacheclean.service'
- dest: '/usr/lib/systemd/system/httpd.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/htcacheclean.service'
- dest: /usr/lib/systemd/system/httpd.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd.service'
- dest: '/usr/lib/systemd/system/httpd.socket'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd.service'
- dest: /usr/lib/systemd/system/httpd.socket
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd.socket'
- dest: '/usr/lib/systemd/system/httpd-init.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd.socket'
- dest: /usr/lib/systemd/system/httpd-init.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd-init.service'
- dest: '/usr/lib/systemd/system/httpd-reload.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd-init.service'
- dest: /usr/lib/systemd/system/httpd-reload.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd-reload.service'
- dest: '/usr/lib/systemd/system/httpd-reload.timer'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd-reload.service'
- dest: /usr/lib/systemd/system/httpd-reload.timer
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd-reload.timer'
- dest: '/usr/lib/systemd/system/httpd@.service'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd-reload.timer'
- dest: /usr/lib/systemd/system/httpd@.service
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd@.service'
- dest: '/usr/lib/systemd/system/httpd.service.d/php-fpm.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd@.service'
- dest: /usr/lib/systemd/system/httpd.service.d/php-fpm.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd.service.d/php-fpm.conf'
- dest: '/usr/lib/systemd/system/httpd.socket.d/10-listen443.conf'
group: 'root'
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd.service.d/php-fpm.conf'
- dest: /usr/lib/systemd/system/httpd.socket.d/10-listen443.conf
group: root
mode: '0644'
owner: 'root'
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] }}/usr/lib/systemd/system/httpd.socket.d/10-listen443.conf'
...
owner: root
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/httpd.socket.d/10-listen443.conf'
+1 -1
View File
@@ -1,2 +1,2 @@
---
# vars file for ensure_apache
...
+1 -1
View File
@@ -1,2 +1,2 @@
---
# vars file for ensure_apache
...