Actualización para soportar CentOS 9 Stream
- Actualización para soportar CentOS 9 Stream - Corrección de configuración de dirección IP para posgresql - Corrección para usar usuario y contraseña en Redis 6
This commit is contained in:
parent
8cc2e23ccc
commit
f5799242f9
5 changed files with 55 additions and 24 deletions
|
@ -35,6 +35,8 @@
|
|||
- php-zip
|
||||
- python3-pyOpenSSL
|
||||
- sudo
|
||||
- tar
|
||||
- bzip2
|
||||
|
||||
- name: Create nextcloud nginx configuration directory
|
||||
ansible.builtin.file:
|
||||
|
@ -57,7 +59,7 @@
|
|||
get_url:
|
||||
url: https://repos.libreoffice.gob.mx/nextcloud/nextcloud-{{nextcloud_version}}.tar.bz2
|
||||
dest: /usr/src/nextcloud-{{nextcloud_version}}.tar.bz2
|
||||
checksum: "{{ nextcloud_checksum }}"
|
||||
checksum: "sha256:https://repos.libreoffice.gob.mx/nextcloud/nextcloud-{{nextcloud_version}}.tar.bz2.sha256"
|
||||
when:
|
||||
nextcloud_is_unpacked.stat.exists != true and ansible_local['nextcloud']['is_installed'] != true
|
||||
|
||||
|
@ -251,7 +253,7 @@
|
|||
/usr/bin/php {{ nextcloud_occ }} config:system:set redis host --value={{ redis_host }}
|
||||
/usr/bin/php {{ nextcloud_occ }} config:system:set redis port --value=6379
|
||||
/usr/bin/php {{ nextcloud_occ }} config:system:set redis dbindex --value=0
|
||||
#/usr/bin/php {{ nextcloud_occ }} config:system:set redis password user --value={{ redis_user }}
|
||||
/usr/bin/php {{ nextcloud_occ }} config:system:set redis password user --value={{ redis_user }}
|
||||
#/usr/bin/php {{ nextcloud_occ }} config:system:set redis password password --value={{ redis_password }}
|
||||
/usr/bin/php {{ nextcloud_occ }} config:system:set redis password --value={{ redis_password }}
|
||||
become: true
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
blockinfile:
|
||||
dest: "{{ postgresql_conf }}"
|
||||
block: |
|
||||
listen_addresses = '{{ ansible_default_ipv4.address }}'
|
||||
listen_addresses = '{{ db_host }}'
|
||||
tags:
|
||||
- database
|
||||
- database_access
|
||||
|
|
|
@ -1,38 +1,66 @@
|
|||
- name: "Install Remi repo GPG key"
|
||||
rpm_key:
|
||||
state: present
|
||||
key: https://rpms.remirepo.net/RPM-GPG-KEY-remi2018
|
||||
#key: https://rpms.remirepo.net/RPM-GPG-KEY-remi
|
||||
when: ansible_facts['distribution'] == 'CentOS'
|
||||
- name: Enable The CRB Repository
|
||||
ansible.builtin.command: /usr/bin/dnf config-manager --set-enabled crb
|
||||
|
||||
#- name: "Install Remi repo GPG key"
|
||||
# rpm_key:
|
||||
# state: present
|
||||
# key: https://rpms.remirepo.net/RPM-GPG-KEY-remi2018
|
||||
# #key: https://rpms.remirepo.net/RPM-GPG-KEY-remi
|
||||
# when:
|
||||
# - ansible_os_family == 'RedHat'
|
||||
# - ansible_distribution_major_version|int < 9
|
||||
# - ansible_distribution != 'Fedora'
|
||||
|
||||
- name: Install EPEL
|
||||
package:
|
||||
name:
|
||||
- epel-release
|
||||
state: latest
|
||||
when: ansible_facts['distribution'] == 'CentOS'
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- ansible_distribution != 'Fedora'
|
||||
|
||||
- name: Install REMI repository
|
||||
- name: Remi::Install REMI repository
|
||||
dnf:
|
||||
name:
|
||||
- https://rpms.remirepo.net/enterprise/remi-release-8.rpm
|
||||
- "https://rpms.remirepo.net/enterprise/remi-release-{{ansible_distribution_major_version}}.rpm"
|
||||
state: latest
|
||||
disable_gpg_check: yes
|
||||
when: ansible_facts['distribution'] == 'CentOS'
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- ansible_distribution != 'Fedora'
|
||||
|
||||
# TODO: ya está en módulos de centos 8, modificar esto para usarlo
|
||||
- name: Enable the PHP remi repository
|
||||
dnf:
|
||||
name: '@php:remi-7.4'
|
||||
state: present
|
||||
# EPEL 8 does not support modules properly so we have to use Remi's repo for
|
||||
# php-pecl-redis to be available
|
||||
# https://docs.nextcloud.com/server/latest/admin_manual/installation/example_centos.html
|
||||
when: ansible_facts['distribution'] == 'CentOS'
|
||||
#- name: Enable the PHP remi repository
|
||||
# dnf:
|
||||
# name: '@php:remi-7.4'
|
||||
# state: present
|
||||
# # EPEL 8 does not support modules properly so we have to use Remi's repo for
|
||||
# # php-pecl-redis to be available
|
||||
# # https://docs.nextcloud.com/server/latest/admin_manual/installation/example_centos.html
|
||||
# when:
|
||||
# - ansible_os_family == 'RedHat'
|
||||
# - ansible_distribution_major_version|int < 9
|
||||
# - ansible_distribution != 'Fedora'
|
||||
|
||||
- name: Remi::Reset PHP module
|
||||
ansible.builtin.command: /usr/bin/dnf -y module reset php
|
||||
|
||||
- name: Remi::Install PHP {{ php_version }} module
|
||||
ansible.builtin.command: /usr/bin/dnf -y module install php:remi-{{ php_version }}
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- ansible_distribution_major_version|int >= 9
|
||||
- ansible_distribution != 'Fedora'
|
||||
|
||||
- name: Remi::Update old versions
|
||||
ansible.builtin.command: /usr/bin/dnf -y update
|
||||
|
||||
- name: Enable the Redis 6 module
|
||||
dnf:
|
||||
name: '@redis:6'
|
||||
state: present
|
||||
when: ansible_facts['distribution'] == 'CentOS'
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- ansible_distribution_major_version|int < 9
|
||||
- ansible_distribution != 'Fedora'
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
src: certificates/redis_key.pem
|
||||
dest: "{{ redis_key }}"
|
||||
owner: root
|
||||
group: nginx
|
||||
group: redis
|
||||
mode: '0640'
|
||||
|
||||
- name: Copy the redis Certificate to /etc/pki/tls/certs/
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
## version
|
||||
nextcloud_version: 24.0.6
|
||||
nextcloud_checksum: "sha256:b26dff9980a47e7e722805fdbbf87e07f59a3817b03ecc32698e028e9baf0301"
|
||||
php_version: 8.1
|
||||
|
||||
## credentials
|
||||
nextcloud_admin_user: el_admin
|
||||
|
|
Loading…
Reference in a new issue