redhat/almalinux
This commit is contained in:
parent
726b6dc279
commit
37f4e28f8b
@ -14,13 +14,13 @@
|
||||
setype: httpd_sys_rw_content_t
|
||||
target: "/var/www/.*"
|
||||
when:
|
||||
- ansible_distribution == "RedHat"
|
||||
- ansible_distribution == "RedHat" or ansible_distribution == "AlmaLinux"
|
||||
- ansible_selinux.status == 'enabled'
|
||||
|
||||
- name: /var/www restorecon
|
||||
command: "restorecon -r /var/www"
|
||||
when:
|
||||
- ansible_distribution == "RedHat"
|
||||
- ansible_distribution == "RedHat" or ansible_distribution == "AlmaLinux"
|
||||
- ansible_selinux.status == 'enabled'
|
||||
|
||||
- name: www subdirs
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
- name: include redhat specific
|
||||
include_tasks: redhat.yml
|
||||
when: ansible_distribution == "RedHat"
|
||||
when: ansible_distribution == "RedHat" or ansible_distribution == "AlmaLinux"
|
||||
|
||||
- name: conf-available templates
|
||||
template:
|
||||
@ -84,7 +84,9 @@
|
||||
when:
|
||||
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 11) or
|
||||
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20) or
|
||||
ansible_distribution == "RedHat"
|
||||
ansible_distribution == "RedHat" or
|
||||
ansible_distribution == "AlmaLinux"
|
||||
|
||||
|
||||
|
||||
# vim: set tabstop=2 shiftwidth=2 expandtab smarttab:
|
||||
|
||||
@ -1,15 +1,14 @@
|
||||
---
|
||||
- name: set phpver for rhel9
|
||||
- name: set phpver for rhel9-99
|
||||
set_fact:
|
||||
phpver: "84"
|
||||
when:
|
||||
- ansible_distribution == "RedHat"
|
||||
- ansible_distribution_major_version|int() == 9
|
||||
- ansible_distribution_major_version|int() >= 9
|
||||
|
||||
- name: install remi repo
|
||||
tags: dnf
|
||||
dnf:
|
||||
name: "https://rpms.remirepo.net/enterprise/remi-release-9.rpm"
|
||||
name: "https://rpms.remirepo.net/enterprise/remi-release-{{ ansible_distribution_major_version }}.rpm"
|
||||
disable_gpg_check: yes
|
||||
|
||||
#- name: dnf module php [phpver]
|
||||
@ -24,8 +23,29 @@
|
||||
name:
|
||||
- httpd
|
||||
- mod_ssl
|
||||
- mysql
|
||||
|
||||
- name: install packages, rhel9
|
||||
tags: dnf
|
||||
dnf:
|
||||
name:
|
||||
- redis
|
||||
- mysql
|
||||
when:
|
||||
- ansible_distribution_major_version|int() == 9
|
||||
|
||||
- name: install packages, rhel10-99
|
||||
tags: dnf
|
||||
dnf:
|
||||
name:
|
||||
- valkey
|
||||
- mysql8.4
|
||||
when:
|
||||
- ansible_distribution_major_version|int() >= 10
|
||||
|
||||
- name: install php packages
|
||||
tags: dnf
|
||||
dnf:
|
||||
name:
|
||||
- "php{{ phpver }}-php-fpm"
|
||||
- "php{{ phpver }}-php-cli"
|
||||
- "php{{ phpver }}-php-bcmath"
|
||||
@ -52,6 +72,15 @@
|
||||
systemd_service:
|
||||
name: redis
|
||||
enabled: true
|
||||
when:
|
||||
- ansible_distribution_major_version|int() == 9
|
||||
|
||||
- name: enable valkey service
|
||||
systemd_service:
|
||||
name: valkey
|
||||
enabled: true
|
||||
when:
|
||||
- ansible_distribution_major_version|int() >= 10
|
||||
|
||||
- name: enable php-fpm service [phpver]
|
||||
systemd_service:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#<VirtualHost *:80>
|
||||
{% if ansible_distribution == "RedHat" %}
|
||||
{% if ansible_distribution == "RedHat" or ansible_distribution == "AlmaLinux" %}
|
||||
# ErrorLog /var/log/httpd/notls.log
|
||||
# CustomLog /var/log/httpd/notls.log detailed
|
||||
{% else %}
|
||||
@ -20,7 +20,7 @@
|
||||
<VirtualHost *:80>
|
||||
DocumentRoot /var/www/def/public
|
||||
|
||||
{% if ansible_distribution == "RedHat" %}
|
||||
{% if ansible_distribution == "RedHat" or ansible_distribution == "AlmaLinux" %}
|
||||
ErrorLog /var/log/httpd/error.log
|
||||
CustomLog /var/log/httpd/access.log detailed
|
||||
{% else %}
|
||||
@ -33,7 +33,7 @@
|
||||
Require all granted
|
||||
</Directory>
|
||||
<Files "*.php">
|
||||
{% if ansible_distribution == "RedHat" %}
|
||||
{% if ansible_distribution == "RedHat" or ansible_distribution == "AlmaLinux" %}
|
||||
SetHandler "proxy:unix:/var/opt/remi/php{{ phpver }}/run/php-fpm/www.sock|fcgi://localhost"
|
||||
{% else %}
|
||||
SetHandler "proxy:unix:/run/php/php{{ phpver }}-fpm.sock|fcgi://localhost"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Define an access log for VirtualHosts that don't define their own logfile
|
||||
#CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined
|
||||
{% if ansible_distribution == "RedHat" %}
|
||||
{% if ansible_distribution == "RedHat" or ansible_distribution == "AlmaLinux" %}
|
||||
CustomLog /var/log/httpd/other_vhosts_access.log detailed
|
||||
{% else %}
|
||||
CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log detailed
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user