From caf80bd1614cdc1f9ba8c62e23f3c0bf4e6ae4a3 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 8 Dec 2020 16:00:06 +0100 Subject: [PATCH] Update to 2020-12-08 16:00 --- roles/diagrams/meta/main.yml | 5 +++ roles/diagrams/templates/server.xml.j2 | 2 +- roles/glpi/tasks/install.yml | 7 +++- roles/httpd_php/defaults/main.yml | 3 +- roles/kanboard/defaults/main.yml | 2 +- roles/kanboard/tasks/install.yml | 1 - roles/matomo/tasks/conf.yml | 6 +++ roles/matomo/tasks/install.yml | 7 +++- roles/matrix_synapse/defaults/main.yml | 2 +- roles/matrix_synapse/tasks/install.yml | 1 + .../repo_base/templates/postgresql-client.repo.j2 | 10 +++++ roles/repo_lux/tasks/main.yml | 46 ++++++++++++++++++++++ roles/repo_wapt/tasks/main.yml | 3 +- roles/transmission_daemon/tasks/main.yml | 1 + 14 files changed, 88 insertions(+), 8 deletions(-) create mode 100644 roles/repo_base/templates/postgresql-client.repo.j2 create mode 100644 roles/repo_lux/tasks/main.yml diff --git a/roles/diagrams/meta/main.yml b/roles/diagrams/meta/main.yml index cd21505..5a1ad60 100644 --- a/roles/diagrams/meta/main.yml +++ b/roles/diagrams/meta/main.yml @@ -1,2 +1,7 @@ --- +dependencies: + - role: repo_lux # EL8 doesn't have tomcat anymore + when: + - ansible_os_family == 'RedHat' + - ansible_distribution_major_version is version('8','>=') diff --git a/roles/diagrams/templates/server.xml.j2 b/roles/diagrams/templates/server.xml.j2 index af5c60f..7a98284 100644 --- a/roles/diagrams/templates/server.xml.j2 +++ b/roles/diagrams/templates/server.xml.j2 @@ -1,7 +1,7 @@ - + diff --git a/roles/glpi/tasks/install.yml b/roles/glpi/tasks/install.yml index 4502b32..f7f9c5e 100644 --- a/roles/glpi/tasks/install.yml +++ b/roles/glpi/tasks/install.yml @@ -96,6 +96,9 @@ - db_pass: "{{ glpi_mysql_pass }}" tags: glpi +- set_fact: glpi_db_created={{ db_created }} + tags: glpi + - name: Create a safer MySQL schema file shell: grep -v 'DROP TABLE' {{ glpi_root_dir }}/web/install/mysql/glpi-empty.sql > {{ glpi_root_dir }}/tmp/glpi.sql when: glpi_install_mode == 'install' @@ -109,7 +112,9 @@ login_host: "{{ glpi_mysql_server }}" login_user: sqladmin login_password: "{{ mysql_admin_pass }}" - when: glpi_install_mode == 'install' + when: + - glpi_install_mode == 'install' + - glpi_db_created.changed tags: glpi - name: Deploy cron task diff --git a/roles/httpd_php/defaults/main.yml b/roles/httpd_php/defaults/main.yml index 9104e7a..9992547 100644 --- a/roles/httpd_php/defaults/main.yml +++ b/roles/httpd_php/defaults/main.yml @@ -11,7 +11,7 @@ httpd_php_common_modules: - opcache - fpm - mbstring - - mysql + - mysqlnd - pgsql - json - bcmath @@ -31,6 +31,7 @@ httpd_php_versions: - 72 - 73 - 74 + - 80 httpd_php_default_version: 73 diff --git a/roles/kanboard/defaults/main.yml b/roles/kanboard/defaults/main.yml index cb61e24..2d78ac7 100644 --- a/roles/kanboard/defaults/main.yml +++ b/roles/kanboard/defaults/main.yml @@ -4,7 +4,7 @@ kanboard_id: "1" kanboard_manage_upgrade: True kanboard_version: '1.2.16' kanboard_zip_url: https://github.com/kanboard/kanboard/archive/v{{ kanboard_version }}.zip -kanboard_zip_sha1: b26b19e79029ee4371494840d61c4646d9b77390 +kanboard_zip_sha1: 886ba5045107e3ebbb51ac2145257c6beda7ab4c # enabled prop for the ReverseProxyLdap plugin is managed automatically # True if kanboard_ldap_auth and kanboard_proxy_auth are both True, or # False otherwise diff --git a/roles/kanboard/tasks/install.yml b/roles/kanboard/tasks/install.yml index 368f90d..1066b84 100644 --- a/roles/kanboard/tasks/install.yml +++ b/roles/kanboard/tasks/install.yml @@ -4,7 +4,6 @@ yum: name: - unzip - - MySQL-python - tar - acl tags: kanboard diff --git a/roles/matomo/tasks/conf.yml b/roles/matomo/tasks/conf.yml index 62a5018..0ad1aef 100644 --- a/roles/matomo/tasks/conf.yml +++ b/roles/matomo/tasks/conf.yml @@ -132,3 +132,9 @@ changed_when: False tags: matomo +- import_tasks: ../includes/webapps_webconf.yml + vars: + - app_id: matomo_{{ glpi_id }} + - php_version: "{{ matomo_php_version }}" + - php_fpm_pool: "{{ matomo_php_fpm_pool | default('') }}" + tags: matomo diff --git a/roles/matomo/tasks/install.yml b/roles/matomo/tasks/install.yml index 2fc62bc..d0726a9 100644 --- a/roles/matomo/tasks/install.yml +++ b/roles/matomo/tasks/install.yml @@ -118,6 +118,9 @@ - db_pass: "{{ matomo_db_pass }}" tags: matomo +- set_fact: matomo_db_created={{ db_created }} + tags: matomo + - name: Copy the DB structure copy: src=matomo.sql dest={{ matomo_root_dir }}/tmp/matomo.sql when: matomo_install_mode == 'install' @@ -131,7 +134,9 @@ login_password: "{{ mysql_admin_pass }}" name: "{{ matomo_db_name }}" target: "{{ matomo_root_dir }}/tmp/matomo.sql" - when: matomo_install_mode == 'install' + when: + - matomo_install_mode == 'install' + - matomo_db_created.changed tags: matomo - name: Build a list of installed plugins diff --git a/roles/matrix_synapse/defaults/main.yml b/roles/matrix_synapse/defaults/main.yml index a6bf142..fd015f5 100644 --- a/roles/matrix_synapse/defaults/main.yml +++ b/roles/matrix_synapse/defaults/main.yml @@ -91,7 +91,7 @@ synapse_turn_allow_guests: True synapse_email_notifs: True synapse_smtp_from: "Your Friendly %(app)s Home Server " synapse_app_name: Matrix -#synapse_riot_base_url: https://messenger.example.com +#synapse_element_base_url: https://messenger.example.com # Log level synapse_log_level: ERROR diff --git a/roles/matrix_synapse/tasks/install.yml b/roles/matrix_synapse/tasks/install.yml index 79d1bac..6bf6d7b 100644 --- a/roles/matrix_synapse/tasks/install.yml +++ b/roles/matrix_synapse/tasks/install.yml @@ -103,5 +103,6 @@ - name: Reset SELinux contexts command: restorecon -R {{ synapse_root_dir }} + changed_when: False when: ansible_selinux.status == 'enabled' tags: matrix diff --git a/roles/repo_base/templates/postgresql-client.repo.j2 b/roles/repo_base/templates/postgresql-client.repo.j2 new file mode 100644 index 0000000..36dd6ac --- /dev/null +++ b/roles/repo_base/templates/postgresql-client.repo.j2 @@ -0,0 +1,10 @@ +[postgresql-client] +baseurl = https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-$releasever-$basearch +gpgcheck = 1 +gpgkey = https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-13 +name = PostgreSQL Client +includepkgs = postgresql13 postgresql13-libs +{% if ansible_os_family == 'RedHat' and ansible_distribution_major_version is version('8', '>=') %} +# Workaround a bug in dnf which would make the default module mask packages from postgres repo +module_hotfixes = true +{% endif %} diff --git a/roles/repo_lux/tasks/main.yml b/roles/repo_lux/tasks/main.yml new file mode 100644 index 0000000..e27ba27 --- /dev/null +++ b/roles/repo_lux/tasks/main.yml @@ -0,0 +1,46 @@ +--- + +- name: Deploy Lux GPG Key + copy: + content: | + -----BEGIN PGP PUBLIC KEY BLOCK----- + Version: GnuPG v1.2.6 (GNU/Linux) + + mQGiBEHKmaIRBADglFjC9YNuo8I2XVkHzwTyq2sWjTLzak1LDz23ZWaYNlRap/WJ + 46/XKbv/0YzREOt3tx2ynEqf8RUtcoILOMyzTp5K3WlQwiqFfSPXNZDnuaKGTK7B + Mc0I7DtSR72brFaigb1dSAe6Ubrnc99kgDBhFyK7opsV2s9GyPkcb1RyMwCghsiF + 7y5RnWb1A1vJjzctWkkDa2UEAKjgaM1yr4SmFmSYzqyMno9kdzXpsmR00D1U5noh + lsUPNZ940kf1u0xr232ETqrQUMcpY+9OXOCifq298I7BjJhZ+3JrnnHEHY4EQtqM + jK8EdPUlyV12HXlxJcWLPTtKrb1f8MJkyf2IXZsdKKh97nlnszO6xWQ/SIN77i5f + Dx8iBADYTt2WRI1pz/t/ArlZJtN2g5PJuGsajeiNZPO6Czfrd3dBeV7wxlR0z+ZX + 5pPhOE2xG30P/mOGxTRrb9/6LgiDk4RykFHdCsZaehDj47OvWF/KvSrFm4rVQ+uX + YUumBQJJ3dl6kNnhv8KkC4IaaJUyh7uH7BxfhtmPajNbrlreUL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-LUX + tags: repo + +- name: Configure lux repository + yum_repository: + name: lux + description: CentOS $releasever - $basearch - Lux + baseurl: http://repo.iotti.biz/CentOS/$releasever + gpgcheck: True + gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LUX + tags: repo diff --git a/roles/repo_wapt/tasks/main.yml b/roles/repo_wapt/tasks/main.yml index 98980e7..a08194b 100644 --- a/roles/repo_wapt/tasks/main.yml +++ b/roles/repo_wapt/tasks/main.yml @@ -3,6 +3,7 @@ yum_repository: name: wapt description: WAPT - baseurl: https://wapt.tranquil.it/centos7/wapt-{{ wapt_version }}/ + baseurl: https://wapt.tranquil.it/centos$releasever/wapt-{{ wapt_version }}/ gpgcheck: False + tags: repo,wapt diff --git a/roles/transmission_daemon/tasks/main.yml b/roles/transmission_daemon/tasks/main.yml index 706e427..6335e4c 100644 --- a/roles/transmission_daemon/tasks/main.yml +++ b/roles/transmission_daemon/tasks/main.yml @@ -14,6 +14,7 @@ - finished - incomplete - watch + failed_when: False # can fail if a fuse based FS is mounted here tags: torrent - name: Deploy default config