From 8f4bcccbc39873af6f8f44735450f136a881af53 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Wed, 26 Apr 2023 17:43:26 +0200 Subject: [PATCH 001/182] packweb-apache,nagios-nrpe: add missing task and config fo PHP 8.2 container --- nagios-nrpe/templates/evolix.cfg.j2 | 1 + packweb-apache/tasks/dependencies.yml | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/nagios-nrpe/templates/evolix.cfg.j2 b/nagios-nrpe/templates/evolix.cfg.j2 index 263fde10..c0f97ea7 100644 --- a/nagios-nrpe/templates/evolix.cfg.j2 +++ b/nagios-nrpe/templates/evolix.cfg.j2 @@ -83,6 +83,7 @@ command[check_php-fpm73]=sudo {{ nagios_plugins_directory }}/check_phpfpm_multi command[check_php-fpm74]=sudo {{ nagios_plugins_directory }}/check_phpfpm_multi /var/lib/lxc/php74/rootfs/etc/php/7.4/fpm/pool.d/ command[check_php-fpm80]=sudo {{ nagios_plugins_directory }}/check_phpfpm_multi /var/lib/lxc/php80/rootfs/etc/php/8.0/fpm/pool.d/ command[check_php-fpm81]=sudo {{ nagios_plugins_directory }}/check_phpfpm_multi /var/lib/lxc/php81/rootfs/etc/php/8.1/fpm/pool.d/ +command[check_php-fpm82]=sudo {{ nagios_plugins_directory }}/check_phpfpm_multi /var/lib/lxc/php82/rootfs/etc/php/8.2/fpm/pool.d/ command[check_ipmi_sensors]=sudo /usr/lib/nagios/plugins/check_ipmi_sensor command[check_raid_status]=/usr/lib/nagios/plugins/check_raid command[check_dhcp_pool]={{ nagios_plugins_directory }}/check_dhcp_pool diff --git a/packweb-apache/tasks/dependencies.yml b/packweb-apache/tasks/dependencies.yml index cd0efd40..bf29b849 100644 --- a/packweb-apache/tasks/dependencies.yml +++ b/packweb-apache/tasks/dependencies.yml @@ -70,6 +70,13 @@ lxc_php_create_mysql_link: True when: "'php81' in packweb_multiphp_versions" +- ansible.builtin.include_role: + name: evolix/lxc-php + vars: + lxc_php_version: php82 + lxc_php_create_mysql_link: True + when: "'php82' in packweb_multiphp_versions" + - ansible.builtin.include_role: name: evolix/webapps/evoadmin-web vars: @@ -77,4 +84,4 @@ evoadmin_multiphp_versions: "{{ packweb_multiphp_versions }}" - include_role: - name: evolix/evoacme \ No newline at end of file + name: evolix/evoacme From 5c60fad29c27a5d850db00793a8df456fccfda1c Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Wed, 26 Apr 2023 18:10:45 +0200 Subject: [PATCH 002/182] evolinux-users: remove Stretch references in tasks that also apply to next Debian versions. --- CHANGELOG.md | 2 ++ evolinux-users/tasks/sudo.yml | 4 ++-- .../tasks/{sudo_stretch_common.yml => sudo_common.yml} | 2 +- evolinux-users/tasks/{sudo_stretch_user.yml => sudo_user.yml} | 0 evolinux-users/templates/{sudoers_stretch.j2 => sudoers.j2} | 0 5 files changed, 5 insertions(+), 3 deletions(-) rename evolinux-users/tasks/{sudo_stretch_common.yml => sudo_common.yml} (95%) rename evolinux-users/tasks/{sudo_stretch_user.yml => sudo_user.yml} (100%) rename evolinux-users/templates/{sudoers_stretch.j2 => sudoers.j2} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0db8d343..afc09df4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,10 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Added ### Changed +* evolinux-users: remove Stretch references in tasks that also apply to next Debian versions. ### Fixed +* packweb-apache,nagios-nrpe: add missing task and config fo PHP 8.2 container ### Removed diff --git a/evolinux-users/tasks/sudo.yml b/evolinux-users/tasks/sudo.yml index 85149147..b3089aab 100644 --- a/evolinux-users/tasks/sudo.yml +++ b/evolinux-users/tasks/sudo.yml @@ -11,9 +11,9 @@ - block: - - ansible.builtin.include: sudo_stretch_common.yml + - ansible.builtin.include: sudo_common.yml - - ansible.builtin.include: sudo_stretch_user.yml + - ansible.builtin.include: sudo_user.yml vars: user: "{{ item.value }}" loop: "{{ evolinux_users | dict2items }}" diff --git a/evolinux-users/tasks/sudo_stretch_common.yml b/evolinux-users/tasks/sudo_common.yml similarity index 95% rename from evolinux-users/tasks/sudo_stretch_common.yml rename to evolinux-users/tasks/sudo_common.yml index ba7fb50b..0560f997 100644 --- a/evolinux-users/tasks/sudo_stretch_common.yml +++ b/evolinux-users/tasks/sudo_common.yml @@ -10,7 +10,7 @@ - name: "Verify 'evolinux' sudoers file presence (Debian 9 or later)" ansible.builtin.template: - src: sudoers_stretch.j2 + src: sudoers.j2 dest: /etc/sudoers.d/evolinux force: no mode: "0440" diff --git a/evolinux-users/tasks/sudo_stretch_user.yml b/evolinux-users/tasks/sudo_user.yml similarity index 100% rename from evolinux-users/tasks/sudo_stretch_user.yml rename to evolinux-users/tasks/sudo_user.yml diff --git a/evolinux-users/templates/sudoers_stretch.j2 b/evolinux-users/templates/sudoers.j2 similarity index 100% rename from evolinux-users/templates/sudoers_stretch.j2 rename to evolinux-users/templates/sudoers.j2 From 9821fc8f785c09b8ac29e5c1df1a3bf8fc594e8f Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Thu, 27 Apr 2023 10:52:32 +0200 Subject: [PATCH 003/182] userlogrotate: rotate also php.log --- CHANGELOG.md | 1 + userlogrotate/files/userlogrotate | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index afc09df4..14ecfebb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ## [Unreleased] ### Added +* userlogrotate: rotate also php.log. ### Changed * evolinux-users: remove Stretch references in tasks that also apply to next Debian versions. diff --git a/userlogrotate/files/userlogrotate b/userlogrotate/files/userlogrotate index dfa51738..ce8cc28a 100644 --- a/userlogrotate/files/userlogrotate +++ b/userlogrotate/files/userlogrotate @@ -15,7 +15,7 @@ user_for() { stat -L -c '%G' $homedir } -for log in access.log access-*.log error.log; do +for log in access.log access-*.log error.log php.log; do for i in $(ls -1 -d $HOMEPREFIX/*/log/$log 2>/dev/null | grep -v \.bak\.); do USER="$(user_for $i)" rotate $i root:$USER @@ -55,4 +55,4 @@ for log in production.log*[!\.gz] delayed_job.log*[!\.gz] development.log*[!\.gz done done -exit 0 \ No newline at end of file +exit 0 From db0b5ab3db2ff94a9d4b7b21ee18ee51fe0068db Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Tue, 2 May 2023 14:20:39 +0200 Subject: [PATCH 004/182] postfix: add missing localhost.$mydomain to mydestination --- CHANGELOG.md | 3 ++- evolinux-base/tasks/postfix.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14ecfebb..27288389 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,8 @@ The **patch** part changes is incremented if multiple releases happen the same m * evolinux-users: remove Stretch references in tasks that also apply to next Debian versions. ### Fixed -* packweb-apache,nagios-nrpe: add missing task and config fo PHP 8.2 container +* packweb-apache,nagios-nrpe: add missing task and config for PHP 8.2 container +* potsfix: add missing `localhost.$mydomain` to mydestination ### Removed diff --git a/evolinux-base/tasks/postfix.yml b/evolinux-base/tasks/postfix.yml index 1c5d986c..d9dba3e2 100644 --- a/evolinux-base/tasks/postfix.yml +++ b/evolinux-base/tasks/postfix.yml @@ -25,7 +25,7 @@ ansible.builtin.lineinfile: dest: /etc/postfix/main.cf state: present - line: "mydestination = {{ [evolinux_fqdn, evolinux_internal_fqdn] | unique | join(' ') }} localhost.localdomain localhost" + line: "mydestination = {{ [evolinux_fqdn, evolinux_internal_fqdn] | unique | join(' ') }} localhost.localdomain localhost localhost.$mydomain" regexp: '^mydestination' notify: reload postfix tags: From d3345d28668922f0bb82bd0ed304922364f58b71 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 9 May 2023 09:31:03 +0200 Subject: [PATCH 005/182] apt: move stretch backports to archive.d.o --- apt/templates/stretch_backports.list.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt/templates/stretch_backports.list.j2 b/apt/templates/stretch_backports.list.j2 index 4f69547d..ffd6f98f 100644 --- a/apt/templates/stretch_backports.list.j2 +++ b/apt/templates/stretch_backports.list.j2 @@ -1,3 +1,3 @@ # {{ ansible_managed }} -deb http://mirror.evolix.org/debian stretch-backports {{ apt_backports_components | mandatory }} +deb http://archive.debian.org/debian stretch-backports {{ apt_backports_components | mandatory }} From ad2d96d890cc9f29058105ff947f600b8101b0bf Mon Sep 17 00:00:00 2001 From: David Prevot Date: Thu, 11 May 2023 17:51:55 +0200 Subject: [PATCH 006/182] tfix s/import/include/ --- filebeat/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filebeat/tasks/main.yml b/filebeat/tasks/main.yml index 86dd617b..9714183d 100644 --- a/filebeat/tasks/main.yml +++ b/filebeat/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: APT sources - ansible.builtin.import_tasks: apt_sources.yml + ansible.builtin.include_tasks: apt_sources.yml args: apply: tags: From 6ab34517b6aac32b3e9a2451ea7b1977481d8001 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 12 May 2023 12:35:49 +0200 Subject: [PATCH 007/182] nagios-nrpe: add a NRPE check-local command with completion --- CHANGELOG.md | 1 + nagios-nrpe/files/check-local | 12 ++++++++++++ nagios-nrpe/files/check-local_completion | 13 +++++++++++++ nagios-nrpe/tasks/check-local.yml | 24 ++++++++++++++++++++++++ nagios-nrpe/tasks/main.yml | 5 ++++- 5 files changed, 54 insertions(+), 1 deletion(-) create mode 100755 nagios-nrpe/files/check-local create mode 100644 nagios-nrpe/files/check-local_completion create mode 100644 nagios-nrpe/tasks/check-local.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 27288389..ef47af93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Added * userlogrotate: rotate also php.log. +* nagios-nrpe: add a NRPE check-local command with completion. ### Changed * evolinux-users: remove Stretch references in tasks that also apply to next Debian versions. diff --git a/nagios-nrpe/files/check-local b/nagios-nrpe/files/check-local new file mode 100755 index 00000000..4d96c639 --- /dev/null +++ b/nagios-nrpe/files/check-local @@ -0,0 +1,12 @@ +#!/usr/bin/bash + +if ! test -f /usr/lib/nagios/plugins/check_nrpe; then + echo '/usr/lib/nagios/plugins/check_nrpe is missing, please install nagios-nrpe-plugin package.' + exit 1 +fi + + + +/usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1 -c check_$1 + + diff --git a/nagios-nrpe/files/check-local_completion b/nagios-nrpe/files/check-local_completion new file mode 100644 index 00000000..040d60d4 --- /dev/null +++ b/nagios-nrpe/files/check-local_completion @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +_check_local_dynamic_completion() { + local cur; + cur=${COMP_WORDS[COMP_CWORD]}; + check_list=$(grep 'check_' /etc/nagios/nrpe.d/evolix.cfg | grep -vE '^[[:blank:]]*#' | awk -F'[\[\]=_]' '{print $3}') + COMPREPLY=(); + COMPREPLY=( $( compgen -W '$(grep check_ /etc/nagios/nrpe.d/evolix.cfg | grep -vE "^[[:blank:]]*#" | awk -F"[\[\]=_]" "{print \$3}")' -- $cur ) ); +} + +complete -F _check_local_dynamic_completion check-local + + diff --git a/nagios-nrpe/tasks/check-local.yml b/nagios-nrpe/tasks/check-local.yml new file mode 100644 index 00000000..6718da3f --- /dev/null +++ b/nagios-nrpe/tasks/check-local.yml @@ -0,0 +1,24 @@ +--- +# Install check-local utilitary +# This task is for Debian >= 10 only! + +- name: Package nagios-nrpe-plugin is intalled + ansible.builtin.apt: + name: nagios-nrpe-plugin + when: ansible_distribution_major_version is version('10', '>=') + +- name: Utilitary check-local is installed + ansible.builtin.copy: + src: check-local + dest: /usr/local/bin/check-local + mode: "0755" + when: ansible_distribution_major_version is version('10', '>=') + +- name: Completion for utilitary check-local is installed + ansible.builtin.copy: + src: check-local_completion + dest: /etc/bash_completion.d/check-local + mode: "0755" + when: ansible_distribution_major_version is version('10', '>=') + + diff --git a/nagios-nrpe/tasks/main.yml b/nagios-nrpe/tasks/main.yml index c05cf85a..607335e1 100644 --- a/nagios-nrpe/tasks/main.yml +++ b/nagios-nrpe/tasks/main.yml @@ -84,4 +84,7 @@ tags: - nagios-nrpe -- ansible.builtin.include_tasks: wrapper.yml \ No newline at end of file +- ansible.builtin.include_tasks: wrapper.yml + +- ansible.builtin.include_tasks: check-local.yml + when: ansible_distribution_major_version is version('10', '>=') From 3d8ae87368210f449dd1b576c3bdfd3c047c45da Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 12 May 2023 12:38:40 +0200 Subject: [PATCH 008/182] nagios-nrpe: add double quotes to input var in check-local --- nagios-nrpe/files/check-local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nagios-nrpe/files/check-local b/nagios-nrpe/files/check-local index 4d96c639..73db2c66 100755 --- a/nagios-nrpe/files/check-local +++ b/nagios-nrpe/files/check-local @@ -7,6 +7,6 @@ fi -/usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1 -c check_$1 +/usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1 -c "check_$1" From f79d8456d6250ec2a5e21e68f15e0d5b1a8907f7 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Fri, 12 May 2023 18:14:19 +0200 Subject: [PATCH 009/182] elasticsearch: improve networking configuration --- CHANGELOG.md | 2 + elasticsearch/defaults/main.yml | 14 +++++- elasticsearch/tasks/configuration.yml | 67 +++++++++++++++++++++++++-- 3 files changed, 78 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef47af93..1397fdbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ The **patch** part changes is incremented if multiple releases happen the same m * nagios-nrpe: add a NRPE check-local command with completion. ### Changed + +* elasticsearch: improve networking configuration * evolinux-users: remove Stretch references in tasks that also apply to next Debian versions. ### Fixed diff --git a/elasticsearch/defaults/main.yml b/elasticsearch/defaults/main.yml index 98b1a646..ba5d6728 100644 --- a/elasticsearch/defaults/main.yml +++ b/elasticsearch/defaults/main.yml @@ -5,10 +5,20 @@ elasticsearch_cluster_name: Null elasticsearch_cluster_members: Null elasticsearch_minimum_master_nodes: Null elasticsearch_node_name: "${HOSTNAME}" -elasticsearch_network_host: - - "_local_" + +# https://www.elastic.co/guide/en/elasticsearch/reference/8.7/modules-network.html +elasticsearch_network_host: "_local_" elasticsearch_network_publish_host: Null +elasticsearch_network_port: Null + +elasticsearch_http_host: Null elasticsearch_http_publish_host: Null +elasticsearch_http_port: Null + +elasticsearch_transport_host: Null +elasticsearch_transport_publish_host: Null +elasticsearch_transport_port: Null + elasticsearch_discovery_seed_hosts: Null elasticsearch_cluster_initial_master_nodes: Null elasticsearch_custom_datadir: Null diff --git a/elasticsearch/tasks/configuration.yml b/elasticsearch/tasks/configuration.yml index 9c3875b0..0b601aff 100644 --- a/elasticsearch/tasks/configuration.yml +++ b/elasticsearch/tasks/configuration.yml @@ -22,7 +22,7 @@ - name: Configure network host ansible.builtin.lineinfile: dest: /etc/elasticsearch/elasticsearch.yml - line: "network.host: {{ elasticsearch_network_host }}" + line: "network.host: {{ elasticsearch_network_host }}" regexp: "^network.host:" insertafter: "^# *network.host:" when: elasticsearch_network_host | default("", True) | length > 0 @@ -32,28 +32,89 @@ - name: Configure network publish_host ansible.builtin.lineinfile: dest: /etc/elasticsearch/elasticsearch.yml - line: "network.publish_host: {{ elasticsearch_network_publish_host }}" + line: "network.publish_host: {{ elasticsearch_network_publish_host }}" regexp: "^network.publish_host:" insertafter: "^network.host:" when: elasticsearch_network_publish_host | default("", True) | length > 0 tags: - config +- name: Configure network port + ansible.builtin.lineinfile: + dest: /etc/elasticsearch/elasticsearch.yml + line: "network.port: {{ elasticsearch_network_port }}" + regexp: "^network.port:" + insertafter: "^network.host:" + when: elasticsearch_network_port | default("", True) | length > 0 + tags: + - config + +- name: Configure http host + ansible.builtin.lineinfile: + dest: /etc/elasticsearch/elasticsearch.yml + line: "http.host: {{ elasticsearch_http_host }}" + regexp: "^http.host:" + insertafter: "^# *http.host:" + when: elasticsearch_http_host | default("", True) | length > 0 + tags: + - config + - name: Configure http publish_host ansible.builtin.lineinfile: dest: /etc/elasticsearch/elasticsearch.yml - line: "http.publish_host: {{ elasticsearch_http_publish_host }}" + line: "http.publish_host: {{ elasticsearch_http_publish_host }}" regexp: "^http.publish_host:" insertafter: "^http.port:" when: elasticsearch_http_publish_host | default("", True) | length > 0 tags: - config +- name: Configure http port + ansible.builtin.lineinfile: + dest: /etc/elasticsearch/elasticsearch.yml + line: "http.port: {{ elasticsearch_http_port }}" + regexp: "^http.port:" + insertafter: "^http.host:" + when: elasticsearch_http_port | default("", True) | length > 0 + tags: + - config + +- name: Configure transport host + ansible.builtin.lineinfile: + dest: /etc/elasticsearch/elasticsearch.yml + line: "transport.host: {{ elasticsearch_transport_host }}" + regexp: "^transport.host:" + insertafter: "^# *transport.host:" + when: elasticsearch_transport_host | default("", True) | length > 0 + tags: + - config + +- name: Configure transport publish_host + ansible.builtin.lineinfile: + dest: /etc/elasticsearch/elasticsearch.yml + line: "transport.publish_host: {{ elasticsearch_transport_publish_host }}" + regexp: "^transport.publish_host:" + insertafter: "^transport.host:" + when: elasticsearch_transport_publish_host | default("", True) | length > 0 + tags: + - config + +- name: Configure transport port + ansible.builtin.lineinfile: + dest: /etc/elasticsearch/elasticsearch.yml + line: "transport.port: {{ elasticsearch_transport_port }}" + regexp: "^transport.port:" + insertafter: "^transport.host:" + when: elasticsearch_transport_port | default("", True) | length > 0 + tags: + - config + - name: Configure discovery seed hosts ansible.builtin.lineinfile: dest: /etc/elasticsearch/elasticsearch.yml line: "discovery.seed_hosts: {{ elasticsearch_discovery_seed_hosts | to_yaml(default_flow_style=True) }}" regexp: "^discovery.seed_hosts:" + insertafter: "^# *discovery.seed_hosts:" when: elasticsearch_discovery_seed_hosts | default([], True) | length > 0 tags: - config From 7660444c9a8a9070b82647f7b3b2212d4026a251 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Fri, 12 May 2023 18:14:25 +0200 Subject: [PATCH 010/182] fix syntax --- elasticsearch/tasks/packages.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch/tasks/packages.yml b/elasticsearch/tasks/packages.yml index 5188e3cc..2d5ca6b8 100644 --- a/elasticsearch/tasks/packages.yml +++ b/elasticsearch/tasks/packages.yml @@ -1,6 +1,7 @@ --- + - name: APT sources - ansible.builtin.import_tasks: apt_sources.yml + ansible.builtin.include_tasks: apt_sources.yml args: apply: tags: From 5ef4d91f1cd6efb9a3f10dd2b0c96eba1633e14e Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Tue, 16 May 2023 18:04:03 +0200 Subject: [PATCH 011/182] =?UTF-8?q?mysql:=20add=20missing=20notify=20to=20?= =?UTF-8?q?restart=20MySQL=C2=A0after=20setting=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mysql/tasks/config_stretch.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql/tasks/config_stretch.yml b/mysql/tasks/config_stretch.yml index dcf4e9e7..cda4867c 100644 --- a/mysql/tasks/config_stretch.yml +++ b/mysql/tasks/config_stretch.yml @@ -11,6 +11,7 @@ group: root mode: "0644" force: yes + notify: "{{ mysql_restart_handler_name }}" tags: - mysql @@ -22,6 +23,7 @@ group: root mode: "0644" force: "{{ mysql_force_custom_config }}" + notify: "{{ mysql_restart_handler_name }}" tags: - mysql From 7b667d165078a1cc566315a92ce2d0c1b11b2c54 Mon Sep 17 00:00:00 2001 From: Eric Morino Date: Fri, 19 May 2023 16:21:41 +0200 Subject: [PATCH 012/182] Add task for mount nextcloud_data volume --- webapps/nextcloud/tasks/user.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webapps/nextcloud/tasks/user.yml b/webapps/nextcloud/tasks/user.yml index 01cc037c..fdc5b7a6 100644 --- a/webapps/nextcloud/tasks/user.yml +++ b/webapps/nextcloud/tasks/user.yml @@ -32,3 +32,11 @@ - "{{ nextcloud_home }}/data" tags: - nextcloud + +- name: Mount up Ceph volume by UUID + ansible.posix.mount: + path: "{{ nextcloud_data }}" + src: "{{ nextcloud_data_uuid }}" + fstype: ext4 + opts: defaults,noexec,nosuid,nodev,relatime,lazytime + state: present From 8706a35705e13bdab2a318c615ebdb9c4d1b0195 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Mon, 22 May 2023 14:16:14 +0200 Subject: [PATCH 013/182] mysql: improve shell syntax for mysql_skip script --- CHANGELOG.md | 5 ++++- mysql/files/mysql_skip.sh | 21 ++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1397fdbb..6673906a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,15 +12,18 @@ The **patch** part changes is incremented if multiple releases happen the same m ## [Unreleased] ### Added + * userlogrotate: rotate also php.log. * nagios-nrpe: add a NRPE check-local command with completion. ### Changed * elasticsearch: improve networking configuration -* evolinux-users: remove Stretch references in tasks that also apply to next Debian versions. +* evolinux-users: remove Stretch references in tasks that also apply to next Debian versions +* mysql: improve shell syntax for mysql_skip script ### Fixed + * packweb-apache,nagios-nrpe: add missing task and config for PHP 8.2 container * potsfix: add missing `localhost.$mydomain` to mydestination diff --git a/mysql/files/mysql_skip.sh b/mysql/files/mysql_skip.sh index 95bc28f7..ca72a9fc 100644 --- a/mysql/files/mysql_skip.sh +++ b/mysql/files/mysql_skip.sh @@ -18,29 +18,28 @@ log_file="/var/log/mysql_skip.log" mysql_skip_error() { error="$1" - error="$(date --iso-8601=seconds) Skiping: $error" - printf "Skipping: $error\n" - mysql $mysql_opt -e 'SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE;' + mysql ${mysql_opt} -e 'SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE;' - [ -n "$log_file" ] && echo "$error" >>"$log_file" + printf 'Skipping: %s\n' "$error" + [ -n "$log_file" ] && printf '%s Skipping: %s\n' "$(date --iso-8601=seconds)" "$error" >>"$log_file" } while true; do - slave_status="$(mysql $mysql_opt -e 'SHOW SLAVE STATUS\G')" - seconds_behind_master=$(echo "$slave_status" |grep 'Seconds_Behind_Master: ' |awk -F ' ' '{print $2}') - last_SQL_error="$(echo "$slave_status" |grep 'Last_SQL_Error: ' |sed 's/^.\+Last_SQL_Error: //')" + slave_status="$(mysql ${mysql_opt} -e 'SHOW SLAVE STATUS\G')" + seconds_behind_master=$(echo "${slave_status}" |grep 'Seconds_Behind_Master: ' |awk -F ' ' '{print $2}') + last_SQL_error="$(echo "${slave_status}" |grep 'Last_SQL_Error: ' |sed 's/^.\+Last_SQL_Error: //')" - if [ "$seconds_behind_master" = "0" ]; then + if [ "${seconds_behind_master}" = "0" ]; then #printf 'Replication is up to date!\n' - if [ "$exit_when_uptodate" = "true" ]; then + if [ "${exit_when_uptodate}" = "true" ]; then exit 0 fi elif [ -z "$last_SQL_error" ]; then - sleep $sleep_interval + sleep ${sleep_interval} elif echo "$last_SQL_error" |grep -q -f $error_messages; then - mysql_skip_error "$last_SQL_error" + mysql_skip_error "${last_SQL_error}" fi sleep 1 From 91bcd2a6050936916b57fab632220c723c6b44b6 Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Thu, 25 May 2023 11:43:53 +0200 Subject: [PATCH 014/182] policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory --- CHANGELOG.md | 1 + policy_pam/defaults/main.yml | 32 +++++++++++++ policy_pam/meta/main.yml | 25 ++++++++++ policy_pam/tasks/main.yml | 88 ++++++++++++++++++++++++++++++++++++ 4 files changed, 146 insertions(+) create mode 100644 policy_pam/defaults/main.yml create mode 100644 policy_pam/meta/main.yml create mode 100644 policy_pam/tasks/main.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 6673906a..2664ba03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * userlogrotate: rotate also php.log. * nagios-nrpe: add a NRPE check-local command with completion. +* policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory ### Changed diff --git a/policy_pam/defaults/main.yml b/policy_pam/defaults/main.yml new file mode 100644 index 00000000..5a2f79d2 --- /dev/null +++ b/policy_pam/defaults/main.yml @@ -0,0 +1,32 @@ +--- + +# PAM -- pam_pwquality +# Ensure password meet a given quality/complexity requirement +policy_pam_pwquality: true + +# Configuration settings for pam_pwquality +# For more in depth info, see man pam_pwquality(8) + +# Minimum password lengh/credit +policy_pam_pwquality_minlen: 4 + +# Credits values for char types +# Value : Interger N with : +# N >= 0 - Maximum credit given for each char type in the password +# N < 0 - Minimum number of chars of given type in the password +# digit chars +policy_pam_pwquality_dcredit: 0 +# uppercase chars +policy_pam_pwquality_ucredit: 0 +# lowercase chars +policy_pam_pwquality_lcredit: 0 +# other chars +policy_pam_pwquality_ocredit: 0 + + +# PAM -- pam_pwhistory +# Prevent old password re-use +policy_pam_pwhistory: true + +# How many old passwords to retain +policy_pam_pwhistory_length: 5 \ No newline at end of file diff --git a/policy_pam/meta/main.yml b/policy_pam/meta/main.yml new file mode 100644 index 00000000..85198ada --- /dev/null +++ b/policy_pam/meta/main.yml @@ -0,0 +1,25 @@ +--- +galaxy_info: + author: Evolix + company: Evolix + description: Add repositories to APT sources list. + + issue_tracker_url: https://gitea.evolix.org/evolix/ansible-roles/issues + + license: GPLv2 + + min_ansible_version: "2.10" + + platforms: + - name: Debian + versions: + - bullseye + + galaxy_tags: [] + # Be sure to remove the '[]' above if you add dependencies + # to this list. + +dependencies: [] + # List your role dependencies here, one per line. + # Be sure to remove the '[]' above if you add dependencies + # to this list. diff --git a/policy_pam/tasks/main.yml b/policy_pam/tasks/main.yml new file mode 100644 index 00000000..e5c7bb9a --- /dev/null +++ b/policy_pam/tasks/main.yml @@ -0,0 +1,88 @@ +--- +# +# -password [success=1 default=ignore] pam_unix.so obscure yescrypt +# +password requisite pam_pwquality.so retry=3 +# +password [success=1 default=ignore] pam_unix.so obscure use_authtok try_first_pass yescrypt + + + +# PAM -- pam_pwquality + +- name: libpam-pwquality is installed + apt: + state: present + name: + - libpam-pwquality + - cracklib-runtime + when: policy_pam_pwquality + +- name: Enable pam_pwquality + ansible.builtin.lineinfile: + dest: /etc/pam.d/common-password + regexp: '^password\s+requisite\s+pam_pwquality.so' + line: "password requisite pam_pwquality.so retry=3" + insertafter: '(the "Primary" block)' + when: policy_pam_pwquality + +- name: Disable pam_pwquality + ansible.builtin.lineinfile: + dest: /etc/pam.d/common-password + regexp: '^password\s+requisite\s+pam_pwquality.so' + state: absent + when: policy_pam_pwquality is false + +- name: Configure pam_pwquality + replace: + dest: /etc/security/pwquality.conf + regexp: "^#? ?{{ item.name }} = .*" + replace: "{{ item.name }} = {{ item.value }}" + with_items: + - { name: minlen, value: "{{ policy_pam_pwquality_minlen }}" } + - { name: dcredit, value: "{{ policy_pam_pwquality_dcredit }}" } + - { name: ucredit, value: "{{ policy_pam_pwquality_ucredit }}" } + - { name: lcredit, value: "{{ policy_pam_pwquality_lcredit }}" } + - { name: ocredit, value: "{{ policy_pam_pwquality_ocredit }}" } + when: policy_pam_pwquality + + + +# PAM -- pam_pwhistory + +- name: Enable pam_pwhistory + ansible.builtin.lineinfile: + dest: /etc/pam.d/common-password + regexp: '^password\s+required\s+pam_pwhistory.so' + line: "password required pam_pwhistory.so remember={{ policy_pam_pwhistory_length }} {{ 'use_authtok' if policy_pam_pwquality}}" + insertbefore: 'pam_unix.so' + when: policy_pam_pwhistory + +# LATER : Enforce a password min age +# - name: Change PASS_MIN_DAYS +# replace: +# dest: /etc/login.defs +# replace: "PASS_MIN_DAYS 7" +# regexp: '^PASS_MIN_DAYS.*' + +- name: Disable pam_pwhistory + ansible.builtin.lineinfile: + dest: /etc/pam.d/common-password + regexp: '^password\s+required\s+pam_pwhistory.so' + state: absent + when: policy_pam_pwhistory is false + + + +# PAM -- pam_unix +- name: Update pam_unix if previous modules were enabled + ansible.builtin.lineinfile: + dest: /etc/pam.d/common-password + regexp: 'pam_unix.so obscure' + line: "password [success=1 default=ignore] pam_unix.so obscure use_authtok try_first_pass yescrypt" + when: policy_pam_pwhistory or policy_pam_pwquality + +- name: Update pam_unix if previous modules are all disabled + ansible.builtin.lineinfile: + dest: /etc/pam.d/common-password + regexp: 'pam_unix.so obscure' + line: "password [success=1 default=ignore] pam_unix.so obscure yescrypt" + when: policy_pam_pwhistory is false and policy_pam_pwquality is false \ No newline at end of file From 5563b4f8f2212a5be20dc343fd3a6f4744bcbac8 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Thu, 25 May 2023 16:01:04 +0200 Subject: [PATCH 015/182] nagios-nrpe: improve check-local output and fix completion in Debian 10 --- nagios-nrpe/files/check-local | 8 ++++++-- nagios-nrpe/files/check-local_completion | 3 +-- nagios-nrpe/tasks/check-local.yml | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/nagios-nrpe/files/check-local b/nagios-nrpe/files/check-local index 73db2c66..8b045cb0 100755 --- a/nagios-nrpe/files/check-local +++ b/nagios-nrpe/files/check-local @@ -1,12 +1,16 @@ -#!/usr/bin/bash +#!/usr/bin/env bash if ! test -f /usr/lib/nagios/plugins/check_nrpe; then echo '/usr/lib/nagios/plugins/check_nrpe is missing, please install nagios-nrpe-plugin package.' exit 1 fi +if [ -r /etc/nagios/nrpe.d/evolix.cfg ]; then + command=$(grep "check_$1" /etc/nagios/nrpe.d/evolix.cfg | tail -n1 | cut -d'=' -f2-) + printf "Command:\n $command\n" +fi - +printf "NRPE daemon output:" /usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1 -c "check_$1" diff --git a/nagios-nrpe/files/check-local_completion b/nagios-nrpe/files/check-local_completion index 040d60d4..174ae061 100644 --- a/nagios-nrpe/files/check-local_completion +++ b/nagios-nrpe/files/check-local_completion @@ -3,9 +3,8 @@ _check_local_dynamic_completion() { local cur; cur=${COMP_WORDS[COMP_CWORD]}; - check_list=$(grep 'check_' /etc/nagios/nrpe.d/evolix.cfg | grep -vE '^[[:blank:]]*#' | awk -F'[\[\]=_]' '{print $3}') COMPREPLY=(); - COMPREPLY=( $( compgen -W '$(grep check_ /etc/nagios/nrpe.d/evolix.cfg | grep -vE "^[[:blank:]]*#" | awk -F"[\[\]=_]" "{print \$3}")' -- $cur ) ); + COMPREPLY=( $( compgen -W '$(grep check_ /etc/nagios/nrpe.d/evolix.cfg | grep -vE "^[[:blank:]]*#" | awk -F"[\\\[\\\]=_]" "{print \$3}")' -- $cur ) ); } complete -F _check_local_dynamic_completion check-local diff --git a/nagios-nrpe/tasks/check-local.yml b/nagios-nrpe/tasks/check-local.yml index 6718da3f..d2adbcd1 100644 --- a/nagios-nrpe/tasks/check-local.yml +++ b/nagios-nrpe/tasks/check-local.yml @@ -1,6 +1,9 @@ --- # Install check-local utilitary # This task is for Debian >= 10 only! +- name: "Remount /usr if needed" + ansible.builtin.include_role: + name: remount-usr - name: Package nagios-nrpe-plugin is intalled ansible.builtin.apt: From 9ff615f19a3240a80c48c9d4ad2fdd1012624ec0 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Thu, 25 May 2023 16:02:27 +0200 Subject: [PATCH 016/182] nagios-nrpe: switch to echo (printf problem with % chars) --- nagios-nrpe/files/check-local | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nagios-nrpe/files/check-local b/nagios-nrpe/files/check-local index 8b045cb0..98c2f142 100755 --- a/nagios-nrpe/files/check-local +++ b/nagios-nrpe/files/check-local @@ -7,10 +7,11 @@ fi if [ -r /etc/nagios/nrpe.d/evolix.cfg ]; then command=$(grep "check_$1" /etc/nagios/nrpe.d/evolix.cfg | tail -n1 | cut -d'=' -f2-) - printf "Command:\n $command\n" + echo "Command:" + echo " $command" fi -printf "NRPE daemon output:" +echo "NRPE daemon output:" /usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1 -c "check_$1" From 3e00632a41894c15f8c89b627a6fb4f0b5ca1956 Mon Sep 17 00:00:00 2001 From: emorino Date: Mon, 29 May 2023 10:51:36 +0200 Subject: [PATCH 017/182] Add include to /etc/opendkim-evolix.conf on default configuration file, cf. #68552 --- opendkim/files/opendkim-evolix.conf | 17 +++++++++++++++++ opendkim/tasks/main.yml | 14 ++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 opendkim/files/opendkim-evolix.conf diff --git a/opendkim/files/opendkim-evolix.conf b/opendkim/files/opendkim-evolix.conf new file mode 100644 index 00000000..ed80dc8b --- /dev/null +++ b/opendkim/files/opendkim-evolix.conf @@ -0,0 +1,17 @@ +UserID opendkim:opendkim +Socket inet:8891@127.0.0.1 +PidFile /var/run/opendkim/opendkim.pid +OversignHeaders From +TrustAnchorFile /usr/share/dns/root.key +Selector default +Canonicalization relaxed/relaxed +InternalHosts refile:/etc/opendkim/TrustedHosts +KeyTable refile:/etc/opendkim/KeyTable +LogResults Yes +LogWhy Yes +Mode sv +SigningTable refile:/etc/opendkim/SigningTable +Syslog Yes +SyslogSuccess Yes +TemporaryDirectory /var/tmp +UMask 007 diff --git a/opendkim/tasks/main.yml b/opendkim/tasks/main.yml index 1c7a416a..96a521b5 100644 --- a/opendkim/tasks/main.yml +++ b/opendkim/tasks/main.yml @@ -45,10 +45,20 @@ tags: - opendkim +- name: Add Include in opendkim.conf + ansible.builtin.lineinfile: + dest: /etc/opendkim.conf + line: 'Include /etc/opendkim-evolix.conf' + state: present + create: no + mode: "0644" + tags: + - opendkim + - name: copy OpenDKIM config ansible.builtin.copy: - src: opendkim.conf - dest: /etc/opendkim.conf + src: opendkim-evolix.conf + dest: /etc/opendkim-evolix.conf mode: "0644" force: yes notify: restart opendkim From 6837df5a9e45cfa981c1152bcb13adc650f8f17f Mon Sep 17 00:00:00 2001 From: emorino Date: Mon, 29 May 2023 10:53:02 +0200 Subject: [PATCH 018/182] Delete old configuration file --- opendkim/files/opendkim.conf | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 opendkim/files/opendkim.conf diff --git a/opendkim/files/opendkim.conf b/opendkim/files/opendkim.conf deleted file mode 100644 index ed80dc8b..00000000 --- a/opendkim/files/opendkim.conf +++ /dev/null @@ -1,17 +0,0 @@ -UserID opendkim:opendkim -Socket inet:8891@127.0.0.1 -PidFile /var/run/opendkim/opendkim.pid -OversignHeaders From -TrustAnchorFile /usr/share/dns/root.key -Selector default -Canonicalization relaxed/relaxed -InternalHosts refile:/etc/opendkim/TrustedHosts -KeyTable refile:/etc/opendkim/KeyTable -LogResults Yes -LogWhy Yes -Mode sv -SigningTable refile:/etc/opendkim/SigningTable -Syslog Yes -SyslogSuccess Yes -TemporaryDirectory /var/tmp -UMask 007 From 1ae40e768601b7a5c2b52f1a66c7db558b7aaa6c Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Wed, 31 May 2023 11:27:32 +0200 Subject: [PATCH 019/182] nagios-nrpe: remount /usr **after** installing the packages --- CHANGELOG.md | 1 + nagios-nrpe/tasks/check-local.yml | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2664ba03..3df84a35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Fixed +* nagios-nrpe: remount /usr **after** installing the packages * packweb-apache,nagios-nrpe: add missing task and config for PHP 8.2 container * potsfix: add missing `localhost.$mydomain` to mydestination diff --git a/nagios-nrpe/tasks/check-local.yml b/nagios-nrpe/tasks/check-local.yml index d2adbcd1..e62b7642 100644 --- a/nagios-nrpe/tasks/check-local.yml +++ b/nagios-nrpe/tasks/check-local.yml @@ -1,15 +1,16 @@ --- # Install check-local utilitary # This task is for Debian >= 10 only! -- name: "Remount /usr if needed" - ansible.builtin.include_role: - name: remount-usr - name: Package nagios-nrpe-plugin is intalled ansible.builtin.apt: name: nagios-nrpe-plugin when: ansible_distribution_major_version is version('10', '>=') +- name: "Remount /usr if needed" + ansible.builtin.include_role: + name: remount-usr + - name: Utilitary check-local is installed ansible.builtin.copy: src: check-local From 81e1d1b0c1e953170f52f6413c041581e6f01e9e Mon Sep 17 00:00:00 2001 From: Eric Morino Date: Wed, 31 May 2023 15:50:20 +0200 Subject: [PATCH 020/182] Add variable pgbouncer_auth_type and add README --- pgbouncer/README.md | 1 + pgbouncer/defaults/main.yml | 2 ++ pgbouncer/templates/pgbouncer.ini.j2 | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pgbouncer/README.md b/pgbouncer/README.md index 2542f497..bf1914fc 100644 --- a/pgbouncer/README.md +++ b/pgbouncer/README.md @@ -14,6 +14,7 @@ Main variables are : * `pgbouncer_listen_port`: the listen post for PgBouncer (default: `6432`), * `pgbouncer_databases`: the databases that clients of PgBouncer can connect to, * `pgbouncer_account_list`: the accounts that clients of PgBouncer can connect to. +* `pgbouncer_auth_type`: the variable `auth_type` define by default to `scram-sha-256`, if you installed PgBouncer on PostgreSQL version inferior to 14, set this variable to `md5`. The variable `pgbouncer_databases` must have the `name`, `host` and `port` attributes. The variable can be defined like this: diff --git a/pgbouncer/defaults/main.yml b/pgbouncer/defaults/main.yml index 7b246270..4290afa5 100644 --- a/pgbouncer/defaults/main.yml +++ b/pgbouncer/defaults/main.yml @@ -2,6 +2,8 @@ pgbouncer_listen_addr: "127.0.0.1" pgbouncer_listen_port: "6432" +pgbouncer_auth_type: "scram-sha-256" + pgbouncer_databases: [] pgbouncer_account_list: [] diff --git a/pgbouncer/templates/pgbouncer.ini.j2 b/pgbouncer/templates/pgbouncer.ini.j2 index 30d34ccb..3bed0c5b 100644 --- a/pgbouncer/templates/pgbouncer.ini.j2 +++ b/pgbouncer/templates/pgbouncer.ini.j2 @@ -11,7 +11,7 @@ listen_addr = {{ pgbouncer_listen_addr }} listen_port = {{ pgbouncer_listen_port }} unix_socket_dir = -auth_type = scram-sha-256 +auth_type = {{ pgbouncer_auth_type }} auth_file = /etc/pgbouncer/userlist.txt # La connexion au serveur redevient libre lorsque le client termine une transaction @@ -26,4 +26,4 @@ default_pool_size = 20 # Ne pas enregistrer les connexions qui se passent bien log_connections = 0 -log_disconnections = 0 +log_disconnections = 0 \ No newline at end of file From 9f87049ee4691db3af4ba31eee266e1273c3bb76 Mon Sep 17 00:00:00 2001 From: Eric Morino Date: Wed, 31 May 2023 17:09:42 +0200 Subject: [PATCH 021/182] add variables for admin_users and stats_users to access on the pgbouncer console --- pgbouncer/README.md | 14 ++++++++++++++ pgbouncer/defaults/main.yml | 6 +++++- pgbouncer/tasks/main.yml | 3 +++ pgbouncer/templates/pgbouncer.ini.j2 | 3 +++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/pgbouncer/README.md b/pgbouncer/README.md index bf1914fc..fe8c0493 100644 --- a/pgbouncer/README.md +++ b/pgbouncer/README.md @@ -36,4 +36,18 @@ The value of `hash` can be obtained by running this command on the PostgreSQL se > These accounts must exist on the PostegreSQL server. +The variables `pgbouncer_admin_users` and `pgbouncer_stats_users` list the SQL user can be access on pgbouncer console. This variables can be defines like this : + +``` +pgbouncer_admin_users: + - account1 + - account2 +``` + +``` +pgbouncer_stats_users: + - account1 + - account2 +``` + The full list of variables (with default values) can be found in `defaults/main.yml`. diff --git a/pgbouncer/defaults/main.yml b/pgbouncer/defaults/main.yml index 4290afa5..5b5d293f 100644 --- a/pgbouncer/defaults/main.yml +++ b/pgbouncer/defaults/main.yml @@ -6,4 +6,8 @@ pgbouncer_auth_type: "scram-sha-256" pgbouncer_databases: [] -pgbouncer_account_list: [] +pgbouncer_admin_users: [] + +pgbouncer_stats_users: [] + +pgbouncer_account_list: [] \ No newline at end of file diff --git a/pgbouncer/tasks/main.yml b/pgbouncer/tasks/main.yml index 1d76931f..f52383a2 100644 --- a/pgbouncer/tasks/main.yml +++ b/pgbouncer/tasks/main.yml @@ -3,16 +3,19 @@ ansible.builtin.apt: name: pgbouncer state: present + - name: Limit for PgBouncer is set ansible.builtin.lineinfile: path: /etc/default/pgbouncer line: ulimit -n 65536 notify: Restart PgBouncer + - name: Add config file for PgBouncer ansible.builtin.template: src: pgbouncer.ini.j2 dest: /etc/pgbouncer/pgbouncer.ini notify: Restart PgBouncer + - name: Populate userlist.txt ansible.builtin.template: src: userlist.txt.j2 diff --git a/pgbouncer/templates/pgbouncer.ini.j2 b/pgbouncer/templates/pgbouncer.ini.j2 index 3bed0c5b..11eac58c 100644 --- a/pgbouncer/templates/pgbouncer.ini.j2 +++ b/pgbouncer/templates/pgbouncer.ini.j2 @@ -14,6 +14,9 @@ unix_socket_dir = auth_type = {{ pgbouncer_auth_type }} auth_file = /etc/pgbouncer/userlist.txt +admin_users = {{ pgbouncer_admin_users | join(",") }} +stats_users = {{ pgbouncer_stats_users | join(",") }} + # La connexion au serveur redevient libre lorsque le client termine une transaction # Autres valeurs possibles : session (lorsque le client ferme la session), statement (lorsque la requête se termine) pool_mode = transaction From 2c079755e984558ae93d94f1617a2120471eebb7 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Wed, 31 May 2023 17:25:08 +0200 Subject: [PATCH 022/182] elasticsearch: comment the Xlog:gc line instead of changing it completely --- CHANGELOG.md | 1 + elasticsearch/tasks/configuration.yml | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3df84a35..788c871f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Fixed +* elasticsearch: comment the Xlog:gc line instead of changing it completely * nagios-nrpe: remount /usr **after** installing the packages * packweb-apache,nagios-nrpe: add missing task and config for PHP 8.2 container * potsfix: add missing `localhost.$mydomain` to mydestination diff --git a/elasticsearch/tasks/configuration.yml b/elasticsearch/tasks/configuration.yml index 0b601aff..223eff90 100644 --- a/elasticsearch/tasks/configuration.yml +++ b/elasticsearch/tasks/configuration.yml @@ -179,14 +179,11 @@ tags: - config -- name: Disable garbage collector logs (JDK >= 9) - ansible.builtin.lineinfile: +- name: Disable garbage collector logs + ansible.builtin.replace: dest: /etc/elasticsearch/jvm.options - regexp: "Xlog:gc" - line: "#9-:-Xlog:gc*,gc+age=trace,safepoint:file=/opt/my-app/gc.log:utctime,pid,tags:filecount=32,filesize=64m" - owner: root - group: elasticsearch - mode: "0640" + regexp: '^([^#]*-Xlog:gc.+)' + replace: '#\1' tags: - config From 502715101103b8a52f70394456037cea3bc17e56 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Wed, 31 May 2023 17:25:24 +0200 Subject: [PATCH 023/182] elasticsearch: use an Integer --- elasticsearch/tasks/bootstrap_checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/tasks/bootstrap_checks.yml b/elasticsearch/tasks/bootstrap_checks.yml index 0df9a618..3626bd17 100644 --- a/elasticsearch/tasks/bootstrap_checks.yml +++ b/elasticsearch/tasks/bootstrap_checks.yml @@ -12,7 +12,7 @@ - name: Maximum map count check ansible.posix.sysctl: name: vm.max_map_count - value: 262144 + value: "262144" sysctl_file: /etc/sysctl.d/elasticsearch.conf when: max_map_count | int < 262144 tags: From 318991fe424220e7a606013b58770f7a42434bd1 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 1 Jun 2023 09:43:20 +0200 Subject: [PATCH 024/182] pbbouncer: minor fixes --- CHANGELOG.md | 1 + pgbouncer/README.md | 8 ++++++-- pgbouncer/defaults/main.yml | 7 ++++++- pgbouncer/tasks/main.yml | 7 ++++--- pgbouncer/templates/pgbouncer.ini.j2 | 2 +- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 788c871f..0887de1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * elasticsearch: improve networking configuration * evolinux-users: remove Stretch references in tasks that also apply to next Debian versions * mysql: improve shell syntax for mysql_skip script +* pbbouncer: minor fixes ### Fixed diff --git a/pgbouncer/README.md b/pgbouncer/README.md index fe8c0493..94cdeccf 100644 --- a/pgbouncer/README.md +++ b/pgbouncer/README.md @@ -32,9 +32,13 @@ pgbouncer_account_list: - { name: "account2", hash: "" } ``` -The value of `hash` can be obtained by running this command on the PostgreSQL server: `select passwd from pg_shadow where usename='account1';` +The value of `hash` can be obtained by running this command on the PostgreSQL server: -> These accounts must exist on the PostegreSQL server. +``` +select passwd from pg_shadow where usename='account1'; +``` + +> These accounts must exist on the PostgreSQL server. The variables `pgbouncer_admin_users` and `pgbouncer_stats_users` list the SQL user can be access on pgbouncer console. This variables can be defines like this : diff --git a/pgbouncer/defaults/main.yml b/pgbouncer/defaults/main.yml index 5b5d293f..211e6a5d 100644 --- a/pgbouncer/defaults/main.yml +++ b/pgbouncer/defaults/main.yml @@ -1,13 +1,18 @@ --- -pgbouncer_listen_addr: "127.0.0.1" +pgbouncer_listen_addr: + - "127.0.0.1" pgbouncer_listen_port: "6432" +# For PostgreSQL version < 14, use "md5" +# For PostgreSQL version >= 14, use "scram-sha-256" pgbouncer_auth_type: "scram-sha-256" +# Each entry must have "name", "host" and "port" keys pgbouncer_databases: [] pgbouncer_admin_users: [] pgbouncer_stats_users: [] +# Each entry must have "name" and "hash" keys pgbouncer_account_list: [] \ No newline at end of file diff --git a/pgbouncer/tasks/main.yml b/pgbouncer/tasks/main.yml index f52383a2..0463899d 100644 --- a/pgbouncer/tasks/main.yml +++ b/pgbouncer/tasks/main.yml @@ -7,17 +7,18 @@ - name: Limit for PgBouncer is set ansible.builtin.lineinfile: path: /etc/default/pgbouncer + regexp: "ulimit -n" line: ulimit -n 65536 - notify: Restart PgBouncer + notify: restart pgbouncer - name: Add config file for PgBouncer ansible.builtin.template: src: pgbouncer.ini.j2 dest: /etc/pgbouncer/pgbouncer.ini - notify: Restart PgBouncer + notify: restart pgbouncer - name: Populate userlist.txt ansible.builtin.template: src: userlist.txt.j2 dest: /etc/pgbouncer/userlist.txt - notify: Restart PgBouncer + notify: restart pgbouncer diff --git a/pgbouncer/templates/pgbouncer.ini.j2 b/pgbouncer/templates/pgbouncer.ini.j2 index 11eac58c..b2d89e47 100644 --- a/pgbouncer/templates/pgbouncer.ini.j2 +++ b/pgbouncer/templates/pgbouncer.ini.j2 @@ -7,7 +7,7 @@ logfile = /var/log/postgresql/pgbouncer.log pidfile = /var/run/postgresql/pgbouncer.pid -listen_addr = {{ pgbouncer_listen_addr }} +listen_addr = {{ pgbouncer_listen_addr | join(',') }} listen_port = {{ pgbouncer_listen_port }} unix_socket_dir = From 060018be2607de372b5ef53bd5c514006b2a1312 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 1 Jun 2023 09:43:43 +0200 Subject: [PATCH 025/182] vscode: ansible/yaml formatter --- .vscode/settings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index ce271884..799fe466 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,6 @@ "*.yml": "ansible", "*.yaml": "ansible" }, - "yaml.format.enable": false + "yaml.format.enable": false, + "ansible.python.interpreterPath": "/bin/python" } \ No newline at end of file From e00af3aafb9bfade644fc12ac37f905fab788c5f Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 2 Jun 2023 09:47:20 +0200 Subject: [PATCH 026/182] nagios-nrpe: allow check-local for Debian < 10 --- nagios-nrpe/tasks/check-local.yml | 4 ---- nagios-nrpe/tasks/main.yml | 1 - 2 files changed, 5 deletions(-) diff --git a/nagios-nrpe/tasks/check-local.yml b/nagios-nrpe/tasks/check-local.yml index e62b7642..1b696292 100644 --- a/nagios-nrpe/tasks/check-local.yml +++ b/nagios-nrpe/tasks/check-local.yml @@ -1,11 +1,9 @@ --- # Install check-local utilitary -# This task is for Debian >= 10 only! - name: Package nagios-nrpe-plugin is intalled ansible.builtin.apt: name: nagios-nrpe-plugin - when: ansible_distribution_major_version is version('10', '>=') - name: "Remount /usr if needed" ansible.builtin.include_role: @@ -16,13 +14,11 @@ src: check-local dest: /usr/local/bin/check-local mode: "0755" - when: ansible_distribution_major_version is version('10', '>=') - name: Completion for utilitary check-local is installed ansible.builtin.copy: src: check-local_completion dest: /etc/bash_completion.d/check-local mode: "0755" - when: ansible_distribution_major_version is version('10', '>=') diff --git a/nagios-nrpe/tasks/main.yml b/nagios-nrpe/tasks/main.yml index 607335e1..f78f9fbf 100644 --- a/nagios-nrpe/tasks/main.yml +++ b/nagios-nrpe/tasks/main.yml @@ -87,4 +87,3 @@ - ansible.builtin.include_tasks: wrapper.yml - ansible.builtin.include_tasks: check-local.yml - when: ansible_distribution_major_version is version('10', '>=') From 5c095dc862c5e0b25ed6d2a5201941e96210773d Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Mon, 5 Jun 2023 10:27:22 +0200 Subject: [PATCH 027/182] policy_pam : Enforce password min days to prevent circumvention of pwhistory --- policy_pam/defaults/main.yml | 7 ++++++- policy_pam/tasks/main.yml | 13 ++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/policy_pam/defaults/main.yml b/policy_pam/defaults/main.yml index 5a2f79d2..867a3fa5 100644 --- a/policy_pam/defaults/main.yml +++ b/policy_pam/defaults/main.yml @@ -29,4 +29,9 @@ policy_pam_pwquality_ocredit: 0 policy_pam_pwhistory: true # How many old passwords to retain -policy_pam_pwhistory_length: 5 \ No newline at end of file +policy_pam_pwhistory_length: 5 + +# How (days) old the password should be before allowing user to change it's password +# It is to prevent circumvention of pam_pwhistory +# Set to 0 to disable +policy_pam_password_min_days: 0 \ No newline at end of file diff --git a/policy_pam/tasks/main.yml b/policy_pam/tasks/main.yml index e5c7bb9a..e238e22e 100644 --- a/policy_pam/tasks/main.yml +++ b/policy_pam/tasks/main.yml @@ -56,13 +56,6 @@ insertbefore: 'pam_unix.so' when: policy_pam_pwhistory -# LATER : Enforce a password min age -# - name: Change PASS_MIN_DAYS -# replace: -# dest: /etc/login.defs -# replace: "PASS_MIN_DAYS 7" -# regexp: '^PASS_MIN_DAYS.*' - - name: Disable pam_pwhistory ansible.builtin.lineinfile: dest: /etc/pam.d/common-password @@ -70,6 +63,12 @@ state: absent when: policy_pam_pwhistory is false +# Enforce password minimal age to prevent pam_pwhistory to be circumvented by multiples password changes +- name: Change PASS_MIN_DAYS + replace: + dest: /etc/login.defs + replace: 'PASS_MIN_DAYS\g<1>{{ policy_pam_password_min_days }}' + regexp: '^PASS_MIN_DAYS(\s+).*' # PAM -- pam_unix From b234fdaea97eb67b3fc10eb6b0b633b96d19c9ec Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Mon, 5 Jun 2023 10:33:34 +0200 Subject: [PATCH 028/182] pam_policy : Ensure it's only executed on Debian 11+ systems --- policy_pam/tasks/main.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/policy_pam/tasks/main.yml b/policy_pam/tasks/main.yml index e238e22e..26587d26 100644 --- a/policy_pam/tasks/main.yml +++ b/policy_pam/tasks/main.yml @@ -1,8 +1,13 @@ --- -# -# -password [success=1 default=ignore] pam_unix.so obscure yescrypt -# +password requisite pam_pwquality.so retry=3 -# +password [success=1 default=ignore] pam_unix.so obscure use_authtok try_first_pass yescrypt + +# System compatibility check. yescrypt only works on Debian 11+ +# So we ensure that this role isn't executed on older systems +- name: "System compatibility check" + assert: + that: + - ansible_distribution == "Debian" + - ansible_distribution_major_version is version_compare('11', '>=') + msg: pam_policy is only compatible with Debian >= 11 From 24d7fe5def802826db10797927bc798913792629 Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Mon, 5 Jun 2023 11:33:08 +0200 Subject: [PATCH 029/182] pam_policy: Default settings : disabled --- policy_pam/defaults/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/policy_pam/defaults/main.yml b/policy_pam/defaults/main.yml index 867a3fa5..fb8075ac 100644 --- a/policy_pam/defaults/main.yml +++ b/policy_pam/defaults/main.yml @@ -2,31 +2,31 @@ # PAM -- pam_pwquality # Ensure password meet a given quality/complexity requirement -policy_pam_pwquality: true +policy_pam_pwquality: false # Configuration settings for pam_pwquality # For more in depth info, see man pam_pwquality(8) # Minimum password lengh/credit -policy_pam_pwquality_minlen: 4 +policy_pam_pwquality_minlen: 16 # Credits values for char types # Value : Interger N with : # N >= 0 - Maximum credit given for each char type in the password # N < 0 - Minimum number of chars of given type in the password # digit chars -policy_pam_pwquality_dcredit: 0 +policy_pam_pwquality_dcredit: -1 # uppercase chars policy_pam_pwquality_ucredit: 0 # lowercase chars -policy_pam_pwquality_lcredit: 0 +policy_pam_pwquality_lcredit: -1 # other chars -policy_pam_pwquality_ocredit: 0 +policy_pam_pwquality_ocredit: -1 # PAM -- pam_pwhistory # Prevent old password re-use -policy_pam_pwhistory: true +policy_pam_pwhistory: false # How many old passwords to retain policy_pam_pwhistory_length: 5 From 1ec212f514c35f61d85b722c6eb0c8c74a0c4f12 Mon Sep 17 00:00:00 2001 From: Eric Morino Date: Mon, 5 Jun 2023 14:28:06 +0200 Subject: [PATCH 030/182] rename handler --- pgbouncer/handlers/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgbouncer/handlers/main.yml b/pgbouncer/handlers/main.yml index f539a226..9ce44055 100644 --- a/pgbouncer/handlers/main.yml +++ b/pgbouncer/handlers/main.yml @@ -1,5 +1,5 @@ --- -- name: Restart PgBouncer +- name: restart pgbouncer ansible.builtin.systemd: name: pgbouncer.service state: restarted From 9a5b5a39a93f383e727138a76fedaf4ecf6a025f Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Mon, 12 Jun 2023 11:35:53 +0200 Subject: [PATCH 031/182] policy_pam > Add support for Debian 10/9 --- policy_pam/meta/main.yml | 2 ++ policy_pam/tasks/main.yml | 32 ++++++++++++++++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/policy_pam/meta/main.yml b/policy_pam/meta/main.yml index 85198ada..5da132b9 100644 --- a/policy_pam/meta/main.yml +++ b/policy_pam/meta/main.yml @@ -14,6 +14,8 @@ galaxy_info: - name: Debian versions: - bullseye + - buster + - stretch galaxy_tags: [] # Be sure to remove the '[]' above if you add dependencies diff --git a/policy_pam/tasks/main.yml b/policy_pam/tasks/main.yml index 26587d26..a2746011 100644 --- a/policy_pam/tasks/main.yml +++ b/policy_pam/tasks/main.yml @@ -1,20 +1,32 @@ --- -# System compatibility check. yescrypt only works on Debian 11+ -# So we ensure that this role isn't executed on older systems +# System compatibility check. +# Untested on old (Jessie & older) Debian versions - name: "System compatibility check" - assert: + ansible.builtin.assert: that: - ansible_distribution == "Debian" - - ansible_distribution_major_version is version_compare('11', '>=') - msg: pam_policy is only compatible with Debian >= 11 + - ansible_distribution_major_version is version_compare('9', '>=') + msg: pam_policy is only compatible with Debian >= 9 +# yescrypt, Debian 11 default hashing alg isn't present on Debian 10 and lower +- name: "Set hashing alg (sha512 - Debian <= 10)" + ansible.builtin.set_fact: + pam_policy_hashing_alg: 'sha512' + when: + ansible_distribution_major_version is version_compare('10', '<=') + +- name: "Set hashing alg (yescrypt - Debian >= 11 )" + ansible.builtin.set_fact: + pam_policy_hashing_alg: 'yescrypt' + when: + ansible_distribution_major_version is version_compare('11', '>=') # PAM -- pam_pwquality - name: libpam-pwquality is installed - apt: + ansible.builtin.apt: state: present name: - libpam-pwquality @@ -37,7 +49,7 @@ when: policy_pam_pwquality is false - name: Configure pam_pwquality - replace: + ansible.builtin.replace: dest: /etc/security/pwquality.conf regexp: "^#? ?{{ item.name }} = .*" replace: "{{ item.name }} = {{ item.value }}" @@ -70,7 +82,7 @@ # Enforce password minimal age to prevent pam_pwhistory to be circumvented by multiples password changes - name: Change PASS_MIN_DAYS - replace: + ansible.builtin.replace: dest: /etc/login.defs replace: 'PASS_MIN_DAYS\g<1>{{ policy_pam_password_min_days }}' regexp: '^PASS_MIN_DAYS(\s+).*' @@ -81,12 +93,12 @@ ansible.builtin.lineinfile: dest: /etc/pam.d/common-password regexp: 'pam_unix.so obscure' - line: "password [success=1 default=ignore] pam_unix.so obscure use_authtok try_first_pass yescrypt" + line: "password [success=1 default=ignore] pam_unix.so obscure use_authtok try_first_pass {{ pam_policy_hashing_alg }}" when: policy_pam_pwhistory or policy_pam_pwquality - name: Update pam_unix if previous modules are all disabled ansible.builtin.lineinfile: dest: /etc/pam.d/common-password regexp: 'pam_unix.so obscure' - line: "password [success=1 default=ignore] pam_unix.so obscure yescrypt" + line: "password [success=1 default=ignore] pam_unix.so obscure {{ pam_policy_hashing_alg }}" when: policy_pam_pwhistory is false and policy_pam_pwquality is false \ No newline at end of file From 1c60b02e7748f6f9fdf3e1bd2191579a352e9ef9 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 15 Jun 2023 15:26:07 +0200 Subject: [PATCH 032/182] .gitignore .vscode directory --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 102ea9f6..080ae1f8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .kateproject.d .vagrant/ *.swp +.vscode \ No newline at end of file From 19787152d8d1d49703cedbe3f16ca9effe69a5d5 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Thu, 15 Jun 2023 17:19:13 +0200 Subject: [PATCH 033/182] postfix: remove duplicate directive --- postfix/templates/packmail_main.cf.j2 | 1 - 1 file changed, 1 deletion(-) diff --git a/postfix/templates/packmail_main.cf.j2 b/postfix/templates/packmail_main.cf.j2 index b803389e..28c57631 100644 --- a/postfix/templates/packmail_main.cf.j2 +++ b/postfix/templates/packmail_main.cf.j2 @@ -412,7 +412,6 @@ smtpd_sasl_path = private/auth-client # Amavis and OpenDKIM content_filter = smtp-amavis:[127.0.0.1]:10024 -smtp-amavis_destination_concurrency_failed_cohort_limit = 0 smtpd_milters = inet:[127.0.0.1]:8891 non_smtpd_milters = inet:[127.0.0.1]:8891 smtp-amavis_destination_concurrency_failed_cohort_limit = 0 From 2e73bf09f7fa12c6809ed4bdacc9cad48e656d56 Mon Sep 17 00:00:00 2001 From: David Prevot Date: Thu, 15 Jun 2023 16:37:18 +0200 Subject: [PATCH 034/182] amavis: Workaround https://bugs.debian.org/569150 --- amavis/files/amavis_purge_virusmails | 2 ++ amavis/tasks/main.yml | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 amavis/files/amavis_purge_virusmails diff --git a/amavis/files/amavis_purge_virusmails b/amavis/files/amavis_purge_virusmails new file mode 100644 index 00000000..ba7ef51a --- /dev/null +++ b/amavis/files/amavis_purge_virusmails @@ -0,0 +1,2 @@ +#!/bin/bash +find /var/lib/amavis/virusmails/ -type f -mtime +30 -delete diff --git a/amavis/tasks/main.yml b/amavis/tasks/main.yml index 4fa452e5..da46721e 100644 --- a/amavis/tasks/main.yml +++ b/amavis/tasks/main.yml @@ -16,3 +16,12 @@ notify: restart amavis tags: - amavis + +- name: Install purge custom cron + ansible.builtin.copy: + src: amavis_purge_virusmails + dest: /etc/cron.daily/amavis_purge_virusmails + mode: "0755" + tags: + - amavis + - amavis_purge_cron From aec5406043af57dcc9efeb0fa5c929865218ba2f Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Mon, 19 Jun 2023 16:09:40 +0200 Subject: [PATCH 035/182] varnish: Allow the systemd template to be overriden with a template outside of the role --- CHANGELOG.md | 1 + varnish/defaults/main.yml | 6 ++++-- varnish/tasks/main.yml | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0887de1e..a274dbb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * evolinux-users: remove Stretch references in tasks that also apply to next Debian versions * mysql: improve shell syntax for mysql_skip script * pbbouncer: minor fixes +* varnish: Allow the systemd template to be overriden with a template outside of the role ### Fixed diff --git a/varnish/defaults/main.yml b/varnish/defaults/main.yml index ec8a251e..560e241f 100644 --- a/varnish/defaults/main.yml +++ b/varnish/defaults/main.yml @@ -16,8 +16,10 @@ varnish_thread_pool_max: 5000 varnish_jail: "unix,user=vcache" varnish_additional_options: "" +varnish_systemd_override_template: Null + varnish_config_file: /etc/varnish/default.vcl -varnish_update_config: True +varnish_update_config: true varnish_secret_file: /etc/varnish/secret -varnish_tmp_dir: /var/tmp-vcache \ No newline at end of file +varnish_tmp_dir: /var/tmp-vcache diff --git a/varnish/tasks/main.yml b/varnish/tasks/main.yml index 6cdb92db..585688b9 100644 --- a/varnish/tasks/main.yml +++ b/varnish/tasks/main.yml @@ -80,6 +80,7 @@ when: - varnish_package_facts['version'] is version('4', '>=') - varnish_package_facts['version'] is version('6', '<') + - varnish_systemd_override_template | length == 0 tags: - varnish - config @@ -91,6 +92,7 @@ when: - varnish_package_facts['version'] is version('6', '>=') - varnish_package_facts['version'] is version('7', '<') + - varnish_systemd_override_template | length == 0 tags: - varnish - config @@ -101,6 +103,7 @@ varnish_systemd_override_template: override.conf.varnish7.j2 when: - varnish_package_facts['version'] is version('7', '>=') + - varnish_systemd_override_template | length == 0 tags: - varnish - config From 64c1da40b0682404394d85559770060f09df10f6 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Wed, 21 Jun 2023 16:14:35 +0200 Subject: [PATCH 036/182] =?UTF-8?q?nagios-nrpe:=20corrige=20les=20cas=20o?= =?UTF-8?q?=C3=B9=20un=20check=20est=20d=C3=A9fini=20plusieurs=20fois=20ou?= =?UTF-8?q?=20comment=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nagios-nrpe/files/check-local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nagios-nrpe/files/check-local b/nagios-nrpe/files/check-local index 98c2f142..40587425 100755 --- a/nagios-nrpe/files/check-local +++ b/nagios-nrpe/files/check-local @@ -6,7 +6,7 @@ if ! test -f /usr/lib/nagios/plugins/check_nrpe; then fi if [ -r /etc/nagios/nrpe.d/evolix.cfg ]; then - command=$(grep "check_$1" /etc/nagios/nrpe.d/evolix.cfg | tail -n1 | cut -d'=' -f2-) + command=$(grep "check_$1" /etc/nagios/nrpe.d/evolix.cfg | grep -v '^[[:blank:]]*#' | tail -n1 | cut -d'=' -f2-) echo "Command:" echo " $command" fi From 42ad894d454ec002560f0c7afbce1dafa0422bf0 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 23 Jun 2023 11:26:35 +0200 Subject: [PATCH 037/182] dovecot: new Munin plugins, fix old_stats config --- CHANGELOG.md | 4 + dovecot/README.md | 13 + dovecot/files/munin_config | 2 - dovecot/files/munin_plugin | 128 --------- dovecot/files/munin_plugin_dovecot1 | 242 ++++++++++++++++++ dovecot/files/munin_plugin_dovecot_stats_ | 158 ++++++++++++ dovecot/handlers/main.yml | 4 + dovecot/tasks/munin.yml | 75 +++++- dovecot/templates/z-evolinux-defaults.conf.j2 | 21 +- 9 files changed, 506 insertions(+), 141 deletions(-) delete mode 100644 dovecot/files/munin_config delete mode 100755 dovecot/files/munin_plugin create mode 100644 dovecot/files/munin_plugin_dovecot1 create mode 100644 dovecot/files/munin_plugin_dovecot_stats_ diff --git a/CHANGELOG.md b/CHANGELOG.md index a274dbb3..5a1dda59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ The **patch** part changes is incremented if multiple releases happen the same m * userlogrotate: rotate also php.log. * nagios-nrpe: add a NRPE check-local command with completion. * policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory +* dovecot: fix old_stats plugin for Dovecot 2.3. +* dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) ### Changed @@ -34,6 +36,8 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Removed +* dovecot: remove Munin plugin dovecot (not working) + ### Security ## [23.04] 2023-04-23 diff --git a/dovecot/README.md b/dovecot/README.md index 736b95dc..8652006f 100644 --- a/dovecot/README.md +++ b/dovecot/README.md @@ -2,6 +2,8 @@ Installation and basic configuration of dovecot +Do not use this role to update Dovecot 2.2 to 2.3. + ## Tasks Minimal configuration is in `tasks/main.yml` @@ -9,3 +11,14 @@ Minimal configuration is in `tasks/main.yml` ## Available variables The full list of variables (with default values) can be found in `defaults/main.yml`. + +## Munin plugins + +### dovecot_stats_ + +Note : This is an Evolix patched version. + +This plugin can be installed only when installin a server, because it needs Dovevcot plugin stats (Dovecot 2.2) or old_stats (Dovecot 2.3), which previously were not activated by default. + +To skip this plugin installation, use "--skip-tags dovecot_stats_". + diff --git a/dovecot/files/munin_config b/dovecot/files/munin_config deleted file mode 100644 index 1a0553d8..00000000 --- a/dovecot/files/munin_config +++ /dev/null @@ -1,2 +0,0 @@ -[dovecot] -group adm diff --git a/dovecot/files/munin_plugin b/dovecot/files/munin_plugin deleted file mode 100755 index f12c2b04..00000000 --- a/dovecot/files/munin_plugin +++ /dev/null @@ -1,128 +0,0 @@ -#! /bin/bash -# -# Munin Plugin -# to count logins to your dovecot mailserver -# -# Created by Dominik Schulz -# http://developer.gauner.org/munin/ -# Contributions by: -# - Stephane Enten -# - Steve Schnepp -# - pcy (make 'Connected Users' DERIVE, check existence of logfile in autoconf) -# -# Parameters understood: -# -# config (required) -# autoconf (optional - used by munin-config) -# -# Config variables: -# -# logfile - Where to find the syslog file -# -# Add the following line to a file in /etc/munin/plugin-conf.d: -# env.logfile /var/log/your/logfile.log -# -# Magic markers (optional - used by munin-config and installation scripts): -# -#%# family=auto -#%# capabilities=autoconf - -###################### -# Configuration -###################### -EXPR_BIN=/usr/bin/expr -LOGFILE=${logfile:-/var/log/mail.log} -###################### - -if [ "$1" = "autoconf" ]; then - [ -f "$LOGFILE" ] && echo yes || echo "no (logfile $LOGFILE not found)" - exit 0 -fi - -if [ "$1" = "config" ]; then - echo 'graph_title Dovecot Logins' - echo 'graph_category mail' - echo 'graph_args --base 1000 -l 0' - echo 'graph_vlabel Login Counters' - - for t in Total TLS SSL IMAP POP3 - do - field=$(echo $t | tr '[:upper:]' '[:lower:]') - echo "login_$field.label $t Logins" - echo "login_$field.type DERIVE" - echo "login_$field.min 0" - done - - echo 'connected.label Connected Users' - echo "connected.type DERIVE" - - exit 0 -fi - -###################### -# Total Logins -###################### -echo -en "login_total.value " -VALUE=$(egrep -c '[dovecot]?.*Login' $LOGFILE) -if [ ! -z "$VALUE" ]; then - echo "$VALUE" -else - echo "0" -fi -echo -n -###################### -# Connected Users -###################### -DISCONNECTS=$(egrep -c '[dovecot]?.*Disconnected' $LOGFILE) -CONNECTS=$(egrep -c '[dovecot]?.*Login' $LOGFILE) -VALUE=$($EXPR_BIN $CONNECTS - $DISCONNECTS) -if [ -z "$VALUE" ] || [ "$VALUE" -lt 0 ]; then - VALUE=0 -fi -echo -en "connected.value " -echo $VALUE -echo -n -###################### -# TLS Logins -###################### -echo -en "login_tls.value " -VALUE=$(egrep -c '[dovecot]?.*Login.*TLS' $LOGFILE) -if [ ! -z "$VALUE" ]; then - echo "$VALUE" -else - echo "0" -fi -echo -n -###################### -# SSL Logins -###################### -echo -en "login_ssl.value " -VALUE=$(egrep -c '[dovecot]?.*Login.*SSL' $LOGFILE) -if [ ! -z "$VALUE" ]; then - echo "$VALUE" -else - echo "0" -fi -echo -n -###################### -# IMAP Logins -###################### -echo -en "login_imap.value " -VALUE=$(egrep -c '[dovecot]?.*imap.*Login' $LOGFILE) -if [ ! -z "$VALUE" ]; then - echo "$VALUE" -else - echo "0" -fi -echo -n -###################### -# POP3 Logins -###################### -echo -en "login_pop3.value " -VALUE=$(egrep -c '[dovecot]?.*pop3.*Login' $LOGFILE) -if [ ! -z "$VALUE" ]; then - echo "$VALUE" -else - echo "0" -fi -echo -n diff --git a/dovecot/files/munin_plugin_dovecot1 b/dovecot/files/munin_plugin_dovecot1 new file mode 100644 index 00000000..83f4d897 --- /dev/null +++ b/dovecot/files/munin_plugin_dovecot1 @@ -0,0 +1,242 @@ +#!/usr/bin/perl + +#%# family=auto +#%# capabilities=autoconf + +use Munin::Plugin; + +$pos = undef; +$connected = 0; +$connectedimap = 0; +$connectedpop3 = 0; +$connections = 0; +$connectionsimap = 0; +$connectionspop3 = 0; +$login = 0; +$pop3login = 0; +$imaplogin = 0; +$tls = 0; +$ssl = 0; +$aborted = 0; + +($dirname = $0) =~ s/[^\/]+$//; + +$dovelogfile = 0 ; + +$logfile = $ENV{'LOGFILE'} || '/var/log/mail.log'; + +if ( $logfile =~ /dovecot/ ) { + $dovelogfile = 1 ; +} + +# Use an overridden $PATH for all external programs if needed +$DOVEADM = "doveadm"; + +if ( $ARGV[0] and $ARGV[0] eq "autoconf" ) { + + if (! -x $DOVEADM) { + print "no (no doveadm)\n"; + exit(0); + } + + if (! -f $logfile) { + print "no (logfile $logfile does not exist)\n"; + exit(0); + } + + if (-r "$logfile") { + print "yes\n"; + exit 0; + } else { + print "no (logfile not readable)\n"; + } + exit 0; +} + +if (-f "$logfile.0") { + $rotlogfile = $logfile . ".0"; +} elsif (-f "$logfile.1") { + $rotlogfile = $logfile . ".1"; +} elsif (-f "$logfile.01") { + $rotlogfile = $logfile . ".01"; +} else { + $rotlogfile = $logfile . ".0"; +} + +if ( $ARGV[0] and $ARGV[0] eq "config" ) { + print "multigraph dovecot_connections\n"; + print "graph_title Dovecot connections\n"; + print "graph_args --base 1000 -l 0 --no-gridfit --slope-mode\n"; + print "graph_vlabel connections\n"; + print "graph_category mail\n"; + print "connections.label Connections open\n"; + print "connections.type GAUGE\n"; + print "connections.draw LINE1\n"; + print "connections.min 0\n"; + print "connectionsimap.label IMAP\n"; + print "connectionsimap.type GAUGE\n"; + print "connectionsimap.draw AREA\n"; + print "connectionsimap.min 0\n"; + print "connectionspop3.label POP3\n"; + print "connectionspop3.type GAUGE\n"; + print "connectionspop3.draw STACK\n"; + print "connectionspop3.min 0\n"; + + print "multigraph dovecot_connected\n"; + print "graph_title Dovecot connected users\n"; + print "graph_args --base 1000 -l 0 --no-gridfit --slope-mode\n"; + print "graph_vlabel connections\n"; + print "graph_category mail\n"; + print "connected.label Connected users\n"; + print "connected.type GAUGE\n"; + print "connected.draw LINE1\n"; + print "connected.min 0\n"; + print "connectedimap.label IMAP\n"; + print "connectedimap.type GAUGE\n"; + print "connectedimap.draw AREA\n"; + print "connectedimap.min 0\n"; + print "connectedpop3.label POP3\n"; + print "connectedpop3.type GAUGE\n"; + print "connectedpop3.draw STACK\n"; + print "connectedpop3.min 0\n"; + + print "multigraph dovecot_logins\n"; + print "graph_title Dovecot logins\n"; + print "graph_args --base 1000 -l 0 --no-gridfit --slope-mode\n"; + print "graph_vlabel logins/5 minute\n"; + print "graph_category mail\n"; + print "login.label Logins\n"; + print "login.type GAUGE\n"; + print "login.draw LINE1\n"; + print "login.min 0\n"; + print "imaplogin.label IMAP logins\n"; + print "imaplogin.type GAUGE\n"; + print "imaplogin.draw LINE1\n"; + print "imaplogin.min 0\n"; + print "pop3login.label POP3 logins\n"; + print "pop3login.type GAUGE\n"; + print "pop3login.draw LINE1\n"; + print "pop3login.min 0\n"; + print "tls.label TLS\n"; + print "tls.type GAUGE\n"; + print "tls.draw LINE1\n"; + print "tls.min 0\n"; + print "ssl.label SSL\n"; + print "ssl.type GAUGE\n"; + print "ssl.draw LINE1\n"; + print "ssl.min 0\n"; + print "aborted.label Aborted logins\n"; + print "aborted.type GAUGE\n"; + print "aborted.draw LINE1\n"; + print "aborted.min 0\n"; + exit 0; +} + +if (! -f $logfile and ! -f $rotlogfile) { + print "multigraph dovecot_connections\n"; + print "connections.value U"; + print "connectionsimap.value U"; + print "connectionspop3.value U"; + print "multigraph dovecot_connected\n"; + print "connected.value U\n"; + print "connectedimap.value U\n"; + print "connectedpop3.value U\n"; + print "multigraph dovecot_logins\n"; + print "login.value U\n"; + print "pop3login.value U\n"; + print "imaplogin.value U\n"; + print "tls.value U\n"; + print "ssl.value U\n"; + print "aborted.value U\n"; + + exit 0; +} + +# dit kan beter maar twee calls zijn toch nodig also we niet zelf aggegreren +# suggestie: doveadm who -1 | awk '{print $1" "$2" "$4}' | sort | uniq -c +$connectedimap = `$DOVEADM -f flow who | grep imap | wc -l`; +$connectedpop3 = `$DOVEADM -f flow who | grep pop3 | wc -l`; +$connectionsimap = `$DOVEADM -f flow who -1 | grep imap | wc -l`; +$connectionspop3 = `$DOVEADM -f flow who -1 | grep pop3 | wc -l`; + +#trim +$connectedimap =~ s/\s+$//; +$connectedpop3 =~ s/\s+$//; +$connectionsimap =~ s/\s+$//; +$connectionspop3 =~ s/\s+$//; + +$connected = $connectedimap + $connectedpop3; +$connections = $connectionsimap + $connectionspop3; + +my ($pos) = restore_state(); + +$startsize = (stat $logfile)[7]; + +if (!defined $pos) { + # Initial run. + $pos = $startsize; +} + +if ($startsize < $pos) { + # Log rotated + parseDovecotfile ($rotlogfile, $pos, (stat $rotlogfile)[7]); + $pos = 0; +} + +parseDovecotfile ($logfile, $pos, $startsize); +$pos = $startsize; + +save_state($pos); + +print "multigraph dovecot_connections\n"; +print "connections.value $connections\n"; +print "connectionsimap.value $connectionsimap\n"; +print "connectionspop3.value $connectionspop3\n"; +print "multigraph dovecot_connected\n"; +print "connected.value $connected\n"; +print "connectedimap.value $connectedimap\n"; +print "connectedpop3.value $connectedpop3\n"; +print "multigraph dovecot_logins\n"; +print "login.value $login\n"; +print "pop3login.value $pop3login\n"; +print "imaplogin.value $imaplogin\n"; +print "tls.value $tls\n"; +print "ssl.value $ssl\n"; +print "aborted.value $aborted\n"; + + +sub parseDovecotfile { + my ($fname, $start, $stop) = @_; + open (logf, $fname) or exit 3; + seek (logf, $start, 0) or exit 2; + + while (tell (logf) < $stop) { + my $line =; + chomp ($line); + + if ( $dovelogfile == 0 and $line !~ m/dovecot/) { next; } + else { + if ($line =~ m/Aborted/) { + $aborted++; + + } elsif ($line =~ m/Login:/) { + $login++; + + if ( $line =~ m/TLS/) { + $tls++; + } elsif ($line =~ m/SSL/) { + $ssl++; + } + + if ( $line =~ m/pop3-login:/) { + $pop3login++; + } elsif ($line =~ m/imap-login:/) { + $imaplogin++; + } + } + } + } + close(logf); +} + +# vim:syntax=perl diff --git a/dovecot/files/munin_plugin_dovecot_stats_ b/dovecot/files/munin_plugin_dovecot_stats_ new file mode 100644 index 00000000..6daf9bae --- /dev/null +++ b/dovecot/files/munin_plugin_dovecot_stats_ @@ -0,0 +1,158 @@ +#!/bin/bash +: <<=cut + +=head1 NAME + +dovecot_stats_ - Munin plugin to display statistics for the dovecot mail server + +=head1 CONFIGURATION + +This plugin must be run with permissions to run "doveadm". That usually means root, but to test, run the following as any user: + + doveadm who + +If you get a permission denied message, check the permissions on the socket mentioned in the error line. + +=head1 MAGIC MARKERS + + #%# family=contrib + #%# capability=autoconf suggest + +=head1 AUTHOR + +Paul Saunders + +=cut + +. $MUNIN_LIBDIR/plugins/plugin.sh +is_multigraph + +if [[ "$1" == "autoconf" ]]; then + if [[ -x /usr/bin/doveadm ]]; then + echo yes + else + echo no + fi + exit 0 +fi + +# Dovecot 2.3 changes the stas format, but we can still access the older version with "doveadm oldstats". +dovecot_version=$(/usr/sbin/dovecot --version | awk '{print $1}') + +verlte() { + [ "$1" = "$2" ] && return 1 || [ "$2" = "`echo -e "$1\n$2" | sort -V | head -n1`" ] +} + +verlt() { + [ "$1" = "$2" ] && return 1 || verlte $2 $1 +} + +# The stats command is "stats" unless the version is NOT less than 2.3, in which case it's "oldstats". +stats_command="stats" +verlt $dovecot_version 2.3 || stats_command="oldstats" + + +if [[ "$1" == "suggest" ]]; then + doveadm $stats_command dump domain|awk 'NR!=1 {print $1}' + exit 0 +fi + +domain=$(basename $0) +domain=${domain#dovecot_stats_} + +if [[ -z $domain ]]; then + exit 1 +fi + +if [[ "$1" == "config" ]]; then + cat < Date: Fri, 23 Jun 2023 15:10:02 +0200 Subject: [PATCH 038/182] Drop useless spaces --- apt/tasks/migrate-to-deb822.yml | 6 +++--- listupgrade/tasks/main.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apt/tasks/migrate-to-deb822.yml b/apt/tasks/migrate-to-deb822.yml index 720045bf..60ee0f2c 100644 --- a/apt/tasks/migrate-to-deb822.yml +++ b/apt/tasks/migrate-to-deb822.yml @@ -14,8 +14,8 @@ - name: Migration scripts are installed ansible.builtin.copy: - src: "{{ item }}" - dest: "/usr/share/scripts/{{ item }}" + src: "{{ item }}" + dest: "/usr/share/scripts/{{ item }}" force: yes mode: "0755" loop: @@ -29,4 +29,4 @@ cmd: /usr/share/scripts/deb822-migration.sh ignore_errors: yes tags: - - apt \ No newline at end of file + - apt diff --git a/listupgrade/tasks/main.yml b/listupgrade/tasks/main.yml index f51c0f09..e3f308ef 100644 --- a/listupgrade/tasks/main.yml +++ b/listupgrade/tasks/main.yml @@ -50,7 +50,7 @@ name: "listupgrade.sh" cron_file: "listupgrade" user: root - job: "/usr/share/scripts/listupgrade.sh --cron {{ listupgrade_cron_force | bool | ternary('--force','') }}" + job: "/usr/share/scripts/listupgrade.sh --cron{{ listupgrade_cron_force | bool | ternary(' --force','') }}" minute: "{{ listupgrade_cron_minute }}" hour: "{{ listupgrade_cron_hour }}" weekday: "{{ listupgrade_cron_weekday }}" From def4d545381ce72e4b21b38a0b72a808e310ba55 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Tue, 27 Jun 2023 17:09:19 +0200 Subject: [PATCH 039/182] dovecot: fix taks for check mode (minor) --- dovecot/tasks/munin.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dovecot/tasks/munin.yml b/dovecot/tasks/munin.yml index dd53d35f..d223f1e0 100644 --- a/dovecot/tasks/munin.yml +++ b/dovecot/tasks/munin.yml @@ -60,6 +60,8 @@ regex: '^[[:blank:]]*user root[[:blank:]]*$' insertafter: '\[{{ item }}\]' line: 'user root' + create: yes + mode: '0644' loop: ['dovecot1', 'dovecot_stats_*'] notify: restart munin-node From 00fe225a3ce0164effde8b5a14147bb6310119ee Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Wed, 28 Jun 2023 13:22:59 +0200 Subject: [PATCH 040/182] =?UTF-8?q?force:=20[yes,no]=20=E2=86=92=20force?= =?UTF-8?q?=20[true,false]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + apache/tasks/auth.yml | 4 ++-- apache/tasks/log2mail.yml | 2 +- apache/tasks/main.yml | 10 +++++----- apache/tasks/server_status.yml | 2 +- apt/tasks/backports.deb822.yml | 4 ++-- apt/tasks/backports.oneline.yml | 4 ++-- apt/tasks/basics.deb822.yml | 4 ++-- apt/tasks/basics.oneline.yml | 2 +- apt/tasks/evolix_public.deb822.yml | 4 ++-- apt/tasks/evolix_public.oneline.yml | 4 ++-- apt/tasks/hold_packages.yml | 2 +- apt/tasks/migrate-to-deb822.yml | 2 +- bind/tasks/authoritative.yml | 2 +- bind/tasks/main.yml | 8 ++++---- bind/tasks/munin.yml | 2 +- bind/tasks/recursive.yml | 2 +- certbot/tasks/acme-challenge.yml | 4 ++-- certbot/tasks/install-legacy.yml | 4 ++-- docker-host/tasks/main.yml | 2 +- elasticsearch/tasks/additional_scripts.yml | 2 +- elasticsearch/tasks/apt_sources.yml | 2 +- etc-git/tasks/repository.yml | 2 +- etc-git/tasks/utils.yml | 8 ++++---- evocheck/tasks/cron.yml | 2 +- evocheck/tasks/install.yml | 4 ++-- evolinux-base/tasks/default_www.yml | 2 +- evolinux-base/tasks/dump-server-state.yml | 2 +- evolinux-base/tasks/hardware.dell.yml | 2 +- evolinux-base/tasks/hardware.hp.yml | 2 +- evolinux-base/tasks/hostname.yml | 2 +- evolinux-base/tasks/root.yml | 4 ++-- evolinux-base/tasks/system.yml | 6 +++--- evolinux-base/tasks/utils.yml | 2 +- evolinux-todo/tasks/main.yml | 2 +- evolinux-users/tasks/sudo_common.yml | 2 +- evolinux-users/tasks/sudo_jessie.yml | 2 +- evomaintenance/tasks/install_vendor_debian.yml | 2 +- evomaintenance/tasks/install_vendor_other.yml | 2 +- filebeat/tasks/apt_sources.yml | 2 +- fluentd/tasks/main.yml | 2 +- haproxy/tasks/munin.yml | 2 +- haproxy/tasks/packages_backports.yml | 2 +- jenkins/tasks/main.yml | 2 +- keepalived/tasks/main.yml | 4 ++-- kibana/tasks/apt_sources.yml | 2 +- kibana/tasks/proxy_nginx.yml | 4 ++-- kvm-host/tasks/munin.yml | 4 ++-- kvm-host/tasks/tools.yml | 6 +++--- listupgrade/tasks/main.yml | 4 ++-- logstash/tasks/apt_sources.yml | 2 +- memcached/tasks/nrpe.yml | 2 +- metricbeat/tasks/apt_sources.yml | 2 +- mongodb/tasks/main_bookworm.yml | 4 ++-- mongodb/tasks/main_bullseye.yml | 6 +++--- mongodb/tasks/main_buster.yml | 6 +++--- mongodb/tasks/main_jessie.yml | 4 ++-- mongodb/tasks/main_stretch.yml | 2 +- monit/tasks/main.yml | 2 +- mysql-oracle/tasks/config.yml | 4 ++-- mysql-oracle/tasks/packages.yml | 4 ++-- mysql-oracle/tasks/utils.yml | 4 ++-- mysql/tasks/config_jessie.yml | 2 +- mysql/tasks/config_stretch.yml | 4 ++-- mysql/tasks/mysql_skip.yml | 4 ++-- mysql/tasks/utils.yml | 12 ++++++------ nagios-nrpe/tasks/main.yml | 2 +- nagios-nrpe/tasks/wrapper.yml | 4 ++-- newrelic/tasks/sources.yml | 2 +- nginx/tasks/logrotate.yml | 2 +- nginx/tasks/main.yml | 10 +++++----- nginx/tasks/packages_backports.yml | 2 +- nginx/tasks/server_status_read.yml | 2 +- opendkim/tasks/main.yml | 4 ++-- openvpn/tasks/debian.yml | 2 +- packweb-apache/tasks/apache.yml | 4 ++-- packweb-apache/tasks/awstats.yml | 2 +- packweb-apache/tasks/phpmyadmin.yml | 4 ++-- percona/tasks/main.yml | 2 +- php/tasks/config_apache.yml | 2 +- php/tasks/config_cli.yml | 4 ++-- php/tasks/config_fpm.yml | 4 ++-- php/tasks/sury_post.yml | 6 +++--- postfix/tasks/minimal.yml | 2 +- postfix/tasks/packmail.yml | 4 ++-- postgresql/tasks/config.yml | 2 +- postgresql/tasks/logrotate.yml | 2 +- postgresql/tasks/pgdg-repo.yml | 2 +- proftpd/tasks/main.yml | 2 +- rabbitmq/tasks/main.yml | 4 ++-- rabbitmq/tasks/nrpe.yml | 4 ++-- rbenv/tasks/main.yml | 4 ++-- redis/tasks/nrpe.yml | 4 ++-- squid/tasks/logrotate_jessie.yml | 2 +- squid/tasks/logrotate_stretch.yml | 2 +- squid/tasks/main.yml | 16 ++++++++-------- squid/tasks/systemd.yml | 2 +- supervisord/tasks/main.yml | 2 +- tomcat-instance/tasks/bootstrap.yml | 6 +++--- unbound/tasks/main.yml | 2 +- varnish/tasks/main.yml | 12 ++++++------ vrrpd/tasks/ip.yml | 2 +- webapps/nextcloud/tasks/archive.yml | 4 ++-- 103 files changed, 179 insertions(+), 178 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a1dda59..16d1312e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Changed +* all: change syntax "force: [yes,no]" → "force [true,false]" * elasticsearch: improve networking configuration * evolinux-users: remove Stretch references in tasks that also apply to next Debian versions * mysql: improve shell syntax for mysql_skip script diff --git a/apache/tasks/auth.yml b/apache/tasks/auth.yml index 2c4d75ff..596c63e9 100644 --- a/apache/tasks/auth.yml +++ b/apache/tasks/auth.yml @@ -7,7 +7,7 @@ owner: root group: root mode: "0640" - force: no + force: false tags: - apache @@ -30,7 +30,7 @@ owner: root group: root mode: "0640" - force: no + force: false notify: reload apache tags: - apache diff --git a/apache/tasks/log2mail.yml b/apache/tasks/log2mail.yml index 42b18dae..f0f1853d 100644 --- a/apache/tasks/log2mail.yml +++ b/apache/tasks/log2mail.yml @@ -14,6 +14,6 @@ owner: log2mail group: adm mode: "0644" - force: no + force: false tags: - apache diff --git a/apache/tasks/main.yml b/apache/tasks/main.yml index c1ca9d7b..78dabc61 100644 --- a/apache/tasks/main.yml +++ b/apache/tasks/main.yml @@ -73,7 +73,7 @@ owner: root group: root mode: "0640" - force: yes + force: true notify: reload apache tags: - apache @@ -85,7 +85,7 @@ owner: root group: root mode: "0640" - force: no + force: false notify: reload apache tags: - apache @@ -119,7 +119,7 @@ src: evolinux-default.conf.j2 dest: /etc/apache2/sites-available/000-evolinux-default.conf mode: "0640" - force: no + force: false notify: reload apache tags: - apache @@ -129,7 +129,7 @@ src: /etc/apache2/sites-available/000-evolinux-default.conf dest: /etc/apache2/sites-enabled/000-default.conf state: link - force: yes + force: true notify: reload apache when: apache_evolinux_default_enabled | bool tags: @@ -181,7 +181,7 @@ src: save_apache_status.sh dest: /usr/share/scripts/save_apache_status.sh mode: "0755" - force: no + force: false tags: - apache diff --git a/apache/tasks/server_status.yml b/apache/tasks/server_status.yml index 7b188e51..271a8739 100644 --- a/apache/tasks/server_status.yml +++ b/apache/tasks/server_status.yml @@ -13,7 +13,7 @@ dest: "{{ apache_serverstatus_suffix_file }}" # The last character "\u000A" is a line feed (LF), it's better to keep it content: "{{ apache_serverstatus_suffix }}\u000A" - force: yes + force: true when: apache_serverstatus_suffix | length > 0 - name: generate random string for server-status suffix diff --git a/apt/tasks/backports.deb822.yml b/apt/tasks/backports.deb822.yml index 421e59e6..0382892d 100644 --- a/apt/tasks/backports.deb822.yml +++ b/apt/tasks/backports.deb822.yml @@ -4,7 +4,7 @@ ansible.builtin.template: src: '{{ ansible_distribution_release }}_backports.sources.j2' dest: /etc/apt/sources.list.d/backports.sources - force: yes + force: true mode: "0640" register: apt_backports_sources tags: @@ -14,7 +14,7 @@ ansible.builtin.copy: src: '{{ ansible_distribution_release }}_backports_preferences' dest: /etc/apt/preferences.d/0-backports-defaults - force: yes + force: true mode: "0640" register: apt_backports_config tags: diff --git a/apt/tasks/backports.oneline.yml b/apt/tasks/backports.oneline.yml index 9b7118b7..11de5c52 100644 --- a/apt/tasks/backports.oneline.yml +++ b/apt/tasks/backports.oneline.yml @@ -11,7 +11,7 @@ ansible.builtin.template: src: '{{ ansible_distribution_release }}_backports.list.j2' dest: /etc/apt/sources.list.d/backports.list - force: yes + force: true mode: "0640" register: apt_backports_list tags: @@ -21,7 +21,7 @@ ansible.builtin.copy: src: '{{ ansible_distribution_release }}_backports_preferences' dest: /etc/apt/preferences.d/0-backports-defaults - force: yes + force: true mode: "0640" register: apt_backports_config tags: diff --git a/apt/tasks/basics.deb822.yml b/apt/tasks/basics.deb822.yml index a8663572..617e6c92 100644 --- a/apt/tasks/basics.deb822.yml +++ b/apt/tasks/basics.deb822.yml @@ -5,7 +5,7 @@ src: "{{ ansible_distribution_release }}_basics.sources.j2" dest: /etc/apt/sources.list.d/system.sources mode: "0644" - force: yes + force: true register: apt_basic_sources tags: - apt @@ -15,7 +15,7 @@ src: "{{ ansible_distribution_release }}_security.sources.j2" dest: /etc/apt/sources.list.d/security.sources mode: "0644" - force: yes + force: true register: apt_security_sources tags: - apt diff --git a/apt/tasks/basics.oneline.yml b/apt/tasks/basics.oneline.yml index 4d457f0d..f949a0b2 100644 --- a/apt/tasks/basics.oneline.yml +++ b/apt/tasks/basics.oneline.yml @@ -5,7 +5,7 @@ src: "{{ ansible_distribution_release }}_basics.list.j2" dest: /etc/apt/sources.list mode: "0644" - force: yes + force: true register: apt_basic_list tags: - apt diff --git a/apt/tasks/evolix_public.deb822.yml b/apt/tasks/evolix_public.deb822.yml index 036645e7..84d193b3 100644 --- a/apt/tasks/evolix_public.deb822.yml +++ b/apt/tasks/evolix_public.deb822.yml @@ -20,7 +20,7 @@ ansible.builtin.copy: src: pub_evolix.asc dest: "{{ apt_keyring_dir }}/pub_evolix.asc" - force: yes + force: true mode: "0644" owner: root group: root @@ -31,7 +31,7 @@ ansible.builtin.template: src: evolix_public.sources.j2 dest: /etc/apt/sources.list.d/evolix_public.sources - force: yes + force: true mode: "0640" register: apt_evolix_public tags: diff --git a/apt/tasks/evolix_public.oneline.yml b/apt/tasks/evolix_public.oneline.yml index 9c502a33..deff0b7d 100644 --- a/apt/tasks/evolix_public.oneline.yml +++ b/apt/tasks/evolix_public.oneline.yml @@ -20,7 +20,7 @@ ansible.builtin.copy: src: pub_evolix.asc dest: "{{ apt_keyring_dir }}/pub_evolix.asc" - force: yes + force: true mode: "0644" owner: root group: root @@ -31,7 +31,7 @@ ansible.builtin.template: src: evolix_public.list.j2 dest: /etc/apt/sources.list.d/evolix_public.list - force: yes + force: true mode: "0640" register: apt_evolix_public tags: diff --git a/apt/tasks/hold_packages.yml b/apt/tasks/hold_packages.yml index 26ced4c7..e92b7b44 100644 --- a/apt/tasks/hold_packages.yml +++ b/apt/tasks/hold_packages.yml @@ -71,7 +71,7 @@ ansible.builtin.copy: src: check_held_packages.sh dest: /usr/share/scripts/check_held_packages.sh - force: yes + force: true mode: "0755" tags: - apt diff --git a/apt/tasks/migrate-to-deb822.yml b/apt/tasks/migrate-to-deb822.yml index 60ee0f2c..18aa1580 100644 --- a/apt/tasks/migrate-to-deb822.yml +++ b/apt/tasks/migrate-to-deb822.yml @@ -16,7 +16,7 @@ ansible.builtin.copy: src: "{{ item }}" dest: "/usr/share/scripts/{{ item }}" - force: yes + force: true mode: "0755" loop: - deb822-migration.py diff --git a/bind/tasks/authoritative.yml b/bind/tasks/authoritative.yml index abfa96d8..7fbd827d 100644 --- a/bind/tasks/authoritative.yml +++ b/bind/tasks/authoritative.yml @@ -7,5 +7,5 @@ owner: bind group: bind mode: "0644" - force: yes + force: true notify: restart bind \ No newline at end of file diff --git a/bind/tasks/main.yml b/bind/tasks/main.yml index 67776531..1e20eee2 100644 --- a/bind/tasks/main.yml +++ b/bind/tasks/main.yml @@ -23,7 +23,7 @@ owner: root group: root mode: "0644" - force: yes + force: true notify: restart apparmor when: check_apparmor.rc == 0 @@ -47,7 +47,7 @@ owner: root group: root mode: "0644" - force: yes + force: true notify: - reload systemd - restart bind @@ -77,7 +77,7 @@ dest: /root/chroot-bind.sh mode: "0700" owner: root - force: yes + force: true backup: yes when: bind_chroot_set | bool @@ -109,7 +109,7 @@ owner: root group: root mode: "0644" - force: yes + force: true notify: restart bind - ansible.builtin.include: munin.yml diff --git a/bind/tasks/munin.yml b/bind/tasks/munin.yml index 4a655533..fee99750 100644 --- a/bind/tasks/munin.yml +++ b/bind/tasks/munin.yml @@ -48,7 +48,7 @@ owner: root group: root mode: "0644" - force: yes + force: true notify: restart munin-node tags: - bind diff --git a/bind/tasks/recursive.yml b/bind/tasks/recursive.yml index 364f1021..887f206e 100644 --- a/bind/tasks/recursive.yml +++ b/bind/tasks/recursive.yml @@ -8,7 +8,7 @@ owner: bind group: bind mode: "0644" - force: yes + force: true notify: restart bind - name: enable zones.rfc1918 for recursive server diff --git a/certbot/tasks/acme-challenge.yml b/certbot/tasks/acme-challenge.yml index 29c0267d..acd93fe0 100644 --- a/certbot/tasks/acme-challenge.yml +++ b/certbot/tasks/acme-challenge.yml @@ -15,7 +15,7 @@ ansible.builtin.template: src: acme-challenge/nginx.conf.j2 dest: /etc/nginx/snippets/letsencrypt.conf - force: yes + force: true notify: reload nginx when: is_nginx.stat.exists @@ -30,7 +30,7 @@ ansible.builtin.template: src: acme-challenge/apache.conf.j2 dest: /etc/apache2/conf-available/letsencrypt.conf - force: yes + force: true notify: reload apache - name: ACME challenge for Apache is enabled diff --git a/certbot/tasks/install-legacy.yml b/certbot/tasks/install-legacy.yml index 3048a4a4..157c8dc1 100644 --- a/certbot/tasks/install-legacy.yml +++ b/certbot/tasks/install-legacy.yml @@ -16,7 +16,7 @@ mode: '0755' owner: root group: root - force: yes + force: true notify: install letsencrypt-auto - name: Check certbot script @@ -49,7 +49,7 @@ ansible.builtin.copy: src: cron_jessie dest: /etc/cron.d/certbot - force: yes + force: true when: certbot_custom_crontab | bool - name: disable self-upgrade diff --git a/docker-host/tasks/main.yml b/docker-host/tasks/main.yml index db57a6b6..f4175297 100644 --- a/docker-host/tasks/main.yml +++ b/docker-host/tasks/main.yml @@ -26,7 +26,7 @@ ansible.builtin.copy: src: docker-debian.asc dest: "{{ apt_keyring_dir }}/docker-debian.asc" - force: yes + force: true mode: "0644" owner: root group: root diff --git a/elasticsearch/tasks/additional_scripts.yml b/elasticsearch/tasks/additional_scripts.yml index 8dcb0759..abda3090 100644 --- a/elasticsearch/tasks/additional_scripts.yml +++ b/elasticsearch/tasks/additional_scripts.yml @@ -19,4 +19,4 @@ mode: "0755" owner: "root" group: "root" - force: yes + force: true diff --git a/elasticsearch/tasks/apt_sources.yml b/elasticsearch/tasks/apt_sources.yml index a0395ffe..e525ba4b 100644 --- a/elasticsearch/tasks/apt_sources.yml +++ b/elasticsearch/tasks/apt_sources.yml @@ -9,7 +9,7 @@ ansible.builtin.copy: src: elastic.asc dest: "{{ apt_keyring_dir }}/elastic.asc" - force: yes + force: true mode: "0644" owner: root group: root diff --git a/etc-git/tasks/repository.yml b/etc-git/tasks/repository.yml index 1601a157..426eab41 100644 --- a/etc-git/tasks/repository.yml +++ b/etc-git/tasks/repository.yml @@ -38,7 +38,7 @@ dest: "{{ repository_path }}/.gitignore" owner: root mode: "0600" - force: no + force: false tags: - etc-git diff --git a/etc-git/tasks/utils.yml b/etc-git/tasks/utils.yml index b54e1c61..e33589b3 100644 --- a/etc-git/tasks/utils.yml +++ b/etc-git/tasks/utils.yml @@ -10,7 +10,7 @@ src: evocommit dest: /usr/local/bin/evocommit mode: "0755" - force: yes + force: true tags: - etc-git @@ -19,7 +19,7 @@ src: ansible-commit dest: /usr/local/bin/ansible-commit mode: "0755" - force: yes + force: true tags: - etc-git @@ -28,7 +28,7 @@ src: etc-git-optimize dest: /usr/share/scripts/etc-git-optimize mode: "0755" - force: yes + force: true tags: - etc-git @@ -37,7 +37,7 @@ src: etc-git-status dest: /usr/share/scripts/etc-git-status mode: "0755" - force: yes + force: true tags: - etc-git diff --git a/evocheck/tasks/cron.yml b/evocheck/tasks/cron.yml index cfea8ca2..4e9c249e 100644 --- a/evocheck/tasks/cron.yml +++ b/evocheck/tasks/cron.yml @@ -16,5 +16,5 @@ mode: "0644" owner: root group: root - force: yes + force: true when: is_cron_installed.rc == 0 diff --git a/evocheck/tasks/install.yml b/evocheck/tasks/install.yml index b210302b..d1c1daf0 100644 --- a/evocheck/tasks/install.yml +++ b/evocheck/tasks/install.yml @@ -36,7 +36,7 @@ dest: "{{ evocheck_bin_dir }}/evocheck.sh" mode: "0700" owner: root - force: yes + force: true tags: - evocheck @@ -44,6 +44,6 @@ ansible.builtin.copy: src: evocheck.cf dest: /etc/evocheck.cf - force: no + force: false tags: - evocheck diff --git a/evolinux-base/tasks/default_www.yml b/evolinux-base/tasks/default_www.yml index 2d94fe2b..673ac397 100644 --- a/evolinux-base/tasks/default_www.yml +++ b/evolinux-base/tasks/default_www.yml @@ -20,7 +20,7 @@ src: default_www/index.html.j2 dest: /var/www/index.html mode: "0644" - force: no + force: false when: evolinux_default_www_files | bool # SSL cert diff --git a/evolinux-base/tasks/dump-server-state.yml b/evolinux-base/tasks/dump-server-state.yml index 33822377..65ff2f45 100644 --- a/evolinux-base/tasks/dump-server-state.yml +++ b/evolinux-base/tasks/dump-server-state.yml @@ -12,4 +12,4 @@ src: /usr/local/sbin/dump-server-state dest: /usr/local/sbin/backup-server-state state: link - force: yes + force: true diff --git a/evolinux-base/tasks/hardware.dell.yml b/evolinux-base/tasks/hardware.dell.yml index a146ec5c..532b3f58 100644 --- a/evolinux-base/tasks/hardware.dell.yml +++ b/evolinux-base/tasks/hardware.dell.yml @@ -47,7 +47,7 @@ ansible.builtin.copy: src: hwraid.le-vert.net.asc dest: "{{ apt_keyring_dir }}/hwraid.le-vert.net.asc" - force: yes + force: true mode: "0644" owner: root group: root diff --git a/evolinux-base/tasks/hardware.hp.yml b/evolinux-base/tasks/hardware.hp.yml index ea17cae5..a22eeb70 100644 --- a/evolinux-base/tasks/hardware.hp.yml +++ b/evolinux-base/tasks/hardware.hp.yml @@ -4,7 +4,7 @@ ansible.builtin.copy: src: hpePublicKey2048_key1.asc dest: "{{ apt_keyring_dir }}/hpePublicKey2048_key1.asc" - force: yes + force: true mode: "0644" owner: root group: root diff --git a/evolinux-base/tasks/hostname.yml b/evolinux-base/tasks/hostname.yml index b283a51e..a361ee44 100644 --- a/evolinux-base/tasks/hostname.yml +++ b/evolinux-base/tasks/hostname.yml @@ -41,7 +41,7 @@ ansible.builtin.copy: dest: /etc/mailname content: "{{ evolinux_fqdn }}\n" - force: yes + force: true when: evolinux_hostname_mailname | bool # Override facts diff --git a/evolinux-base/tasks/root.yml b/evolinux-base/tasks/root.yml index 3b17faf7..98cd3b3d 100644 --- a/evolinux-base/tasks/root.yml +++ b/evolinux-base/tasks/root.yml @@ -27,7 +27,7 @@ ansible.builtin.copy: content: "" dest: "/root/.bash_history" - force: no + force: false when: evolinux_root_bash_history | bool - name: Set umask in /root/.profile @@ -47,7 +47,7 @@ ansible.builtin.copy: src: root/gitconfig dest: "/root/.gitconfig" - force: no + force: false when: evolinux_root_gitconfig | bool - name: Is .bash_history append-only diff --git a/evolinux-base/tasks/system.yml b/evolinux-base/tasks/system.yml index ecad62d9..8f3d7b03 100644 --- a/evolinux-base/tasks/system.yml +++ b/evolinux-base/tasks/system.yml @@ -138,7 +138,7 @@ ansible.builtin.template: src: system/alert5.sysvinit.j2 dest: /etc/init.d/alert5 - force: no + force: false mode: "0755" when: - evolinux_system_alert5_init | bool @@ -159,7 +159,7 @@ ansible.builtin.template: src: system/alert5.sh.j2 dest: /usr/share/scripts/alert5.sh - force: no + force: false mode: "0755" when: - evolinux_system_alert5_init | bool @@ -169,7 +169,7 @@ ansible.builtin.copy: src: alert5.service dest: /etc/systemd/system/alert5.service - force: yes + force: true mode: "0644" when: - evolinux_system_alert5_init | bool diff --git a/evolinux-base/tasks/utils.yml b/evolinux-base/tasks/utils.yml index a97be579..a1c4d646 100644 --- a/evolinux-base/tasks/utils.yml +++ b/evolinux-base/tasks/utils.yml @@ -13,7 +13,7 @@ mode: "0700" owner: root group: root - force: no + force: false - name: update-evobackup-canary script is present ansible.builtin.copy: diff --git a/evolinux-todo/tasks/main.yml b/evolinux-todo/tasks/main.yml index 0cf5628c..9b0d9c80 100644 --- a/evolinux-todo/tasks/main.yml +++ b/evolinux-todo/tasks/main.yml @@ -12,5 +12,5 @@ src: todo.defaults.txt dest: /etc/evolinux/todo.txt mode: "0640" - force: no + force: false when: ansible_distribution == "Debian" diff --git a/evolinux-users/tasks/sudo_common.yml b/evolinux-users/tasks/sudo_common.yml index 0560f997..0f463756 100644 --- a/evolinux-users/tasks/sudo_common.yml +++ b/evolinux-users/tasks/sudo_common.yml @@ -12,7 +12,7 @@ ansible.builtin.template: src: sudoers.j2 dest: /etc/sudoers.d/evolinux - force: no + force: false mode: "0440" validate: '/usr/sbin/visudo -cf %s' register: copy_sudoers_evolinux diff --git a/evolinux-users/tasks/sudo_jessie.yml b/evolinux-users/tasks/sudo_jessie.yml index 6400a8ee..2cc50500 100644 --- a/evolinux-users/tasks/sudo_jessie.yml +++ b/evolinux-users/tasks/sudo_jessie.yml @@ -4,7 +4,7 @@ ansible.builtin.template: src: sudoers_jessie.j2 dest: /etc/sudoers.d/evolinux - force: no + force: false mode: "0440" validate: '/usr/sbin/visudo -cf %s' register: copy_sudoers_evolinux diff --git a/evomaintenance/tasks/install_vendor_debian.yml b/evomaintenance/tasks/install_vendor_debian.yml index c8fb6183..7241081c 100644 --- a/evomaintenance/tasks/install_vendor_debian.yml +++ b/evomaintenance/tasks/install_vendor_debian.yml @@ -40,7 +40,7 @@ owner: root group: root mode: "{{ item.mode }}" - force: yes + force: true backup: yes loop: - { src: 'evomaintenance.sh', dest: '/usr/share/scripts/', mode: '0700' } diff --git a/evomaintenance/tasks/install_vendor_other.yml b/evomaintenance/tasks/install_vendor_other.yml index ece9aae2..32387b39 100644 --- a/evomaintenance/tasks/install_vendor_other.yml +++ b/evomaintenance/tasks/install_vendor_other.yml @@ -22,7 +22,7 @@ owner: root group: root mode: "{{ item.mode }}" - force: yes + force: true backup: yes loop: - { src: 'evomaintenance.sh', dest: '/usr/share/scripts/', mode: '0700' } diff --git a/filebeat/tasks/apt_sources.yml b/filebeat/tasks/apt_sources.yml index a0395ffe..e525ba4b 100644 --- a/filebeat/tasks/apt_sources.yml +++ b/filebeat/tasks/apt_sources.yml @@ -9,7 +9,7 @@ ansible.builtin.copy: src: elastic.asc dest: "{{ apt_keyring_dir }}/elastic.asc" - force: yes + force: true mode: "0644" owner: root group: root diff --git a/fluentd/tasks/main.yml b/fluentd/tasks/main.yml index b6f262c1..9f350bf4 100644 --- a/fluentd/tasks/main.yml +++ b/fluentd/tasks/main.yml @@ -4,7 +4,7 @@ ansible.builtin.copy: src: treasuredata.asc dest: "{{ apt_keyring_dir }}/treasuredata.asc" - force: yes + force: true mode: "0644" owner: root group: root diff --git a/haproxy/tasks/munin.yml b/haproxy/tasks/munin.yml index e2f2302d..f7a35e56 100644 --- a/haproxy/tasks/munin.yml +++ b/haproxy/tasks/munin.yml @@ -12,7 +12,7 @@ ansible.builtin.file: src: /usr/share/munin/plugins/haproxy_ng dest: /etc/munin/plugins/haproxy_ng - force: yes + force: true state: link notify: restart munin-node tags: diff --git a/haproxy/tasks/packages_backports.yml b/haproxy/tasks/packages_backports.yml index 5832c4d4..2a5a855c 100644 --- a/haproxy/tasks/packages_backports.yml +++ b/haproxy/tasks/packages_backports.yml @@ -23,7 +23,7 @@ ansible.builtin.template: src: haproxy_apt_preferences.j2 dest: /etc/apt/preferences.d/999-haproxy - force: yes + force: true mode: "0640" register: haproxy_apt_preferences tags: diff --git a/jenkins/tasks/main.yml b/jenkins/tasks/main.yml index 1e6b777b..835d3a3e 100644 --- a/jenkins/tasks/main.yml +++ b/jenkins/tasks/main.yml @@ -9,7 +9,7 @@ ansible.builtin.copy: src: jenkins.asc dest: "{{ apt_keyring_dir }}/jenkins.asc" - force: yes + force: true mode: "0644" owner: root group: root diff --git a/keepalived/tasks/main.yml b/keepalived/tasks/main.yml index 3ab0f8be..30f9557a 100644 --- a/keepalived/tasks/main.yml +++ b/keepalived/tasks/main.yml @@ -14,7 +14,7 @@ mode: "0755" owner: root group: root - force: yes + force: true notify: restart keepalived tags: - keepalived @@ -27,7 +27,7 @@ mode: "0755" owner: root group: root - force: yes + force: true tags: - keepalived - nrpe diff --git a/kibana/tasks/apt_sources.yml b/kibana/tasks/apt_sources.yml index a0395ffe..e525ba4b 100644 --- a/kibana/tasks/apt_sources.yml +++ b/kibana/tasks/apt_sources.yml @@ -9,7 +9,7 @@ ansible.builtin.copy: src: elastic.asc dest: "{{ apt_keyring_dir }}/elastic.asc" - force: yes + force: true mode: "0644" owner: root group: root diff --git a/kibana/tasks/proxy_nginx.yml b/kibana/tasks/proxy_nginx.yml index 7b680284..e3b672b8 100644 --- a/kibana/tasks/proxy_nginx.yml +++ b/kibana/tasks/proxy_nginx.yml @@ -4,13 +4,13 @@ ansible.builtin.template: src: nginx_proxy_kibana_ssl.j2 dest: /etc/nginx/sites-available/kibana_ssl.conf - force: no + force: false - name: Example proxy for Kibana with Nginx (without SSL) ansible.builtin.template: src: nginx_proxy_kibana_nossl.j2 dest: /etc/nginx/sites-available/kibana_nossl.conf - force: no + force: false # - name: Kibana host in Nginx is enabled # file: diff --git a/kvm-host/tasks/munin.yml b/kvm-host/tasks/munin.yml index 45edc8d6..8cd45cb5 100644 --- a/kvm-host/tasks/munin.yml +++ b/kvm-host/tasks/munin.yml @@ -20,7 +20,7 @@ url: "https://raw.githubusercontent.com/munin-monitoring/contrib/master/plugins/libvirt/{{ item }}" dest: "/usr/local/share/munin/plugins/" mode: "0755" - force: no + force: false loop: - kvm_cpu - kvm_io @@ -32,7 +32,7 @@ src: "/usr/local/share/munin/plugins/{{ plugin_name }}" dest: "/etc/munin/plugins/{{ plugin_name }}" state: link - force: yes + force: true loop: - kvm_cpu - kvm_io diff --git a/kvm-host/tasks/tools.yml b/kvm-host/tasks/tools.yml index 7931f541..fccf9307 100644 --- a/kvm-host/tasks/tools.yml +++ b/kvm-host/tasks/tools.yml @@ -17,7 +17,7 @@ mode: "0700" owner: root group: root - force: yes + force: true - name: migrate-vm script is present ansible.builtin.copy: @@ -26,7 +26,7 @@ mode: "0700" owner: root group: root - force: yes + force: true - name: kvmstats script is present ansible.builtin.copy: @@ -35,7 +35,7 @@ mode: "0700" owner: root group: root - force: yes + force: true - name: kvmstats cron is present ansible.builtin.template: diff --git a/listupgrade/tasks/main.yml b/listupgrade/tasks/main.yml index e3f308ef..dec4881d 100644 --- a/listupgrade/tasks/main.yml +++ b/listupgrade/tasks/main.yml @@ -18,7 +18,7 @@ mode: "0700" owner: root group: root - force: yes + force: true - name: Create /etc/evolinux ansible.builtin.file: @@ -35,7 +35,7 @@ mode: "0600" owner: root group: root - force: no + force: false - name: Cron.d is present ansible.builtin.file: diff --git a/logstash/tasks/apt_sources.yml b/logstash/tasks/apt_sources.yml index a0395ffe..e525ba4b 100644 --- a/logstash/tasks/apt_sources.yml +++ b/logstash/tasks/apt_sources.yml @@ -9,7 +9,7 @@ ansible.builtin.copy: src: elastic.asc dest: "{{ apt_keyring_dir }}/elastic.asc" - force: yes + force: true mode: "0644" owner: root group: root diff --git a/memcached/tasks/nrpe.yml b/memcached/tasks/nrpe.yml index a01cf1e7..aba43da6 100644 --- a/memcached/tasks/nrpe.yml +++ b/memcached/tasks/nrpe.yml @@ -25,7 +25,7 @@ ansible.builtin.copy: src: check_memcached_instances.sh dest: /usr/local/lib/nagios/plugins/check_memcached_instances - force: yes + force: true mode: "0755" owner: root group: root diff --git a/metricbeat/tasks/apt_sources.yml b/metricbeat/tasks/apt_sources.yml index a0395ffe..e525ba4b 100644 --- a/metricbeat/tasks/apt_sources.yml +++ b/metricbeat/tasks/apt_sources.yml @@ -9,7 +9,7 @@ ansible.builtin.copy: src: elastic.asc dest: "{{ apt_keyring_dir }}/elastic.asc" - force: yes + force: true mode: "0644" owner: root group: root diff --git a/mongodb/tasks/main_bookworm.yml b/mongodb/tasks/main_bookworm.yml index ef64f00c..93989230 100644 --- a/mongodb/tasks/main_bookworm.yml +++ b/mongodb/tasks/main_bookworm.yml @@ -52,7 +52,7 @@ ansible.builtin.template: src: logrotate_bullseye.j2 dest: /etc/logrotate.d/mongodb - force: yes + force: true backup: no - ansible.builtin.include_role: @@ -74,7 +74,7 @@ ansible.builtin.copy: src: "munin/{{ item }}" dest: '/usr/local/share/munin/plugins/{{ item }}' - force: yes + force: true loop: - mongo_btree - mongo_collections diff --git a/mongodb/tasks/main_bullseye.yml b/mongodb/tasks/main_bullseye.yml index 4a02ee9b..0cfebf20 100644 --- a/mongodb/tasks/main_bullseye.yml +++ b/mongodb/tasks/main_bullseye.yml @@ -10,7 +10,7 @@ ansible.builtin.copy: src: "server-{{ mongodb_version }}.asc" dest: "{{ apt_keyring_dir }}/mongodb-server-{{ mongodb_version }}.asc" - force: yes + force: true mode: "0644" owner: root group: root @@ -51,7 +51,7 @@ ansible.builtin.template: src: logrotate_bullseye.j2 dest: /etc/logrotate.d/mongodb - force: yes + force: true backup: no - ansible.builtin.include_role: @@ -73,7 +73,7 @@ ansible.builtin.copy: src: "munin/{{ item }}" dest: '/usr/local/share/munin/plugins/{{ item }}' - force: yes + force: true loop: - mongo_btree - mongo_collections diff --git a/mongodb/tasks/main_buster.yml b/mongodb/tasks/main_buster.yml index 415a5a3f..7d47ed25 100644 --- a/mongodb/tasks/main_buster.yml +++ b/mongodb/tasks/main_buster.yml @@ -16,7 +16,7 @@ ansible.builtin.copy: src: "server-{{ mongodb_version }}.asc" dest: "{{ apt_keyring_dir }}/mongodb-server-{{ mongodb_version }}.asc" - force: yes + force: true mode: "0644" owner: root group: root @@ -65,7 +65,7 @@ ansible.builtin.template: src: logrotate_buster.j2 dest: /etc/logrotate.d/mongodb - force: yes + force: true backup: no - ansible.builtin.include_role: @@ -87,7 +87,7 @@ ansible.builtin.copy: src: "munin/{{ item }}" dest: '/usr/local/share/munin/plugins/{{ item }}' - force: yes + force: true loop: - mongo_btree - mongo_collections diff --git a/mongodb/tasks/main_jessie.yml b/mongodb/tasks/main_jessie.yml index 61d57f85..50767d68 100644 --- a/mongodb/tasks/main_jessie.yml +++ b/mongodb/tasks/main_jessie.yml @@ -16,7 +16,7 @@ ansible.builtin.copy: src: "server-{{ mongodb_version }}.asc" dest: "/etc/apt/trusted.gpg.d/mongodb-server-{{ mongodb_version }}.asc" - force: yes + force: true mode: "0644" owner: root group: root @@ -57,5 +57,5 @@ ansible.builtin.template: src: logrotate_jessie.j2 dest: /etc/logrotate.d/mongodb - force: yes + force: true backup: no diff --git a/mongodb/tasks/main_stretch.yml b/mongodb/tasks/main_stretch.yml index 0dc33fcf..5b9a84c0 100644 --- a/mongodb/tasks/main_stretch.yml +++ b/mongodb/tasks/main_stretch.yml @@ -28,7 +28,7 @@ ansible.builtin.template: src: logrotate_stretch.j2 dest: /etc/logrotate.d/mongodb-server - force: yes + force: true backup: no - name: disable previous logrotate diff --git a/monit/tasks/main.yml b/monit/tasks/main.yml index 49e4c99b..65deb5f9 100644 --- a/monit/tasks/main.yml +++ b/monit/tasks/main.yml @@ -13,7 +13,7 @@ src: evolinux-defaults.conf.j2 dest: /etc/monit/conf.d/z-evolinux-defaults.conf mode: "0640" - force: yes + force: true notify: restart monit tags: - monit diff --git a/mysql-oracle/tasks/config.yml b/mysql-oracle/tasks/config.yml index ff42ed20..0a3370ab 100644 --- a/mysql-oracle/tasks/config.yml +++ b/mysql-oracle/tasks/config.yml @@ -10,7 +10,7 @@ owner: root group: root mode: "0644" - force: yes + force: true tags: - mysql @@ -21,6 +21,6 @@ owner: root group: root mode: "0644" - force: no + force: false tags: - mysql diff --git a/mysql-oracle/tasks/packages.yml b/mysql-oracle/tasks/packages.yml index 7ceadd89..ede629f5 100644 --- a/mysql-oracle/tasks/packages.yml +++ b/mysql-oracle/tasks/packages.yml @@ -51,7 +51,7 @@ mode: "0755" owner: root group: root - force: yes + force: true - name: systemd unit is installed ansible.builtin.copy: @@ -60,7 +60,7 @@ mode: "0644" owner: root group: root - force: yes + force: true register: mysql_systemd_unit - name: APT cache is up-to-date diff --git a/mysql-oracle/tasks/utils.yml b/mysql-oracle/tasks/utils.yml index cbcc9e37..2504eaa2 100644 --- a/mysql-oracle/tasks/utils.yml +++ b/mysql-oracle/tasks/utils.yml @@ -75,7 +75,7 @@ mode: "0755" owner: root group: staff - force: yes + force: true tags: - mytop - mysql @@ -96,7 +96,7 @@ src: mytop-config.j2 dest: /root/.mytop mode: "0600" - force: yes + force: true tags: - mytop - mysql diff --git a/mysql/tasks/config_jessie.yml b/mysql/tasks/config_jessie.yml index 174fc56a..3d8c494d 100644 --- a/mysql/tasks/config_jessie.yml +++ b/mysql/tasks/config_jessie.yml @@ -10,7 +10,7 @@ owner: root group: root mode: "0644" - force: yes + force: true tags: - mysql diff --git a/mysql/tasks/config_stretch.yml b/mysql/tasks/config_stretch.yml index cda4867c..57346fb5 100644 --- a/mysql/tasks/config_stretch.yml +++ b/mysql/tasks/config_stretch.yml @@ -10,7 +10,7 @@ owner: root group: root mode: "0644" - force: yes + force: true notify: "{{ mysql_restart_handler_name }}" tags: - mysql @@ -36,7 +36,7 @@ ansible.builtin.template: src: mariadb.systemd.j2 dest: /etc/systemd/system/mariadb.service.d/evolinux.conf - force: yes + force: true register: mariadb_systemd_override - name: reload systemd and restart MariaDB diff --git a/mysql/tasks/mysql_skip.yml b/mysql/tasks/mysql_skip.yml index 2455641a..e98567a7 100644 --- a/mysql/tasks/mysql_skip.yml +++ b/mysql/tasks/mysql_skip.yml @@ -7,7 +7,7 @@ owner: root group: root mode: "0700" - force: yes + force: true tags: - mysql_skip @@ -45,7 +45,7 @@ ansible.builtin.template: src: mysql_skip.systemd.j2 dest: /etc/systemd/system/mysql_skip.service - force: yes + force: true - name: "Start or stop systemd unit" ansible.builtin.systemd: diff --git a/mysql/tasks/utils.yml b/mysql/tasks/utils.yml index f8005ee2..9d81514a 100644 --- a/mysql/tasks/utils.yml +++ b/mysql/tasks/utils.yml @@ -76,7 +76,7 @@ src: mytop.j2 dest: /root/.mytop mode: "0600" - force: yes + force: true tags: - mytop - mysql @@ -87,7 +87,7 @@ src: mytop.bullseye.j2 dest: /root/.mytop mode: "0600" - force: yes + force: true tags: - mytop - mysql @@ -220,7 +220,7 @@ src: save_mysql_processlist.sh dest: "{{ _mysql_scripts_dir }}/save_mysql_processlist.sh" mode: "0755" - force: no + force: false tags: - mysql @@ -229,7 +229,7 @@ src: mysql_connections.sh dest: "{{ _mysql_scripts_dir }}/mysql_connections" mode: "0755" - force: no + force: false tags: - mysql @@ -238,7 +238,7 @@ src: mysql-queries-killer.sh dest: "{{ _mysql_scripts_dir }}/mysql-queries-killer.sh" mode: "0755" - force: no + force: false tags: - mysql @@ -247,6 +247,6 @@ src: evomariabackup.sh dest: "{{ _mysql_scripts_dir }}/evomariabackup" mode: "0755" - force: no + force: false tags: - mysql \ No newline at end of file diff --git a/nagios-nrpe/tasks/main.yml b/nagios-nrpe/tasks/main.yml index f78f9fbf..aa36f9c9 100644 --- a/nagios-nrpe/tasks/main.yml +++ b/nagios-nrpe/tasks/main.yml @@ -30,7 +30,7 @@ dest: /etc/nagios/nrpe.d/evolix.cfg group: nagios mode: "0640" - force: no + force: false notify: restart nagios-nrpe-server tags: - nagios-nrpe diff --git a/nagios-nrpe/tasks/wrapper.yml b/nagios-nrpe/tasks/wrapper.yml index add493fd..4eb98350 100644 --- a/nagios-nrpe/tasks/wrapper.yml +++ b/nagios-nrpe/tasks/wrapper.yml @@ -24,7 +24,7 @@ owner: root group: root mode: "0750" - force: yes + force: true - name: "symlink for backward compatibility" ansible.builtin.file: @@ -40,4 +40,4 @@ owner: root group: staff mode: "0755" - force: yes \ No newline at end of file + force: true \ No newline at end of file diff --git a/newrelic/tasks/sources.yml b/newrelic/tasks/sources.yml index 22473df1..3f745db9 100644 --- a/newrelic/tasks/sources.yml +++ b/newrelic/tasks/sources.yml @@ -4,7 +4,7 @@ ansible.builtin.copy: src: newrelic.asc dest: "{{ apt_keyring_dir }}/newrelic.asc" - force: yes + force: true mode: "0644" owner: root group: root diff --git a/nginx/tasks/logrotate.yml b/nginx/tasks/logrotate.yml index d475e419..9081ef41 100644 --- a/nginx/tasks/logrotate.yml +++ b/nginx/tasks/logrotate.yml @@ -4,7 +4,7 @@ ansible.builtin.copy: src: logrotate_nginx dest: /etc/logrotate.d/nginx - force: no + force: false tags: - nginx - logrotate diff --git a/nginx/tasks/main.yml b/nginx/tasks/main.yml index aec36bec..1284a6a1 100644 --- a/nginx/tasks/main.yml +++ b/nginx/tasks/main.yml @@ -40,7 +40,7 @@ src: nginx/evolinux-defaults.conf dest: /etc/nginx/conf.d/z-evolinux-defaults.conf mode: "0640" - # force: yes + # force: true notify: reload nginx tags: - nginx @@ -57,7 +57,7 @@ group: www-data directory_mode: "0640" mode: "0640" - force: no + force: false notify: reload nginx tags: - nginx @@ -74,7 +74,7 @@ group: www-data directory_mode: "0640" mode: "0640" - force: no + force: false notify: reload nginx tags: - nginx @@ -88,7 +88,7 @@ group: www-data directory_mode: "0640" mode: "0640" - force: no + force: false notify: reload nginx tags: - nginx @@ -128,7 +128,7 @@ src: /etc/nginx/sites-available/evolinux-default.conf dest: /etc/nginx/sites-enabled/default state: link - force: yes + force: true notify: reload nginx when: nginx_evolinux_default_enabled | bool tags: diff --git a/nginx/tasks/packages_backports.yml b/nginx/tasks/packages_backports.yml index aac2304d..88402bb9 100644 --- a/nginx/tasks/packages_backports.yml +++ b/nginx/tasks/packages_backports.yml @@ -12,7 +12,7 @@ ansible.builtin.template: src: apt/nginx_preferences dest: /etc/apt/preferences.d/999-nginx - force: yes + force: true mode: "0640" register: nginx_apt_preferences tags: diff --git a/nginx/tasks/server_status_read.yml b/nginx/tasks/server_status_read.yml index e97d898a..d6cecbe3 100644 --- a/nginx/tasks/server_status_read.yml +++ b/nginx/tasks/server_status_read.yml @@ -13,7 +13,7 @@ dest: "{{ nginx_serverstatus_suffix_file }}" # The last character "\u000A" is a line feed (LF), it's better to keep it content: "{{ nginx_serverstatus_suffix }}\u000A" - force: yes + force: true when: nginx_serverstatus_suffix | length > 0 - name: generate random string for server-status suffix diff --git a/opendkim/tasks/main.yml b/opendkim/tasks/main.yml index 96a521b5..a9c1bf49 100644 --- a/opendkim/tasks/main.yml +++ b/opendkim/tasks/main.yml @@ -60,7 +60,7 @@ src: opendkim-evolix.conf dest: /etc/opendkim-evolix.conf mode: "0644" - force: yes + force: true notify: restart opendkim tags: - opendkim @@ -72,7 +72,7 @@ owner: opendkim group: opendkim mode: "0750" - force: yes + force: true tags: - opendkim diff --git a/openvpn/tasks/debian.yml b/openvpn/tasks/debian.yml index 9810a472..173299b4 100644 --- a/openvpn/tasks/debian.yml +++ b/openvpn/tasks/debian.yml @@ -154,7 +154,7 @@ ansible.builtin.copy: src: logrotate_openvpn dest: /etc/logrotate.d/openvpn - force: no + force: false - name: Generate a password for the management interface ansible.builtin.set_fact: diff --git a/packweb-apache/tasks/apache.yml b/packweb-apache/tasks/apache.yml index 434e75d0..b7e05f71 100644 --- a/packweb-apache/tasks/apache.yml +++ b/packweb-apache/tasks/apache.yml @@ -43,7 +43,7 @@ owner: root group: root mode: "0644" - force: no + force: false - name: Copy Apache settings for modules ansible.builtin.template: @@ -52,7 +52,7 @@ owner: root group: root mode: "0644" - force: no + force: false - name: Ensure Apache modules configs are enabled ansible.builtin.command: diff --git a/packweb-apache/tasks/awstats.yml b/packweb-apache/tasks/awstats.yml index 08c94381..f6e8b309 100644 --- a/packweb-apache/tasks/awstats.yml +++ b/packweb-apache/tasks/awstats.yml @@ -31,7 +31,7 @@ Require all granted - force: no + force: false mode: "0644" - name: Enable apache awstats-icon configuration diff --git a/packweb-apache/tasks/phpmyadmin.yml b/packweb-apache/tasks/phpmyadmin.yml index 11832300..abb1c552 100644 --- a/packweb-apache/tasks/phpmyadmin.yml +++ b/packweb-apache/tasks/phpmyadmin.yml @@ -15,7 +15,7 @@ ansible.builtin.template: src: phpmyadmin_apt_preferences.j2 dest: /etc/apt/preferences.d/999-phpmyadmin - force: yes + force: true mode: "0644" when: ansible_distribution_major_version is version('10', '=') @@ -53,7 +53,7 @@ dest: "{{ packweb_phpmyadmin_suffix_file }}" # The last character "\u000A" is a line feed (LF), it's better to keep it content: "{{ packweb_phpmyadmin_suffix }}\u000A" - force: yes + force: true when: packweb_phpmyadmin_suffix | length > 0 - name: generate random string for phpmyadmin suffix diff --git a/percona/tasks/main.yml b/percona/tasks/main.yml index 32637df7..069956d0 100644 --- a/percona/tasks/main.yml +++ b/percona/tasks/main.yml @@ -19,7 +19,7 @@ ansible.builtin.copy: src: percona.asc dest: "{{ apt_keyring_dir }}/percona.asc" - force: yes + force: true mode: "0644" owner: root group: root diff --git a/php/tasks/config_apache.yml b/php/tasks/config_apache.yml index 4ddc8448..addab08c 100644 --- a/php/tasks/config_apache.yml +++ b/php/tasks/config_apache.yml @@ -33,7 +33,7 @@ ; Put customized values here. ; default_charset = "ISO-8859-1" mode: "0644" - force: no + force: false - name: "Set custom values for PHP to enable Symfony" community.general.ini_file: diff --git a/php/tasks/config_cli.yml b/php/tasks/config_cli.yml index 506a1077..e7084d9b 100644 --- a/php/tasks/config_cli.yml +++ b/php/tasks/config_cli.yml @@ -17,10 +17,10 @@ dest: "{{ php_cli_custom_ini_file }}" content: | ; Put customized values here. - force: no + force: false # This task is not merged with the above copy -# because "force: no" prevents any fix after the fact +# because "force: false" prevents any fix after the fact - name: "Permissions for custom php.ini for CLI" ansible.builtin.file: dest: "{{ php_cli_custom_ini_file }}" diff --git a/php/tasks/config_fpm.yml b/php/tasks/config_fpm.yml index 9fc1cc33..836559bf 100644 --- a/php/tasks/config_fpm.yml +++ b/php/tasks/config_fpm.yml @@ -32,7 +32,7 @@ dest: "{{ php_fpm_custom_ini_file }}" content: | ; Put customized values here. - force: no + force: false notify: "restart {{ php_fpm_service_name }}" - name: Set default PHP FPM values @@ -66,7 +66,7 @@ ; Put customized values here. ; default_charset = "ISO-8859-1" mode: "0644" - force: no + force: false notify: "restart {{ php_fpm_service_name }}" - name: "Set custom values for PHP to enable Symfony" diff --git a/php/tasks/sury_post.yml b/php/tasks/sury_post.yml index ef4d3c7e..d529ec53 100644 --- a/php/tasks/sury_post.yml +++ b/php/tasks/sury_post.yml @@ -4,7 +4,7 @@ ansible.builtin.file: src: "{{ item.src }}" dest: "{{ item.dest }}" - force: yes + force: true state: link loop: - { src: "{{ php_cli_defaults_ini_file }}", dest: "/etc/php/7.4/cli/conf.d/z-evolinux-defaults.ini" } @@ -19,7 +19,7 @@ ansible.builtin.file: src: "{{ item.src }}" dest: "{{ item.dest }}" - force: yes + force: true state: link loop: - { src: "{{ php_apache_defaults_ini_file }}", dest: "/etc/php/7.4/apache2/conf.d/z-evolinux-defaults.ini" } @@ -36,7 +36,7 @@ ansible.builtin.file: src: "{{ item.src }}" dest: "{{ item.dest }}" - force: yes + force: true state: link loop: - { src: "{{ php_fpm_defaults_ini_file }}", dest: "/etc/php/7.4/fpm/conf.d/z-evolinux-defaults.ini" } diff --git a/postfix/tasks/minimal.yml b/postfix/tasks/minimal.yml index f8ea1b0b..36327b3e 100644 --- a/postfix/tasks/minimal.yml +++ b/postfix/tasks/minimal.yml @@ -13,7 +13,7 @@ owner: root group: root mode: "0644" - force: yes + force: true notify: restart postfix when: (postfix_force_main_cf | bool) or (postfix_maincf_md5_jessie in default_main_cf.stdout) or (postfix_maincf_md5_stretch in default_main_cf.stdout) tags: diff --git a/postfix/tasks/packmail.yml b/postfix/tasks/packmail.yml index be0b075e..f5ccf66d 100644 --- a/postfix/tasks/packmail.yml +++ b/postfix/tasks/packmail.yml @@ -31,7 +31,7 @@ owner: root group: root mode: "0644" - force: yes + force: true notify: restart postfix when: (postfix_force_main_cf | bool) or (postfix_maincf_md5_jessie in default_main_cf.stdout) or (postfix_maincf_md5_stretch in default_main_cf.stdout) tags: @@ -50,7 +50,7 @@ ansible.builtin.copy: src: filter dest: "/etc/postfix/{{ item }}" - force: no + force: false loop: - virtual - client.access diff --git a/postgresql/tasks/config.yml b/postgresql/tasks/config.yml index 87091b8f..2f735df0 100644 --- a/postgresql/tasks/config.yml +++ b/postgresql/tasks/config.yml @@ -9,7 +9,7 @@ ansible.builtin.copy: src: postgresql.service.override.conf dest: /etc/systemd/system/postgresql@.service.d/override.conf - force: yes + force: true mode: "0644" notify: - reload systemd diff --git a/postgresql/tasks/logrotate.yml b/postgresql/tasks/logrotate.yml index 55adc5bd..dbe66bb8 100644 --- a/postgresql/tasks/logrotate.yml +++ b/postgresql/tasks/logrotate.yml @@ -3,4 +3,4 @@ ansible.builtin.copy: src: logrotate_postgresql dest: /etc/logrotate.d/postgresql-common - force: no + force: false diff --git a/postgresql/tasks/pgdg-repo.yml b/postgresql/tasks/pgdg-repo.yml index e9f25307..b988618a 100644 --- a/postgresql/tasks/pgdg-repo.yml +++ b/postgresql/tasks/pgdg-repo.yml @@ -12,7 +12,7 @@ ansible.builtin.copy: src: postgresql.asc dest: "{{ apt_keyring_dir }}/postgresql.asc" - force: yes + force: true mode: "0644" owner: root group: root diff --git a/proftpd/tasks/main.yml b/proftpd/tasks/main.yml index ce292ad5..26dcfb85 100644 --- a/proftpd/tasks/main.yml +++ b/proftpd/tasks/main.yml @@ -76,7 +76,7 @@ ansible.builtin.copy: src: vpasswd dest: /etc/proftpd/vpasswd - force: no + force: false notify: restart proftpd tags: - proftpd diff --git a/rabbitmq/tasks/main.yml b/rabbitmq/tasks/main.yml index f485bc1f..d78c70fd 100644 --- a/rabbitmq/tasks/main.yml +++ b/rabbitmq/tasks/main.yml @@ -10,7 +10,7 @@ owner: rabbitmq group: rabbitmq mode: "0600" - force: no + force: false - name: Create rabbitmq.config ansible.builtin.copy: @@ -19,7 +19,7 @@ owner: rabbitmq group: rabbitmq mode: "0600" - force: no + force: false - name: Adjust ulimit ansible.builtin.lineinfile: diff --git a/rabbitmq/tasks/nrpe.yml b/rabbitmq/tasks/nrpe.yml index f491a68c..d181b07c 100644 --- a/rabbitmq/tasks/nrpe.yml +++ b/rabbitmq/tasks/nrpe.yml @@ -23,7 +23,7 @@ owner: root group: root mode: "0755" - force: yes + force: true when: ansible_distribution_major_version is version('11', '<=') - name: check_rabbitmq (Python 3 version) is installed @@ -33,7 +33,7 @@ owner: root group: root mode: "0755" - force: yes + force: true when: ansible_distribution_major_version is version('11', '>=') - name: check_rabbitmq is available for NRPE diff --git a/rbenv/tasks/main.yml b/rbenv/tasks/main.yml index 4362c5db..000eb163 100644 --- a/rbenv/tasks/main.yml +++ b/rbenv/tasks/main.yml @@ -33,7 +33,7 @@ dest: '{{ rbenv_root }}' version: '{{ rbenv_version }}' accept_hostkey: yes - force: yes + force: true become_user: "{{ username }}" become: yes tags: @@ -67,7 +67,7 @@ dest: '{{ rbenv_root }}/plugins/{{ item.name }}' version: '{{ item.version }}' accept_hostkey: yes - force: yes + force: true loop: "{{ rbenv_plugins }}" become_user: "{{ username }}" become: yes diff --git a/redis/tasks/nrpe.yml b/redis/tasks/nrpe.yml index 61400b99..a786c78f 100644 --- a/redis/tasks/nrpe.yml +++ b/redis/tasks/nrpe.yml @@ -12,7 +12,7 @@ ansible.builtin.copy: src: check_redis.pl dest: /usr/local/lib/nagios/plugins/check_redis - force: yes + force: true mode: "0755" owner: root group: root @@ -87,7 +87,7 @@ ansible.builtin.copy: src: check_redis_instances.sh dest: /usr/local/lib/nagios/plugins/check_redis_instances - force: yes + force: true mode: "0755" owner: root group: root diff --git a/squid/tasks/logrotate_jessie.yml b/squid/tasks/logrotate_jessie.yml index 345cd053..a0cfdff1 100644 --- a/squid/tasks/logrotate_jessie.yml +++ b/squid/tasks/logrotate_jessie.yml @@ -24,7 +24,7 @@ ansible.builtin.template: src: logrotate_jessie.j2 dest: /etc/logrotate.d/{{ squid_daemon_name }} - force: yes + force: true when: squid_logrotate_md5.rc == 0 tags: - squid diff --git a/squid/tasks/logrotate_stretch.yml b/squid/tasks/logrotate_stretch.yml index df264068..965256d4 100644 --- a/squid/tasks/logrotate_stretch.yml +++ b/squid/tasks/logrotate_stretch.yml @@ -24,7 +24,7 @@ ansible.builtin.template: src: logrotate_stretch.j2 dest: /etc/logrotate.d/{{ squid_daemon_name }} - force: yes + force: true when: squid_logrotate_md5.rc == 0 tags: - squid diff --git a/squid/tasks/main.yml b/squid/tasks/main.yml index 0a200188..2f0e94aa 100644 --- a/squid/tasks/main.yml +++ b/squid/tasks/main.yml @@ -46,7 +46,7 @@ ansible.builtin.copy: src: whitelist-evolinux.conf dest: /etc/squid3/whitelist.conf - force: no + force: false notify: "reload squid3" when: ansible_distribution_release == "jessie" @@ -69,14 +69,14 @@ dest: /etc/squid/evolinux-whitelist-custom.conf content: | # Put customized values here. - force: no + force: false when: ansible_distribution_major_version is version('9', '>=') - name: "evolinux acl for local proxy (Debian 9 or later)" ansible.builtin.template: src: evolinux-acl.conf.j2 dest: /etc/squid/evolinux-acl.conf - force: no + force: false notify: "reload squid" when: - squid_localproxy_enable | bool @@ -87,7 +87,7 @@ dest: /etc/squid/evolinux-acl.conf content: | # Put customized values here. - force: no + force: false when: - not (squid_localproxy_enable | bool) - ansible_distribution_major_version is version('9', '>=') @@ -96,7 +96,7 @@ ansible.builtin.copy: src: evolinux-httpaccess.conf dest: /etc/squid/evolinux-httpaccess.conf - force: no + force: false notify: "reload squid" when: - squid_localproxy_enable | bool @@ -107,7 +107,7 @@ dest: /etc/squid/evolinux-httpaccess.conf content: | # Put customized values here. - force: no + force: false when: - not (squid_localproxy_enable | bool) - ansible_distribution_major_version is version('9', '>=') @@ -116,7 +116,7 @@ ansible.builtin.template: src: evolinux-custom.conf.j2 dest: /etc/squid/evolinux-custom.conf - force: no + force: false notify: "reload squid" when: - squid_localproxy_enable | bool @@ -127,7 +127,7 @@ dest: /etc/squid/evolinux-custom.conf content: | # Put customized values here. - force: no + force: false when: - not (squid_localproxy_enable | bool) - ansible_distribution_major_version is version('9', '>=') diff --git a/squid/tasks/systemd.yml b/squid/tasks/systemd.yml index 7e262f23..da07eb81 100644 --- a/squid/tasks/systemd.yml +++ b/squid/tasks/systemd.yml @@ -21,7 +21,7 @@ src: systemd-override.conf.j2 dest: /etc/systemd/system/squid.service.d/override.conf mode: "0644" - force: yes + force: true register: _squid_systemd_override - name: "Systemd daemon is reloaded and Squid restarted" diff --git a/supervisord/tasks/main.yml b/supervisord/tasks/main.yml index 7b61ccbb..8d30c649 100644 --- a/supervisord/tasks/main.yml +++ b/supervisord/tasks/main.yml @@ -10,7 +10,7 @@ src: http.conf dest: /etc/supervisor/conf.d/ mode: "0644" - force: no + force: false notify: restart supervisor when: supervisord_enable_http | bool tags: diff --git a/tomcat-instance/tasks/bootstrap.yml b/tomcat-instance/tasks/bootstrap.yml index 818ddceb..c53a4a14 100644 --- a/tomcat-instance/tasks/bootstrap.yml +++ b/tomcat-instance/tasks/bootstrap.yml @@ -21,7 +21,7 @@ mode: "0660" owner: "{{ tomcat_instance_name }}" group: "{{ tomcat_instance_name }}" - force: no + force: false - name: Templating of server.xml file ansible.builtin.template: @@ -30,7 +30,7 @@ mode: "0660" owner: "{{ tomcat_instance_name }}" group: "{{ tomcat_instance_name }}" - force: no + force: false - name: Copy config file ansible.builtin.copy: @@ -39,6 +39,6 @@ mode: "0660" owner: "{{ tomcat_instance_name }}" group: "{{ tomcat_instance_name }}" - force: no + force: false with_fileglob: - "tomcat{{ tomcat_version }}/*" diff --git a/unbound/tasks/main.yml b/unbound/tasks/main.yml index 6e76eb3b..976c6386 100644 --- a/unbound/tasks/main.yml +++ b/unbound/tasks/main.yml @@ -11,7 +11,7 @@ ansible.builtin.get_url: url: https://www.internic.net/domain/named.cache dest: /etc/unbound/root.hints - force: yes + force: true mode: "0644" notify: reload unbound tags: diff --git a/varnish/tasks/main.yml b/varnish/tasks/main.yml index 585688b9..68f3fc74 100644 --- a/varnish/tasks/main.yml +++ b/varnish/tasks/main.yml @@ -80,7 +80,7 @@ when: - varnish_package_facts['version'] is version('4', '>=') - varnish_package_facts['version'] is version('6', '<') - - varnish_systemd_override_template | length == 0 + - varnish_systemd_override_template is none or varnish_systemd_override_template | length == 0 tags: - varnish - config @@ -92,7 +92,7 @@ when: - varnish_package_facts['version'] is version('6', '>=') - varnish_package_facts['version'] is version('7', '<') - - varnish_systemd_override_template | length == 0 + - varnish_systemd_override_template is none or varnish_systemd_override_template | length == 0 tags: - varnish - config @@ -103,7 +103,7 @@ varnish_systemd_override_template: override.conf.varnish7.j2 when: - varnish_package_facts['version'] is version('7', '>=') - - varnish_systemd_override_template | length == 0 + - varnish_systemd_override_template is none or varnish_systemd_override_template | length == 0 tags: - varnish - config @@ -113,7 +113,7 @@ ansible.builtin.template: src: "{{ varnish_systemd_override_template }}" dest: /etc/systemd/system/varnish.service.d/override.conf - force: yes + force: true notify: - reload systemd - restart varnish @@ -139,7 +139,7 @@ src: "{{ item }}" dest: "{{ varnish_config_file }}" mode: "0644" - force: yes + force: true when: varnish_update_config | bool loop: "{{ query('first_found', templates) }}" vars: @@ -172,7 +172,7 @@ ansible.builtin.template: src: "{{ item }}" dest: /etc/varnish/conf.d/ - force: yes + force: true mode: "0644" with_fileglob: - "templates/varnish/conf.d/*.vcl" diff --git a/vrrpd/tasks/ip.yml b/vrrpd/tasks/ip.yml index 87a05092..b46a8954 100644 --- a/vrrpd/tasks/ip.yml +++ b/vrrpd/tasks/ip.yml @@ -8,7 +8,7 @@ ansible.builtin.template: src: vrrp.service.j2 dest: "/etc/systemd/system/{{ vrrp_systemd_unit_name }}" - force: yes + force: true register: vrrp_systemd_unit - name: enable and start systemd unit diff --git a/webapps/nextcloud/tasks/archive.yml b/webapps/nextcloud/tasks/archive.yml index 47defe79..f4e1cf26 100644 --- a/webapps/nextcloud/tasks/archive.yml +++ b/webapps/nextcloud/tasks/archive.yml @@ -4,7 +4,7 @@ ansible.builtin.get_url: url: "{{ nextcloud_releases_baseurl }}{{ nextcloud_archive_name }}" dest: "{{ nextcloud_home }}/{{ nextcloud_archive_name }}" - force: no + force: false tags: - nextcloud @@ -12,7 +12,7 @@ ansible.builtin.get_url: url: "{{ nextcloud_releases_baseurl }}{{ nextcloud_archive_name }}.sha256" dest: "{{ nextcloud_home }}/{{ nextcloud_archive_name }}.sha256" - force: no + force: false tags: - nextcloud From 18f160fb836e800d803abfe5040d70e7a4d07836 Mon Sep 17 00:00:00 2001 From: Bruno TATU Date: Wed, 28 Jun 2023 14:55:16 +0200 Subject: [PATCH 041/182] =?UTF-8?q?valeur=20que=20l'on=20propose=20par=20d?= =?UTF-8?q?=C3=A9faut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fail2ban/defaults/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fail2ban/defaults/main.yml b/fail2ban/defaults/main.yml index 098a550a..bfff9b29 100644 --- a/fail2ban/defaults/main.yml +++ b/fail2ban/defaults/main.yml @@ -45,4 +45,6 @@ fail2ban_wordpress_soft_findtime: "{{ fail2ban_default_findtime }}" fail2ban_roundcube: False fail2ban_roundcube_maxretry: 5 fail2ban_roundcube_bantime: "{{ fail2ban_default_bantime }}" -fail2ban_roundcube_findtime: "{{ fail2ban_default_findtime }}" \ No newline at end of file +fail2ban_roundcube_findtime: "{{ fail2ban_default_findtime }}" + +dbpurgeage_default: "86400 second" From a6bac1f20b641854fb8f99d76273a7739a02365d Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Mon, 3 Jul 2023 14:21:22 +0200 Subject: [PATCH 042/182] =?UTF-8?q?change=20syntax=20"become:=20[yes,no]"?= =?UTF-8?q?=20=E2=86=92=20"become:=20[true,false]"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 ++- amazon-ec2/amazon-ec2-evolinux.yml | 2 +- elasticsearch/tasks/plugin_head.yml | 2 +- evoacme/tests/vagrant.yml | 2 +- fail2ban/tests/test.yml | 2 +- java/tasks/oracle.yml | 2 +- postgresql/tasks/locales.yml | 2 +- postgresql/tasks/nrpe.yml | 2 +- rbenv/tasks/main.yml | 18 +++++++++--------- redmine/tasks/release.yml | 4 ++-- 10 files changed, 20 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16d1312e..6dbcaecb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,8 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Changed -* all: change syntax "force: [yes,no]" → "force [true,false]" +* all: change syntax "force: [yes,no]" → "force: [true,false]" +* all: change syntax "become: [yes,no]" → "become: [true,false]" * elasticsearch: improve networking configuration * evolinux-users: remove Stretch references in tasks that also apply to next Debian versions * mysql: improve shell syntax for mysql_skip script diff --git a/amazon-ec2/amazon-ec2-evolinux.yml b/amazon-ec2/amazon-ec2-evolinux.yml index 18dcb7a0..23f1f358 100644 --- a/amazon-ec2/amazon-ec2-evolinux.yml +++ b/amazon-ec2/amazon-ec2-evolinux.yml @@ -18,7 +18,7 @@ - name: Install Evolinux hosts: launched-instances - become: yes + become: true vars_files: - 'vars/secrets.yml' diff --git a/elasticsearch/tasks/plugin_head.yml b/elasticsearch/tasks/plugin_head.yml index 2a98d080..24a34643 100644 --- a/elasticsearch/tasks/plugin_head.yml +++ b/elasticsearch/tasks/plugin_head.yml @@ -32,7 +32,7 @@ environment: TMPDIR: "{{ elasticsearch_plugin_head_tmp_dir }}" become_user: "{{ elasticsearch_plugin_head_owner }}" - become: yes + become: true - name: Elasticsearch HTTP/CORS are enabled ansible.builtin.lineinfile: diff --git a/evoacme/tests/vagrant.yml b/evoacme/tests/vagrant.yml index 9eb9077d..83466e63 100644 --- a/evoacme/tests/vagrant.yml +++ b/evoacme/tests/vagrant.yml @@ -1,6 +1,6 @@ - hosts: default gather_facts: yes - become: yes + become: true roles: # - squid diff --git a/fail2ban/tests/test.yml b/fail2ban/tests/test.yml index 59e70a73..687b1a35 100644 --- a/fail2ban/tests/test.yml +++ b/fail2ban/tests/test.yml @@ -1,6 +1,6 @@ --- - hosts: all - become: yes + become: true # gather_facts: no roles: - role: fail2ban diff --git a/java/tasks/oracle.yml b/java/tasks/oracle.yml index 75d181d3..3c4b5b11 100644 --- a/java/tasks/oracle.yml +++ b/java/tasks/oracle.yml @@ -36,7 +36,7 @@ args: chdir: /srv/java-package creates: /srv/java-package/oracle-java8-server-jre_8u192_amd64.deb - become: False + become: false tags: - java diff --git a/postgresql/tasks/locales.yml b/postgresql/tasks/locales.yml index 30d21001..7446b485 100644 --- a/postgresql/tasks/locales.yml +++ b/postgresql/tasks/locales.yml @@ -8,7 +8,7 @@ state: present loop: - "fr_FR.UTF-8" - become: yes + become: true notify: reconfigure locales - name: set default locale diff --git a/postgresql/tasks/nrpe.yml b/postgresql/tasks/nrpe.yml index a4d1ef49..a78c249b 100644 --- a/postgresql/tasks/nrpe.yml +++ b/postgresql/tasks/nrpe.yml @@ -29,7 +29,7 @@ - block: - name: Create nrpe user - become: yes + become: true become_user: postgres community.postgresql.postgresql_user: name: nrpe diff --git a/rbenv/tasks/main.yml b/rbenv/tasks/main.yml index 000eb163..ea73a9e6 100644 --- a/rbenv/tasks/main.yml +++ b/rbenv/tasks/main.yml @@ -35,7 +35,7 @@ accept_hostkey: yes force: true become_user: "{{ username }}" - become: yes + become: true tags: - rbenv @@ -48,7 +48,7 @@ create: yes loop: '{{ rbenv_default_gems }}' become_user: "{{ username }}" - become: yes + become: true tags: - rbenv @@ -57,7 +57,7 @@ path: '{{ rbenv_root }}/plugins' state: directory become_user: "{{ username }}" - become: yes + become: true tags: - rbenv @@ -70,7 +70,7 @@ force: true loop: "{{ rbenv_plugins }}" become_user: "{{ username }}" - become: yes + become: true tags: - rbenv @@ -82,7 +82,7 @@ export PATH="{{ rbenv_root }}/bin:$PATH" eval "$(rbenv init -)" become_user: "{{ username }}" - become: yes + become: true tags: - rbenv @@ -94,7 +94,7 @@ check_mode: False register: ruby_installed become_user: "{{ username }}" - become: yes + become: true tags: - rbenv @@ -103,7 +103,7 @@ cmd: /bin/bash -lc "TMPDIR=~/tmp rbenv install {{ rbenv_ruby_version }}" when: ruby_installed.rc != 0 become_user: "{{ username }}" - become: yes + become: true tags: - rbenv @@ -115,7 +115,7 @@ failed_when: False check_mode: False become_user: "{{ username }}" - become: yes + become: true tags: - rbenv @@ -124,6 +124,6 @@ cmd: /bin/bash -lc "rbenv global {{ rbenv_ruby_version }} && rbenv rehash" when: ruby_selected.rc != 0 become_user: "{{ username }}" - become: yes + become: true tags: - rbenv diff --git a/redmine/tasks/release.yml b/redmine/tasks/release.yml index 4f1430a5..5c07e6a0 100644 --- a/redmine/tasks/release.yml +++ b/redmine/tasks/release.yml @@ -62,7 +62,7 @@ args: chdir: "/home/{{ redmine_user }}/www" become_user: "{{ redmine_user }}" - become: yes + become: true tags: - redmine @@ -72,7 +72,7 @@ args: chdir: "/home/{{ redmine_user }}/www" become_user: "{{ redmine_user }}" - become: yes + become: true tags: - redmine From e4436d9066b71895ae99629763d0e91d9bbd6fa9 Mon Sep 17 00:00:00 2001 From: Tom David--Broglio Date: Mon, 3 Jul 2023 18:37:15 +0200 Subject: [PATCH 043/182] docker-host: added var for user namespace setting --- CHANGELOG.md | 1 + docker-host/defaults/main.yml | 3 +++ docker-host/templates/daemon.json.j2 | 2 ++ 3 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dbcaecb..fae32929 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * userlogrotate: rotate also php.log. * nagios-nrpe: add a NRPE check-local command with completion. * policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory +* docker-host: added var for user namespace setting * dovecot: fix old_stats plugin for Dovecot 2.3. * dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) diff --git a/docker-host/defaults/main.yml b/docker-host/defaults/main.yml index 42c9cecc..bc5dc88f 100644 --- a/docker-host/defaults/main.yml +++ b/docker-host/defaults/main.yml @@ -12,6 +12,9 @@ docker_conf_no_newprivileges: False # Toggle live restore (need to be disabled in swarm mode) docker_conf_live_restore: True +# Toggle user namespace +docker_conf_user_namespace: True + # Disable all default network connectivity docker_conf_disable_default_networking: False diff --git a/docker-host/templates/daemon.json.j2 b/docker-host/templates/daemon.json.j2 index a044234b..92d60f8d 100644 --- a/docker-host/templates/daemon.json.j2 +++ b/docker-host/templates/daemon.json.j2 @@ -4,8 +4,10 @@ ,"data-root": "{{ docker_home }}" {# Keep containers running while docker daemon downtime #} ,"live-restore": {{ docker_conf_live_restore | to_json }} +{% if docker_conf_user_namespace %} {# Turn on user namespace remaping #} ,"userns-remap": "default" +{% endif %} {% if docker_conf_use_iptables %} {# Use iptables instead of docker-proxy #} ,"userland-proxy": false From 1ecb463104b4e3a9ca4b1138adce755872be67a1 Mon Sep 17 00:00:00 2001 From: Gregory Colpart Date: Tue, 4 Jul 2023 09:44:42 +0200 Subject: [PATCH 044/182] change default minimal_backoff_time (Postfix role) --- CHANGELOG.md | 1 + postfix/templates/evolinux_main.cf.j2 | 2 +- postfix/templates/packmail_main.cf.j2 | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fae32929..e5ab606a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * mysql: improve shell syntax for mysql_skip script * pbbouncer: minor fixes * varnish: Allow the systemd template to be overriden with a template outside of the role +* postfix (packmail or when postfix_slow_transport_include is True): change `minimal_backoff_time` from 2h to 15m (see HowtoPostfix) ### Fixed diff --git a/postfix/templates/evolinux_main.cf.j2 b/postfix/templates/evolinux_main.cf.j2 index 5d298f1d..b9464669 100644 --- a/postfix/templates/evolinux_main.cf.j2 +++ b/postfix/templates/evolinux_main.cf.j2 @@ -24,7 +24,7 @@ smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_una {% if postfix_slow_transport_include == True %} # Slow transports configuration -minimal_backoff_time = 2h +minimal_backoff_time = 15m maximal_backoff_time = 6h maximal_queue_lifetime = 4d queue_run_delay = 100s diff --git a/postfix/templates/packmail_main.cf.j2 b/postfix/templates/packmail_main.cf.j2 index 28c57631..44596d40 100644 --- a/postfix/templates/packmail_main.cf.j2 +++ b/postfix/templates/packmail_main.cf.j2 @@ -418,7 +418,7 @@ smtp-amavis_destination_concurrency_failed_cohort_limit = 0 {% if postfix_slow_transport_include == True %} # Slow transports configuration -minimal_backoff_time = 2h +minimal_backoff_time = 15m maximal_backoff_time = 6h maximal_queue_lifetime = 4d queue_run_delay = 100s From bb54c9209e9ddf3f111cbe018b21e67dc8013c3a Mon Sep 17 00:00:00 2001 From: Gregory Colpart Date: Tue, 4 Jul 2023 09:52:47 +0200 Subject: [PATCH 045/182] add options for Amavis integration in Postfix packmail --- CHANGELOG.md | 1 + postfix/templates/packmail_main.cf.j2 | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5ab606a..2ce0a0c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * pbbouncer: minor fixes * varnish: Allow the systemd template to be overriden with a template outside of the role * postfix (packmail or when postfix_slow_transport_include is True): change `minimal_backoff_time` from 2h to 15m (see HowtoPostfix) +* postfix (packmail) : optimize Amavis integration ### Fixed diff --git a/postfix/templates/packmail_main.cf.j2 b/postfix/templates/packmail_main.cf.j2 index 44596d40..0d80cf00 100644 --- a/postfix/templates/packmail_main.cf.j2 +++ b/postfix/templates/packmail_main.cf.j2 @@ -410,11 +410,15 @@ broken_sasl_auth_clients = yes smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth-client -# Amavis and OpenDKIM +# Amavis content_filter = smtp-amavis:[127.0.0.1]:10024 +smtp-amavis_destination_concurrency_failed_cohort_limit = 0 +smtp-amavis_destination_concurrency_negative_feedback = 0 +smtp-amavis_destination_concurrency_limit = 2 + +# OpenDKIM smtpd_milters = inet:[127.0.0.1]:8891 non_smtpd_milters = inet:[127.0.0.1]:8891 -smtp-amavis_destination_concurrency_failed_cohort_limit = 0 {% if postfix_slow_transport_include == True %} # Slow transports configuration From fb184a0ecf5e4dbb78fd377c983c0fabf5c61dc2 Mon Sep 17 00:00:00 2001 From: Bruno TATU Date: Tue, 4 Jul 2023 15:36:02 +0200 Subject: [PATCH 046/182] Set fail2ban_dbpurgeage_default variable for fail2ban --- CHANGELOG.md | 1 + fail2ban/defaults/main.yml | 2 +- fail2ban/tasks/fix-dbpurgeage.yml | 4 ++-- fail2ban/templates/fail2ban_dbpurge.j2 | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ce0a0c2..37bdd103 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * docker-host: added var for user namespace setting * dovecot: fix old_stats plugin for Dovecot 2.3. * dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) +* fail2ban: add default variable fail2ban_dbpurgeage_default ### Changed diff --git a/fail2ban/defaults/main.yml b/fail2ban/defaults/main.yml index bfff9b29..78862cb4 100644 --- a/fail2ban/defaults/main.yml +++ b/fail2ban/defaults/main.yml @@ -47,4 +47,4 @@ fail2ban_roundcube_maxretry: 5 fail2ban_roundcube_bantime: "{{ fail2ban_default_bantime }}" fail2ban_roundcube_findtime: "{{ fail2ban_default_findtime }}" -dbpurgeage_default: "86400 second" +fail2ban_dbpurgeage_default: "86400 second" diff --git a/fail2ban/tasks/fix-dbpurgeage.yml b/fail2ban/tasks/fix-dbpurgeage.yml index 6fa86c91..c24335cd 100644 --- a/fail2ban/tasks/fix-dbpurgeage.yml +++ b/fail2ban/tasks/fix-dbpurgeage.yml @@ -14,12 +14,12 @@ - name: ansible.builtin.set_fact: - dbpurgeage_default : "{{ dbpurgeage.stdout }}" + fail2ban_dbpurgeage_default : "{{ dbpurgeage.stdout }}" when: dbpurgeage.stdout | regex_search("^\\d+\w+$") - name: ansible.builtin.set_fact: - dbpurgeage_default : "{{ dbpurgeage.stdout }} second" + fail2ban_dbpurgeage_default : "{{ dbpurgeage.stdout }} second" when: dbpurgeage.stdout | regex_search("^\\d+$") - name: Add crontab diff --git a/fail2ban/templates/fail2ban_dbpurge.j2 b/fail2ban/templates/fail2ban_dbpurge.j2 index 8b6d9612..44c20f4c 100644 --- a/fail2ban/templates/fail2ban_dbpurge.j2 +++ b/fail2ban/templates/fail2ban_dbpurge.j2 @@ -2,7 +2,7 @@ # Juin - Decembre 2022 : #64088 # Purge pour Stretch et Buster -/usr/bin/ionice -c3 /usr/bin/sqlite3 /var/lib/fail2ban/fail2ban.sqlite3 "DELETE FROM bans WHERE datetime('now', '-{{ dbpurgeage_default }}') > datetime(timeofban, 'unixepoch');" +/usr/bin/ionice -c3 /usr/bin/sqlite3 /var/lib/fail2ban/fail2ban.sqlite3 "DELETE FROM bans WHERE datetime('now', '-{{ fail2ban_dbpurgeage_default }}') > datetime(timeofban, 'unixepoch');" place_dispo=$( df -h /var/lib/fail2ban/fail2ban.sqlite3 --output="avail" -h --block-size=1 |tail -n1 ) place_pris=$( echo $(("$(stat --format %s /var/lib/fail2ban/fail2ban.sqlite3 ) * 2" )) ) From e347b6eca8719234af117783ca68d62e71795d3d Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 4 Jul 2023 17:24:38 +0200 Subject: [PATCH 047/182] minifirewall: upstream release 23.07 --- CHANGELOG.md | 1 + minifirewall/files/minifirewall | 163 +++++++++++++++++++++++++++----- 2 files changed, 142 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37bdd103..c529c00e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * all: change syntax "become: [yes,no]" → "become: [true,false]" * elasticsearch: improve networking configuration * evolinux-users: remove Stretch references in tasks that also apply to next Debian versions +* minifirewall: upstream release 23.07 * mysql: improve shell syntax for mysql_skip script * pbbouncer: minor fixes * varnish: Allow the systemd template to be overriden with a template outside of the role diff --git a/minifirewall/files/minifirewall b/minifirewall/files/minifirewall index 3922e889..2272a4b0 100755 --- a/minifirewall/files/minifirewall +++ b/minifirewall/files/minifirewall @@ -5,7 +5,7 @@ # It uses netfilter/iptables http://netfilter.org/ designed for recent Linux kernel # See https://gitea.evolix.org/evolix/minifirewall -# Copyright (c) 2007-2022 Evolix +# Copyright (c) 2007-2023 Evolix # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 3 @@ -29,14 +29,19 @@ # Description: Firewall designed for standalone server ### END INIT INFO -VERSION="23.02" +VERSION="23.07" -NAME="minifirewall" +PROGNAME="minifirewall" # shellcheck disable=SC2034 DESC="Firewall designed for standalone server" set -u +if [ "$(id -u)" -ne "0" ] ; then + echo "${PROGNAME} must be run as root." >&2 + exit 1 +fi + # Variables configuration ######################### @@ -103,6 +108,9 @@ STATE_FILE_CURRENT='/var/run/minifirewall_state_current' STATE_FILE_PREVIOUS='/var/run/minifirewall_state_previous' STATE_FILE_DIFF='/var/run/minifirewall_state_diff' +ACTIVE_CONFIG='/var/run/minifirewall_active_config' +ACTIVE_CONFIG_DIFF="${ACTIVE_CONFIG}.diff" + LOGGER_BIN=$(command -v logger) # No colors by default @@ -152,12 +160,12 @@ remove_colors() { } syslog_info() { if [ -x "${LOGGER_BIN}" ]; then - ${LOGGER_BIN} -t "${NAME}" -p daemon.info "$1" + ${LOGGER_BIN} -t "${PROGNAME}" -p daemon.info "$1" fi } syslog_error() { if [ -x "${LOGGER_BIN}" ]; then - ${LOGGER_BIN} -t "${NAME}" -p daemon.error "$1" + ${LOGGER_BIN} -t "${PROGNAME}" -p daemon.error "$1" fi } sort_values() { @@ -254,14 +262,91 @@ source_configuration() { source_file_or_error "${config_file}" fi } +include_files() { + if [ -d "${includes_dir}" ]; then + find ${includes_dir} -type f -readable -not -name '*.*' | sort -h + else + echo "" + fi +} source_includes() { if [ -d "${includes_dir}" ]; then - include_files=$(find ${includes_dir} -type f -readable -not -name '*.*' | sort -h) - for include_file in ${include_files}; do + for include_file in $(include_files); do source_file_or_error "${include_file}" done fi } +filter_config_file() { + # Remove lines with: + # * empty or only whitespaces + # * comments + grep --extended-regexp --invert-match -e "^(\s*#)" -e "^\s*$" "${1}" +} +save_active_configuration() { + dest_file=${1} + rm -f "${dest_file}" + + echo "# ${config_file}" >> "${dest_file}" + filter_config_file "${config_file}" >> "${dest_file}" + + found_include_files=$(include_files) + if [ -n "${found_include_files}" ]; then + for include_file in ${found_include_files}; do + echo "# ${include_file}" >> "${dest_file}" + filter_config_file "${include_file}" >> "${dest_file}" + done + fi +} +check_active_configuration() { + # NRPE-compatible return codes + # 0: OK + # 1: WARNING + # 2: CRITICAL + # 3: UNKNOWN + rc=0 + + if [ -f "${ACTIVE_CONFIG}" ]; then + cmp_bin=$(command -v cmp) + diff_bin=$(command -v diff) + + if [ -z "${cmp_bin}" ]; then + printf "${YELLOW}WARNING: Skipped active configuration check (Can't find cmp(1) command)${RESET}\n" + rc=1 + elif [ -z "${diff_bin}" ]; then + printf "${YELLOW}WARNING: Skipped active configuration check (Can't find diff(1) command)${RESET}\n" + rc=1 + else + rm -f "${ACTIVE_CONFIG_DIFF}" + + tmp_config_file=$(mktemp --tmpdir=/tmp minifirewall.XXX) + save_active_configuration "${tmp_config_file}" + + cmp_result=$(cmp "${ACTIVE_CONFIG}" "${tmp_config_file}" 2>&1) + cmp_rc=$? + + if [ ${cmp_rc} -eq 0 ]; then + # echo " config has not changed since latest start" + printf "${GREEN}OK: Active configuration is up-to-date.${RESET}\n" + rc=0 + elif [ ${cmp_rc} -eq 1 ]; then + diff -u "${ACTIVE_CONFIG}" "${tmp_config_file}" > "${ACTIVE_CONFIG_DIFF}" + + printf "${RED}CRITICAL: Active configuration is not up-to-date (minifirewall not restarted after config change?), check %s${RESET}\n" "${ACTIVE_CONFIG_DIFF}" + rc=2 + else + printf "${RED}CRITICAL: Error while comparing rules:${RESET}\n" + printf "${cmp_result}\n" + rc=2 + fi + + rm -f "${tmp_config_file}" + fi + else + printf "${YELLOW}WARNING: Skipped active configuration check (missing file ${ACTIVE_CONFIG})${RESET}\n" + rc=1 + fi + exit ${rc} +} check_unpersisted_state() { cmp_bin=$(command -v cmp) diff_bin=$(command -v diff) @@ -279,7 +364,7 @@ check_unpersisted_state() { rm -f "${STATE_FILE_DIFF}" if [ -f "${STATE_FILE_LATEST}" ]; then - cmp_result=$(cmp "${STATE_FILE_LATEST}" "${STATE_FILE_CURRENT}") + cmp_result=$(cmp "${STATE_FILE_LATEST}" "${STATE_FILE_CURRENT}" 2>&1) cmp_rc=$? if [ ${cmp_rc} -eq 0 ]; then @@ -320,7 +405,7 @@ report_state_changes() { # But if there is a previous known state # let's compare with the new known state if [ -f "${STATE_FILE_PREVIOUS}" ]; then - cmp_result=$(cmp "${STATE_FILE_PREVIOUS}" "${STATE_FILE_LATEST}") + cmp_result=$(cmp "${STATE_FILE_PREVIOUS}" "${STATE_FILE_LATEST}" 2>&1) cmp_rc=$? if [ ${cmp_rc} -eq 0 ]; then @@ -339,11 +424,11 @@ report_state_changes() { start() { syslog_info "starting" - printf "${BOLD}${NAME} starting${RESET}\n" + printf "${BOLD}${PROGNAME} starting${RESET}\n" # Stop and warn if error! set -e - trap 'printf "${RED}${NAME} failed : an error occured during startup.${RESET}\n"; syslog_error "failed" ' INT TERM EXIT + trap 'printf "${RED}${PROGNAME} failed : an error occured during startup.${RESET}\n"; syslog_error "failed" ' INT TERM EXIT # sysctl network security settings ################################## @@ -909,17 +994,20 @@ start() { trap - INT TERM EXIT syslog_info "started" - printf "${GREEN}${BOLD}${NAME} started${RESET}\n" + printf "${GREEN}${BOLD}${PROGNAME} started${RESET}\n" # No need to exit on error anymore set +e + # save active configuration + save_active_configuration "${ACTIVE_CONFIG}" + report_state_changes } stop() { syslog_info "stopping" - printf "${BOLD}${NAME} stopping${RESET}\n" + printf "${BOLD}${PROGNAME} stopping${RESET}\n" printf "${BLUE}flushing all rules and accepting everything${RESET}\n" @@ -1000,10 +1088,10 @@ stop() { ${IPT6} -X NEEDRESTRICT fi - rm -f "${STATE_FILE_LATEST}" "${STATE_FILE_CURRENT}" + rm -f "${STATE_FILE_LATEST}" "${STATE_FILE_CURRENT}" "${ACTIVE_CONFIG}" syslog_info "stopped" - printf "${GREEN}${BOLD}${NAME} stopped${RESET}\n" + printf "${GREEN}${BOLD}${PROGNAME} stopped${RESET}\n" } status() { @@ -1038,7 +1126,7 @@ status_without_numbers() { reset() { syslog_info "resetting" - printf "${BOLD}${NAME} resetting${RESET}\n" + printf "${BOLD}${PROGNAME} resetting${RESET}\n" ${IPT} -Z if is_ipv6_enabled; then @@ -1053,21 +1141,43 @@ reset() { fi syslog_info "reset" - printf "${GREEN}${BOLD}${NAME} reset${RESET}\n" + printf "${GREEN}${BOLD}${PROGNAME} reset${RESET}\n" } show_version() { cat <. +Copyright 2007-2023 Evolix . -${NAME} comes with ABSOLUTELY NO WARRANTY. +${PROGNAME} comes with ABSOLUTELY NO WARRANTY. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License. END } +show_help() { + cat < Date: Tue, 4 Jul 2023 17:25:44 +0200 Subject: [PATCH 048/182] minifirewall: update nrpe script to check active configuration --- CHANGELOG.md | 1 + minifirewall/files/check_minifirewall | 95 +++++++++++++++++++++------ 2 files changed, 77 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c529c00e..0ad148c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * elasticsearch: improve networking configuration * evolinux-users: remove Stretch references in tasks that also apply to next Debian versions * minifirewall: upstream release 23.07 +* minifirewall: update nrpe script to check active configuration * mysql: improve shell syntax for mysql_skip script * pbbouncer: minor fixes * varnish: Allow the systemd template to be overriden with a template outside of the role diff --git a/minifirewall/files/check_minifirewall b/minifirewall/files/check_minifirewall index bcf70ff8..bfd5bfc7 100644 --- a/minifirewall/files/check_minifirewall +++ b/minifirewall/files/check_minifirewall @@ -1,5 +1,11 @@ #!/bin/sh +set -u + +return=0 +summary="" +details="" + is_alert5_enabled() { # It's not very clear how to reliably detect if a SysVinit script # wrapped in a systemd unit is enabled or not. @@ -39,48 +45,99 @@ is_minifirewall_started() { if test -x /usr/share/scripts/minifirewall_status; then /usr/share/scripts/minifirewall_status > /dev/null else - /sbin/iptables -L -n | grep -q -E "^(DROP\s+(udp|17)|ACCEPT\s+(icmp|1)))\s+--\s+0\.0\.0\.0\/0\s+0\.0\.0\.0\/0\s*$" + /sbin/iptables -L -n | grep -q -E "^(DROP\s+(udp|17)|ACCEPT\s+(icmp|1))\s+--\s+0\.0\.0\.0\/0\s+0\.0\.0\.0\/0\s*$" fi fi } -return_critical() { - echo "CRITICAL: $1" - exit 2 +summary_critical() { + summary="CRITICAL: $1" + [ "${return}" -le 2 ] && return=2 } - -return_warning() { - echo "WARNING: $1" - exit 1 +summary_warning() { + summary="WARNING: $1" + [ "${return}" -le 1 ] && return=1 } - -return_ok() { - echo "OK: $1" - exit 0 +summary_ok() { + summary="OK: $1" + [ "${return}" -le 0 ] && return=0 +} +append_details() { + if [ -z "${details}" ]; then + details="${1}\n" + else + details="${details}$1\n" + fi } main() { if is_alert5_enabled; then - if is_minifirewall_enabled; then + append_details "alert5 is enabled" + + if is_minifirewall_enabled; then + append_details "minifirewall is enabled" + if is_minifirewall_started; then - return_ok "Minifirewall is started." + append_details "minifirewall is started" + + check_result=$(/etc/init.d/minifirewall check-active-config) + check_rc=$? + + if [ ${check_rc} -eq 0 ]; then + append_details "configuration is up-to-date" + summary_ok "minifirewall is started and configuration is up-to-date" + else + if echo "${check_result}" | grep --quiet --regexp 'usage'; then + append_details "minifirewall is too old to check active configuration" + else + case "${check_rc}" in + 1) + summary_warning "minifirewall is started, but unknown configuration state" + ;; + 2) + summary_critical "minifirewall is started, but configuration is outdated" + append_details "configuration is outdated" + ;; + *) + summary_unchk "minifirewall is started, but unknown configuration state" + ;; + esac + append_details "=> run '/etc/init.d/minifirewall check-active-config' for details" + fi + fi else - return_critical "Minifirewall is not started." + summary_critical "minifirewall is stopped, but enabled in alert5 or systemd" fi else + append_details "minifirewall is disabled" + if is_minifirewall_started; then - return_warning "Minifirewall is started, but disabled in alert5 or systemd." + append_details "minifirewall is started" + summary_warning "minifirewall is started, but disabled in alert5 or systemd" else - return_ok "Minifirewall is not started, but disabled in alert5 or systemd." + append_details "minifirewall is stopped" + summary_ok "minifirewall is stopped, but disabled in alert5 or systemd" fi fi else + append_details "alert5 is disabled" + if is_minifirewall_started; then - return_warning "Minifirewall is started, but Alert5 script is not enabled." + append_details "minifirewall is started" + summary_warning "minifirewall is started, but alert5 is disabled" else - return_ok "Minifirewall is not started and Alert5 script is not enabled." + append_details "minifirewall is stopped" + summary_ok "minifirewall is stopped and alert5 is disabled" fi fi + + [ "${return}" -ge 0 ] && header="OK" + [ "${return}" -ge 1 ] && header="WARNING" + [ "${return}" -ge 2 ] && header="CRITICAL" + + printf "%s\n\n%s\n" "${summary}" "${details}" + + exit "${return}" } main From d747ee0f83ce0f576a43b30f1545bcfa7464f186 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Wed, 5 Jul 2023 16:13:16 +0200 Subject: [PATCH 049/182] minifirewall: add safe-restart and safe-start commands --- minifirewall/files/check_minifirewall | 5 +- minifirewall/files/minifirewall | 87 +++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 4 deletions(-) diff --git a/minifirewall/files/check_minifirewall b/minifirewall/files/check_minifirewall index bfd5bfc7..fc034de4 100644 --- a/minifirewall/files/check_minifirewall +++ b/minifirewall/files/check_minifirewall @@ -106,6 +106,7 @@ main() { fi fi else + append_details "minifirewall is stopped" summary_critical "minifirewall is stopped, but enabled in alert5 or systemd" fi else @@ -131,10 +132,6 @@ main() { fi fi - [ "${return}" -ge 0 ] && header="OK" - [ "${return}" -ge 1 ] && header="WARNING" - [ "${return}" -ge 2 ] && header="CRITICAL" - printf "%s\n\n%s\n" "${summary}" "${details}" exit "${return}" diff --git a/minifirewall/files/minifirewall b/minifirewall/files/minifirewall index 2272a4b0..b1b659de 100755 --- a/minifirewall/files/minifirewall +++ b/minifirewall/files/minifirewall @@ -111,6 +111,10 @@ STATE_FILE_DIFF='/var/run/minifirewall_state_diff' ACTIVE_CONFIG='/var/run/minifirewall_active_config' ACTIVE_CONFIG_DIFF="${ACTIVE_CONFIG}.diff" +SAFETY_LOCK='/var/run/minifirewall_safety.lock' +SAFETY_OUTPUT='/var/run/minifirewall_safety.out' +SAFETY_TIMER=30 + LOGGER_BIN=$(command -v logger) # No colors by default @@ -123,8 +127,10 @@ CYAN='' WHITE='' BOLD='' RESET='' + # check if stdout is a terminal... if [ -t 1 ]; then + INTERACTIVE=1 # see if it supports colors... ncolors=$(tput colors) @@ -141,7 +147,10 @@ if [ -t 1 ]; then BOLD=$(tput bold) RESET='\e[m' fi +else + INTERACTIVE=0 fi +readonly INTERACTIVE ## pseudo dry-run : ## Uncomment and call these functions instead of the real iptables and ip6tables commands @@ -155,6 +164,9 @@ fi # } ## Beware that commands executed from included files are not modified by this trick. +is_interactive() { + test "${INTERACTIVE}" = "1" +} remove_colors() { sed -r 's/\x1B\[(;?[0-9]{1,3})+[mGK]//g' } @@ -1143,6 +1155,58 @@ reset() { syslog_info "reset" printf "${GREEN}${BOLD}${PROGNAME} reset${RESET}\n" } + +stop_if_locked() { + count=0 + + while [ ${count} -lt ${SAFETY_TIMER} ] && [ -f "${SAFETY_LOCK}" ]; do + count=$(( count + 1 )) + sleep 1 + done + + if [ -f "${SAFETY_LOCK}" ]; then + syslog_error "safety lock is still here after ${SAFETY_TIMER} seconds, we need to stop" + + stop + + syslog_info "remove safety lock" + rm -f "${SAFETY_LOCK}" + else + syslog_info "safety lock is not there anymore, life goes on" + fi +} + +safe_start() { + # start the firewall + start + + # create the lock file + syslog_info "add safety lock" + touch "${SAFETY_LOCK}" + + # run the special background command + nohup "${0}" stop-if-locked > "${SAFETY_OUTPUT}" 2>&1 & + + if is_interactive; then + syslog_info "safe-restart in interactive mode ; if safety lock (${SAFETY_LOCK}) is not removed in the next ${SAFETY_TIMER} seconds, minifirewall will be stopped." + # Ask for input + confirm_default="I'm locked out, please stop the firewall" + # printf "If the restart has locked you out you might see this but you shouldn't be able to type anything.\n" + printf "Minifirewall will be stopped in ${SAFETY_TIMER} seconds if you do nothing.\n" + printf "Remove \`${SAFETY_LOCK}' or type anything to keep minifirewall started: " + + read -r confirm + + if [ ! -f "${SAFETY_LOCK}" ]; then + printf "Safety lock is not there anymore.\nYou've probably been rescued by the safety checks.\n" + elif [ "${confirm}" != "${confirm_default}" ]; then + rm -f "${SAFETY_LOCK}" && printf "OK. Safety lock is removed.\n" + fi + else + syslog_info "safe-restart in non-interactive mode ; if safety lock (${SAFETY_LOCK}) is not removed in the next ${SAFETY_TIMER} seconds, minifirewall will be stopped." + fi +} + show_version() { cat < Date: Thu, 6 Jul 2023 11:04:53 +0200 Subject: [PATCH 050/182] redis: standardize plugins path from /usr/local/share/munin/ to /usr/local/lib/munin/plugins/ --- CHANGELOG.md | 1 + redis/tasks/default-munin.yml | 8 ++++---- redis/tasks/instance-munin.yml | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ad148c2..83e893e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * varnish: Allow the systemd template to be overriden with a template outside of the role * postfix (packmail or when postfix_slow_transport_include is True): change `minimal_backoff_time` from 2h to 15m (see HowtoPostfix) * postfix (packmail) : optimize Amavis integration +* redis: standardize plugins path from /usr/local/share/munin/ to /usr/local/lib/munin/plugins/ ### Fixed diff --git a/redis/tasks/default-munin.yml b/redis/tasks/default-munin.yml index 44c45011..c7e18cff 100644 --- a/redis/tasks/default-munin.yml +++ b/redis/tasks/default-munin.yml @@ -13,7 +13,7 @@ - name: Create plugin directory ansible.builtin.file: - name: /usr/local/share/munin/ + name: /usr/local/lib/munin/ state: directory mode: "0755" tags: @@ -21,7 +21,7 @@ - name: Create plugin directory ansible.builtin.file: - name: /usr/local/share/munin/plugins/ + name: /usr/local/lib/munin/plugins/ state: directory mode: "0755" tags: @@ -30,7 +30,7 @@ - name: Copy redis munin plugin ansible.builtin.copy: src: munin_redis - dest: /usr/local/share/munin/plugins/redis_ + dest: /usr/local/lib/munin/plugins/redis_ mode: "0755" notify: restart munin-node tags: @@ -38,7 +38,7 @@ - name: Enable redis munin plugin ansible.builtin.file: - src: /usr/local/share/munin/plugins/redis_ + src: /usr/local/lib/munin/plugins/redis_ dest: "/etc/munin/plugins/redis_{{ plugin_name }}" state: link loop: diff --git a/redis/tasks/instance-munin.yml b/redis/tasks/instance-munin.yml index 3d2274e7..4492ccd7 100644 --- a/redis/tasks/instance-munin.yml +++ b/redis/tasks/instance-munin.yml @@ -13,7 +13,7 @@ - name: Create plugin directory ansible.builtin.file: - name: /usr/local/share/munin/ + name: /usr/local/lib/munin/ state: directory mode: "0755" tags: @@ -21,7 +21,7 @@ - name: Create plugin directory ansible.builtin.file: - name: /usr/local/share/munin/plugins/ + name: /usr/local/lib/munin/plugins/ state: directory mode: "0755" tags: @@ -30,7 +30,7 @@ - name: Copy redis munin plugin ansible.builtin.copy: src: munin_redis - dest: /usr/local/share/munin/plugins/redis_ + dest: /usr/local/lib/munin/plugins/redis_ mode: "0755" notify: restart munin-node tags: @@ -38,7 +38,7 @@ - name: Enable redis munin plugin ansible.builtin.file: - src: /usr/local/share/munin/plugins/redis_ + src: /usr/local/lib/munin/plugins/redis_ dest: "/etc/munin/plugins/{{ redis_instance_name }}_redis_{{ plugin_name }}" state: link loop: From 53f82edefb73861c8fd3f82fb97890f8d7e6be26 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 7 Jul 2023 11:18:20 +0200 Subject: [PATCH 051/182] evocheck: upstream release 23.07 --- evocheck/files/evocheck.jessie.sh | 2 +- evocheck/files/evocheck.sh | 50 ++++++++++++++++++------------- evocheck/files/evocheck.wheezy.sh | 2 +- 3 files changed, 31 insertions(+), 23 deletions(-) diff --git a/evocheck/files/evocheck.jessie.sh b/evocheck/files/evocheck.jessie.sh index 05b5f8d1..9cc1dcbb 100755 --- a/evocheck/files/evocheck.jessie.sh +++ b/evocheck/files/evocheck.jessie.sh @@ -4,7 +4,7 @@ # Script to verify compliance of a Linux (Debian) server # powered by Evolix -VERSION="23.04.01" +VERSION="23.07" readonly VERSION # base functions diff --git a/evocheck/files/evocheck.sh b/evocheck/files/evocheck.sh index 52441988..5b73eebf 100755 --- a/evocheck/files/evocheck.sh +++ b/evocheck/files/evocheck.sh @@ -4,7 +4,7 @@ # Script to verify compliance of a Linux (Debian) server # powered by Evolix -VERSION="23.04.01" +VERSION="23.07" readonly VERSION # base functions @@ -55,7 +55,7 @@ detect_os() { DEBIAN_MAIN_VERSION=$(cut -d "." -f 1 < /etc/debian_version) if [ "${DEBIAN_MAIN_VERSION}" -lt "9" ]; then - echo "Debian ${DEBIAN_MAIN_VERSION} is incompatible with this version of evocheck." >&2 + echo "Debian ${DEBIAN_MAIN_VERSION} is incompatible with this version of evocheck." >&2 echo "This version is built for Debian 9 and later." >&2 exit fi @@ -276,7 +276,7 @@ check_alert5minifw() { fi } check_minifw() { - /sbin/iptables -L -n | grep -q -E "^ACCEPT\s*all\s*--\s*31\.170\.8\.4\s*0\.0\.0\.0/0\s*$" \ + /sbin/iptables -L -n | grep -q -E "^ACCEPT\s*(all|0)\s*--\s*31\.170\.8\.4\s*0\.0\.0\.0/0\s*$" \ || failed "IS_MINIFW" "minifirewall seems not started" } check_minifw_includes() { @@ -307,7 +307,7 @@ check_nrpedisks() { test "$NRPEDISKS" = "$DFDISKS" || failed "IS_NRPEDISKS" "there must be $DFDISKS check_disk in nrpe.cfg" } check_nrpepid() { - if is_debian_bullseye; then + if { is_debian_bullseye || is_debian_bookworm ; }; then { test -e /etc/nagios/nrpe.cfg \ && grep -q "^pid_file=/run/nagios/nrpe.pid" /etc/nagios/nrpe.cfg; } || failed "IS_NRPEPID" "missing or wrong pid_file directive in nrpe.cfg" @@ -874,19 +874,27 @@ check_ldap_backup() { check_redis_backup() { if is_installed redis-server; then # You could change the default path in /etc/evocheck.cf - # REDIS_BACKUP_PATH may contain space-separated paths, example: + # REDIS_BACKUP_PATH may contain space-separated paths, for example: # REDIS_BACKUP_PATH='/home/backup/redis-instance1/dump.rdb /home/backup/redis-instance2/dump.rdb' - # Old default path: /home/backup/dump.rdb - # New default path: /home/backup/redis/dump.rdb - if [ -z "${REDIS_BACKUP_PATH}" ]; then - if ! [ -f "/home/backup/dump.rdb" ] && ! [ -f "/home/backup/redis/dump.rdb" ]; then - failed "IS_REDIS_BACKUP" "Redis dump is missing (/home/backup/dump.rdb or /home/backup/redis/dump.rdb)." - fi - else - for file in ${REDIS_BACKUP_PATH}; do - test -f "${file}" || failed "IS_REDIS_BACKUP" "Redis dump ${file} is missing." - done + # Warning : this script doesn't handle spaces in file paths ! + + REDIS_BACKUP_PATH="${REDIS_BACKUP_PATH:-$(find /home/backup/ -iname "*.rdb*")}" + + # Check number of dumps + n_instances=$(pgrep 'redis-server' | wc -l) + n_dumps=$(echo $REDIS_BACKUP_PATH | wc -w) + if [ ${n_dumps} -lt ${n_instances} ]; then + failed "IS_REDIS_BACKUP" "Missing Redis dump : ${n_instances} instance(s) found versus ${n_dumps} dump(s) found." fi + + # Check last dump date + age_threshold=$(date +"%s" -d "now - 2 days") + for dump in ${REDIS_BACKUP_PATH}; do + last_update=$(stat -c "%Z" $dump) + if [ "${last_update}" -lt "${age_threshold}" ]; then + failed "IS_REDIS_BACKUP" "Redis dump ${dump} is older than 2 days." + fi + done fi } check_elastic_backup() { @@ -1076,14 +1084,14 @@ check_usrsharescripts() { check_sshpermitrootno() { sshd_args="-C addr=,user=,host=,laddr=,lport=0" if is_debian_stretch; then - # Noop, we'll use the default $sshd_args + # Noop, we'll use the default $sshd_args : elif is_debian_buster; then - sshd_args="${sshd_args},rdomain=" + sshd_args="${sshd_args},rdomain=" else - # NOTE: From Debian Bullseye 11 onward, with OpenSSH 8.1, the argument + # NOTE: From Debian Bullseye 11 onward, with OpenSSH 8.1, the argument # -T doesn't require the additional -C. - sshd_args= + sshd_args= fi # shellcheck disable=SC2086 if ! (sshd -T ${sshd_args} 2> /dev/null | grep -qi 'permitrootlogin no'); then @@ -1216,7 +1224,7 @@ check_lxc_container_resolv_conf() { else failed "IS_LXC_CONTAINER_RESOLV_CONF" "resolv.conf missing in container ${container}" fi - done + done fi } # Check that there are containers if lxc is installed. @@ -1302,7 +1310,7 @@ get_version() { case "${program}" in ## Special case if `command --version => 'command` is not the standard way to get the version # my_command) - # /path/to/my_command --get-version + # /path/to/my_command --get-version # ;; add-vm) diff --git a/evocheck/files/evocheck.wheezy.sh b/evocheck/files/evocheck.wheezy.sh index 461540b3..2df0e814 100755 --- a/evocheck/files/evocheck.wheezy.sh +++ b/evocheck/files/evocheck.wheezy.sh @@ -4,7 +4,7 @@ # Script to verify compliance of a Linux (Debian) server # powered by Evolix -VERSION="23.04.01" +VERSION="23.07" readonly VERSION # base functions From 831715e44cc8c6e9ded99bbd4d496b4d95809c31 Mon Sep 17 00:00:00 2001 From: Mathieu Trossevin Date: Fri, 7 Jul 2023 11:27:46 +0200 Subject: [PATCH 052/182] fix(nagios-nrpe): Fix check_ssl_local output nrpe read output of plugins from stdout only, if there is no output it return UNKNOWN regardless of return code. --- CHANGELOG.md | 1 + nagios-nrpe/files/plugins/check_ssl_local | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83e893e6..143d8a65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * nagios-nrpe: remount /usr **after** installing the packages * packweb-apache,nagios-nrpe: add missing task and config for PHP 8.2 container * potsfix: add missing `localhost.$mydomain` to mydestination +* nagios-nrpe: check\_ssl\_local now has an output that nrpe can understand when it isn't OK ### Removed diff --git a/nagios-nrpe/files/plugins/check_ssl_local b/nagios-nrpe/files/plugins/check_ssl_local index 860ed676..9ccd5965 100755 --- a/nagios-nrpe/files/plugins/check_ssl_local +++ b/nagios-nrpe/files/plugins/check_ssl_local @@ -25,7 +25,7 @@ certs_list=$(cat "$certs_list_path" | sed -E 's/(.*)#.*/\1/g' | grep -v -E '^$') for cert_path in $certs_list; do if [ ! -f "$cert_path" ] && [ ! -d "$cert_path" ]; then - >&2 echo "Warning: path '$cert_path' is not a file or a directory." + echo "Warning: path '$cert_path' is not a file or a directory." warning=1 continue fi @@ -35,21 +35,21 @@ for cert_path in $certs_list; do # Check cert expiré (critique) if ! openssl x509 -checkend 0 -in "$cert_path" &> /dev/null; then critical=1 - >&2 echo "Critical: Cert '$cert_path' has expired on $enddate." + echo "Critical: Cert '$cert_path' has expired on $enddate." continue fi # Check cert expire < 10 jours (critique) if ! openssl x509 -checkend "$_10_days" -in "$cert_path" &> /dev/null; then critical=1 - >&2 echo "Critical: Cert '$cert_path' will expire on $enddate." + echo "Critical: Cert '$cert_path' will expire on $enddate." continue fi # Check cert expire < 15 jours (warning) if ! openssl x509 -checkend "$_15_days" -in "$cert_path" &> /dev/null; then warning=1 - >&2 echo "Warning: Cert '$cert_path' will expire on $enddate." + echo "Warning: Cert '$cert_path' will expire on $enddate." continue fi From da0110b4f3f5478e8bdd6b1f93908d64ee16698c Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 7 Jul 2023 12:02:02 +0200 Subject: [PATCH 053/182] nagios-nrpe: Cleaning of check_ssl_local (minor) --- nagios-nrpe/files/plugins/check_ssl_local | 38 +++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/nagios-nrpe/files/plugins/check_ssl_local b/nagios-nrpe/files/plugins/check_ssl_local index 9ccd5965..76b54748 100755 --- a/nagios-nrpe/files/plugins/check_ssl_local +++ b/nagios-nrpe/files/plugins/check_ssl_local @@ -16,54 +16,54 @@ critical=0 warning=0 -if [[ ! -f "$certs_list_path" ]]; then - touch "$certs_list_path" +if [[ ! -f "${certs_list_path}" ]]; then + touch "${certs_list_path}" fi -certs_list=$(cat "$certs_list_path" | sed -E 's/(.*)#.*/\1/g' | grep -v -E '^$') +certs_list=$(sed -E 's/(.*)#.*/\1/g' "${certs_list_path}" | grep -v -E '^$') -for cert_path in $certs_list; do - - if [ ! -f "$cert_path" ] && [ ! -d "$cert_path" ]; then - echo "Warning: path '$cert_path' is not a file or a directory." +for cert_path in ${certs_list}; do + + if [ ! -f "$cert_path" ] && [ ! -d "${cert_path}" ]; then + echo "Warning: path '${cert_path}' is not a file or a directory." warning=1 continue fi - enddate=$(openssl x509 -noout -enddate -in "$cert_path" | cut -d'=' -f2) - + enddate=$(openssl x509 -noout -enddate -in "${cert_path}" | cut -d'=' -f2) + # Check cert expiré (critique) - if ! openssl x509 -checkend 0 -in "$cert_path" &> /dev/null; then + if ! openssl x509 -checkend 0 -in "${cert_path}" &> /dev/null; then critical=1 - echo "Critical: Cert '$cert_path' has expired on $enddate." + echo "Critical: Cert '${cert_path}' has expired on ${enddate}." continue fi # Check cert expire < 10 jours (critique) - if ! openssl x509 -checkend "$_10_days" -in "$cert_path" &> /dev/null; then + if ! openssl x509 -checkend "${_10_days}" -in "${cert_path}" &> /dev/null; then critical=1 - echo "Critical: Cert '$cert_path' will expire on $enddate." + echo "Critical: Cert '${cert_path}' will expire on ${enddate}." continue fi # Check cert expire < 15 jours (warning) - if ! openssl x509 -checkend "$_15_days" -in "$cert_path" &> /dev/null; then + if ! openssl x509 -checkend "${_15_days}" -in "${cert_path}" &> /dev/null; then warning=1 - echo "Warning: Cert '$cert_path' will expire on $enddate." + echo "Warning: Cert '${cert_path}' will expire on ${enddate}." continue fi # Cert expire > 15 jours (OK) - echo "Cert '$cert_path' OK." + echo "Cert '${cert_path}' OK." done -if [ $critical -eq 1 ]; then +if [ "${critical}" -eq 1 ]; then exit 2 -elif [ $warning -eq 1 ]; then +elif [ "${warning}" -eq 1 ]; then exit 1 else exit 0 fi - + From 016750685fd719362be4e4c82382cc09dce79c9b Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 7 Jul 2023 15:05:41 +0200 Subject: [PATCH 054/182] userlogrotate: add a userlogpurge script disabled by default --- userlogrotate/' | 1347 ++++++++++++++++++++++++++++++ userlogrotate/files/userlogpurge | 6 + userlogrotate/tasks/main.yml | 23 + 3 files changed, 1376 insertions(+) create mode 100644 userlogrotate/' create mode 100644 userlogrotate/files/userlogpurge diff --git a/userlogrotate/' b/userlogrotate/' new file mode 100644 index 00000000..9a8b52de --- /dev/null +++ b/userlogrotate/' @@ -0,0 +1,1347 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). + +This project does not follow semantic versioning. +The **major** part of the version is the year +The **minor** part changes is the month +The **patch** part changes is incremented if multiple releases happen the same month + + +## [Unreleased] + +### Added + +* userlogrotate: rotate also php.log. +* nagios-nrpe: add a NRPE check-local command with completion. +* policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory +* docker-host: added var for user namespace setting +* dovecot: fix old_stats plugin for Dovecot 2.3. +* dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) +* fail2ban: add default variable fail2ban_dbpurgeage_default +* userlogrotate: add a userlogpurge script disabled by default + +### Changed + +* all: change syntax "force: [yes,no]" → "force: [true,false]" +* all: change syntax "become: [yes,no]" → "become: [true,false]" +* elasticsearch: improve networking configuration +* evolinux-users: remove Stretch references in tasks that also apply to next Debian versions +* minifirewall: upstream release 23.07 +* minifirewall: update nrpe script to check active configuration +* mysql: improve shell syntax for mysql_skip script +* pbbouncer: minor fixes +* varnish: Allow the systemd template to be overriden with a template outside of the role +* postfix (packmail or when postfix_slow_transport_include is True): change `minimal_backoff_time` from 2h to 15m (see HowtoPostfix) +* postfix (packmail) : optimize Amavis integration +* redis: standardize plugins path from /usr/local/share/munin/ to /usr/local/lib/munin/plugins/ + +### Fixed + +* elasticsearch: comment the Xlog:gc line instead of changing it completely +* nagios-nrpe: remount /usr **after** installing the packages +* packweb-apache,nagios-nrpe: add missing task and config for PHP 8.2 container +* potsfix: add missing `localhost.$mydomain` to mydestination +* nagios-nrpe: check\_ssl\_local now has an output that nrpe can understand when it isn't OK + +### Removed + +* dovecot: remove Munin plugin dovecot (not working) + +### Security + +## [23.04] 2023-04-23 + +### Added + +* graylog: new role +* lxc-php: add support for PHP 8.2 container + +### Changed + +* Use FQCN (Fully Qualified Collection Name) +* apt: with Debian 12, backports are installed but disabled by default +* openvpn: updated the README file +* pgbouncer: add handler to restart the service + +### Fixed + +* generate-ldif: Support for Debian 12 + +## [23.03.1] 2023-03-16 + +### Added + +* pgbouncer: new role + +### Changed + +* apt: deb822 migration python script is looked relative to shell script +* listupgrade: remove old typo version of the cron task +* minifirewall: support protocols in numeric form + +## [23.03] 2023-03-16 + +### Added + +* apache: add task to enable mailgraph on default vhost and index.html +* apt: add move-apt-keyrings script/tasks +* apt: add tools to migrate sources to deb822 format +* fail2ban: add "Internal login failure" to Dovecot filter +* lxc: copy `/etc/profile.d/evolinux.sh` from host into container +* nagios-nrpe: add tasks/files for a wrapper +* nagios-nrpe: Print pool config path in check_phpfpm_multi output +* php: add `php_version` variable when sury is activated for each Debian version +* php: add a way to choose which version to install using sury repository +* postfix: Add task to enable mailgraph on packmail +* postgresql: configure max_connections +* userlogrotate: create dedicated role, separated from packweb-apache +* varnish: add `varnish_update_config` variable to disable configuration update + +### Changed + +* Use systemd module instead of command +* Removed all `warn: False` args in command, shell and other modules as it's been deprecated and will give a hard fail in ansible-core 2.14.0. +* apt: Use pub.evolix.org instead of pub.evolix.net +* bind: refactor role +* elasticsearch: Disable garabge collector logging (JDK >= 9) +* evolinux-users: Update sudoers template to remove commands allowed without password +* listupgrade: upstream release 23.03.3 +* kvmstats: use virsh domstats | awk to get guests informations +* nagios-nrpe : Rewrite `check_vrrpd` for a better check (check `rp_filter`, `vrrpd` and `uvrrpd` compatible, use arguments, …) +* openvpn: Change `check_openvpn` destination file to comply with recent EvoBSD change +* postfix: come back to default value of `notify_classes` for pack mails. +* userlogrotate: set rotate date format in right order (YYYY-MM-DD)! +* webapps/nextcloud : Change default data directory to be outside web root +* webapps/nextcloud : Small enhancement on the vhost template to lock out data dir +* yarn: update apt key + +### Fixed + +* Proper jinja spacing +* clamav: set `MaxConnectionQueueLength` to its default value (200), custom (15) was way too small and caused recurring failures in Postfix. +* docker-host: fix type in `daemon.json` and remove host configuration that is already in the systemd service by default +* evolinux-base: ensure dbus is started and enabled (not by default in the case of an offline netinst) +* haproxy: fix missing admin ACL in stats module access permissions +* openvpn: fix the client cipher configuration to match the server cipher configuration +* php: fix error introduced in #33503e4538 (`False` evaluated as a String instead of Boolean) +* php: install using Sury repositories on Bullseye +* postfix (packmail only): disable `concurrency_failed_cohort_limit` for destination smtp-amavis to prevent the suspension of this destination when Amavis fails to answer. Indeed, we configure the suspension delay quite long in `minimal_backoff_time` (2h) and `maximal_backoff_time` (6h) to reduce the risk of ban from external SMTPs. +* postfix: avoid Amavis transport to be considered dead when restarted. +* postfix: remove unused `aliases_scope=sub` from virtual_aliases.cf (it generated warnings) +* userlogrotate: fix bug introduced in commit 2e54944a246 (rotated files were not zipped) +* userlogrotate: skip zipping if .gz log already exists (prevents interactive question) + +### Removed + +* evolinux-base: subversion is not installed anymore + + +## [22.12] 2022-12-14 + +### Added + +* all: add signed-by option for additional APT sources +* all: preliminary work to support Debian 12 +* all: use proper keyrings directory for APT version +* evolinux-base: replace regular kernel by cloud kernel on virtual servers +* lxc-php: set php-fpm umask to `007` +* nagios-nrpe: `check_ceph_*` +* nagios-nrpe: `check_haproxy_stats` supports DRAIN status +* packweb-apache: enable `log_forensic` module +* rabbitmq: add link in default page +* varnish: create special tmp directory for syntax validation +* postfix: add localhost.$mydomain to mydestination + +### Changed + +* certbot: auto-detect HAPEE version in renewal hook +* evocheck: install script according to Debian version +* evolinux-base: `utils.yml` can be excluded +* evolinux-todo: execute tasks only for Debian distribution (because this task is a dependency for others roles used on different distributions) +* evolinux-user: add sudoers privilege for check `php_fpm81` +* evomaintenance: allow missing API endpoint if APi is disabled +* java: use default JRE package when version is not specified +* keepalived: change exit code (_warning_ if running but not on expected state ; _critical_ if not running) +* listupgrade: better detection for PostgreSQL +* listupgrade: sort/uniq of packages/services lists in email template +* lxc-solr: detect the real partition options +* lxc-solr: download URL according to Solr Version +* lxc-solr: set homedir and port at install +* minifirewall: whitelist deb.freexian.com +* openvpn: shellpki upstream release 22.12.2 +* openvpn: specifies that the mail for expirations is for OpenVPN +* packweb-apache: manual dependencies resolution +* redis: some values should be quoted +* redis: variable to disable transparent hugepage (default: do nothing) +* squid: whitelist `deb.freexian.com` +* varnish: better package facts usage with check mode and tags +* varnish: systemd override depends on Varnish version instead of Debian version + +### Fixed + +* evolinux-user: Fix sudoers privilege for check `php_fpm80` +* nagios-nrpe: Fix check opendkim for recent change in listening port +* openvpn: Fix mode of shellpki script +* proftpd: Fix format of public key files controlled by Ansible +* proftpd: Fix mode of public key directory and files (they have to be accessible by `proftpd:nobody`) +* varnish: fix missing state, that blocked the task + +### Removed + +* openvpn: Deleted the task fixing the CRL rights since it has been fixed in upstream + + +## [22.09] 2022-09-19 + +### Added + +* evolinux_users: create only users who have a certain value for the `create` key (default: `always`). +* php: install php-xml with recent PHP versions +* vrrp: add an `ip.yml` task file to help create VRRP addresses +* webapps/nextcloud: Add compatibility with apache2, and apache2 mod_php. +* memcached: NRPE check for multi-instance setup +* munin: Add ipmi_ plugins on dedicated hardware +* proftpd: Add options to override configs (and add a warning if file was overriden) +* proftpd: Allow user auth with ssh keys + + +### Changed + +* evocheck: upstream release 22.09 +* evolinux-base: update-evobackup-canary upstream release 22.06 +* generate-ldif: Support any MariaDB version +* minifirewall: use handlers to restart minifirewall +* openvpn: automate the initialization of the CA and the creation of the server certificate ; use openssl_dhparam module instead of a command +* generate-ldif: support any version of MariaDB (instead of only 10.0, 10.1 and 10.3) +* openvpn: Run OpenVPN with the \_openvpn user and group instead of nobody which is originally for NFS +* nagios-nrpe: Upgrade check_mongo + +### Fixed + +* fail2ban: fix dovecot-evolix regex syntax +* haproxy: make it so that munin doesn't break if there is a non default `haproxy_stats_path` +* mysql: Add missing Munin conf for Debian 11 +* redis: config directory must be owned by the user that runs the service (to be able to write tmp config files in it) +* varnish: make `-j ` the first argument on jessie/stretch as it has to be the first argument there. +* webapps/nextcloud: Add missing dependencies for imagick + +### Removed + +* evocheck: remove failure if deprecated variable is used +* webapps/nextcloud: Drop support for Nginx + +## [22.07.1] 2022-07-28 + +### Changed + +* evocheck: upstream release 22.07 +* evomaintenance: upstream release 22.07 +* mongodb: replace version_compare() with version() +* nagios-nrpe: check_disk1 returns only alerts +* nagios-nrpe: use regexp to exclude paths/devices in check_disk1 + +## [22.07] 2022-07-08 + +### Added + +* fail2ban: Ensure apply dbpurgeage from stretch and buster + +## [22.07] 2022-07-06 + +### Added + +* evolinux-base: session timeout is configurable (default: 36000 seconds = 10 hours) +* haproxy: add haproxy_allow_ip_nonlocal_bind to set sysctl value (optional) +* kvm-host: fix depreciation of "drbd-overview" by "drbdadm status" in add-vm.sh +* openvpn: configure logrotate + +### Changed + +* openvpn: minimal rights on /etc/shellpki/ and crl.pem + +### Fixed + +* evolinux-base: Update PermitRootLogin task to work on Debian 11 +* evolinux-user: Update PermitRootLogin task to work on Debian 11 +* minifirewall: docker mode is configurable + +## [22.06.3] 2022-06-17 + +### Changed + +* evolinux-base: blacklist and do not install megaclisas-status package on incompatible servers + +## [22.06.2] 2022-06-10 + +### Added + +* postgresql: add variable to configure binding addresses (default: 127.0.0.1) + +### Changed + +* evocheck: upstream release 22.06.2 +* fail2ban: Give the possibility to override jail.local (with fail2ban_override_jaillocal) +* fail2ban: If jail.local was overriden, add a warning +* fail2ban: Allow to tune some jail settings (maxretry, bantime, findtime) with ansible +* fail2ban: Allow to tune the default action with ansible +* fail2ban: Change default action to ban only (instead of ban + mail with whois report) +* fail2ban: Configure recidive jail (off by default) + extend dbpurgeage +* redis: binding is possible on multiple interfaces (breaking change) + +### Fixed + +* Enforce String notation for mode +* postgresql: fix nested loop for Munin plugins +* postgresql: Fix task order when using pgdg repo +* postgresql: Install the right pg version + +## [22.06.1] 2022-06-06 + +### Changed + +* evocheck: upstream release 22.06.1 +* minifirewall: upstream release 22.06 +* mysql: evomariabackup release 22.06.1 +* mysql: reorganize evomariabackup to use mtree instead of our own dir-check + +## [22.06] 2022-06-03 + +### Added + +* certbot: add hapee (HAProxy Enterprise Edition) deploy hook +* evolinux-base: add dir-check script +* evolinux-base: add update-evobackup-canary script +* mysql: add post-backup-hook to evomariabackup +* mysql: use dir-check inside evomariabackup + +### Changed + +* docker: Allow "live-restore" to be toggled with docker_conf_live_restore +* evocheck: upstream release 22.06 +* evolinux-base: Replacement of variable `evolinux_packages_hardware` by `ansible_virtualization_role == "host"` automatize host type detection and avoids installing smartd & other on VM. +* minifirewall: tail template follows symlinks +* mysql: add "set crypt_use_gpgme=no" Mutt option, for mysqltuner + +### Fixed + +* Role `postfix`: Add missing `localhost.localdomain localhost` to `mydestination` variable which caused undelivered of some local mails. + +## [22.05.1] 2022-05-12 + +### Added + +* docker : Introduce new default settings + allow to change the docker data directory +* docker : Introduce new variables to tweak daemon settings + +### Changed + +* evocheck: upstream release 22.05 + +### Removed + +* docker : Removed Debian Jessie support + +## [22.05] 2022-05-10 + +### Added + +* etc-git: use "ansible-commit" to efficiently commit all available repositories (including /etc inside LXC) from Ansible +* minifirewall: compatibility with "legacy" version of minifirewall +* minifirewall: configure proxy/backup/sysctl values +* munin: Add possibility to install local plugins, and install dhcp_pool plugin +* nagios-nrpe: Add a check dhcp_pool +* redis: Activate overcommit sysctl +* redis: Add log2mail user to redis group + +### Changed + +* dump-server-state: upstream release 22.04.3 +* evocheck: upstream release 22.04.1 +* evolinux-base: Add non-free repos & install non-free firmware on dedicated hardware +* evolinux-base: rename backup-server-state to dump-server-state +* generate-ldif: Add services check for bkctld +* minifirewall: restore "force-restart" and fix "restart-if-needed" +* minifirewall: tail template follows symlinks +* minifirewall: upstream release 22.05 +* opendkim : add generate opendkim-genkey in sha256 and key 4096 +* openvpn: use a local copy of files instead of cloning an external git repository +* openvpn: use a subnet topology instead of the net30 default topology +* tomcat: Tomcat 9 by default with Debian 11 +* vrrpd: Store sysctl values in specific file + +### Fixed + +* etc-git : Remount /usr in rw for git gc in in /usr/share/scripts/ +* etc-git: Make evocommit fully compatible with OpenBSD +* generate-ldif: Correct generated entries for php-fpm in containers +* keepalived: repair broken role +* minifirewall: fix `failed_when` condition on restart +* postfix: Do not send mails through milters a second time after amavis (in packmail) +* redis: Remount /usr with RW before adding nagios plugin + +## [22.03] 2022-03-02 + +### Added + +* apt: apt_hold_packages: broadcast message with wall, if present +* evolinux-base: option to bypass raid-related tasks +* Explicit permissions for systemd overrides +* generate-ldif: Add support for php-fpm in containers +* kvm-host: add missing default value +* lxc-php: preliminary support for PHP 8.1 container +* openvpn: now check that openvpn has been restarted since last certificates renewal +* redis: always install check_redis_instances +* redis: check_redis_instances tolerates absence of instances + +### Changed + +* elasticsearch: Use `/etc/elasticsearch/jvm.options.d/evolinux` instead of default `/etc/elasticsearch/jvm.options` +* evolinux-users: check permissions for /etc/sudoers.d +* evolinux-users: optimize sudo configuration +* lxc: Fail if /var is nosuid +* openvpn: make it compatible with OpenBSD and add some improvements + +## [22.01.3] 2022-01-31 + +### Changed + +* rbenv: install Ruby 3.1.0 by default +* evolinux-base: backup-server-state: add "force" mode + +### Fixed + +* evolinux-base: backup-server-state: fix systemctl invocation +* varnish: update munin plugin to work with recent varnish versions + +## [22.01.2] 2022-01-27 + +### Changed + +* evolinux-base: many improvements for backup-server-state script +* remount-usr: use findmnt to find if usr is a readonly partition + +## [22.01] 2022-01-25 + +### Added + +* Support for Debian 11 « Bullseye » (with possible remaining blind spots) +* apache: new variable for MPM mode (+ updated default config accordingly) +* apache: prevent accessing Git or "env" related files +* certbot: add script for manual deploy hooks execution +* docker-host: install additional dependencies +* dovecot: switch to TLS 1.2+ and external DH params +* etc-git: centralize cron jobs in dedicated crontab +* etc-git: manage commits with an optimized shell script instead of many slow Ansible tasks +* evolinux-base: add script backup-server-state +* evolinux-base: configure top and htop to display the swap column +* evolinux-base: install molly-guard by default +* generate-ldif: detect RAID controller +* generate-ldif: detect mdadm +* listupgrade: crontab is configurable +* logstash: logging to syslog is configurable (default: True) +* mongodb: create munin plugins directory if missing +* munin: systemd override to unprotect home directory +* mysql: add evomariabackup 21.11 +* mysql: improve Bullseye compatibility +* mysql: script "mysql_connections" to display a compact list of connections +* mysql: script "mysql-queries-killer.sh" to kill MySQL queries +* nagios-nrpe + evolinux-users: new check for ipmi +* nagios-nrpe + evolinux-users: new check for RAID (soft + hard) +* nagios-nrpe + evolinux-users: new checks for bkctld +* nagios-nrpe: new check influxdb +* openvpn: new role (beta) +* redis: instance service for Debian 11 +* squid: add *.o.lencr.org to default whitelist + +### Changed + +* Change version pattern +* Install python 2 or 3 libraries according to running python version +* Remove embedded GPG keys only if legacy keyring is present +* apt: remove workaround for Evolix public repositories with Debian 11 +* apt: upgrade packages after all the configuration is done +* apt: use the new security repository for Bullseye +* certbot: silence letsencrypt deprecation warnings +* elasticsearch: elastic_stack_version = 7.x +* evoacme: exclude renewal-hooks directory from cron +* evoadmin-web: simpler PHP packages lists +* evocheck: upstream release 21.10.4 +* evolinux-base: alert5 comes after the network +* evolinux-base: force Debian version to buster for Evolix repository (temporary) +* evolinux-base: install freeipmi by default on dedicated hw +* evolinux-base: logs are rotated with dateext by default +* evolinux-base: split dpkg logrotate configuration +* evolinux-users + nagios-nrpe: Add support for php-fpm80 in lxc +* evomaintenance: extract a config.yml tasks file +* evomaintenance: upstream release 22.01 +* filebeat/metricbeat: elastic_stack_version = 7.x +* kibana: elastic_stack_version = 7.x +* listupgrade: old-kernel-removal version 21.10 +* listupgrade: upstream release 21.06.3 +* logstash: elastic_stack_version = 7.x +* mongodb: Allow to specify a mongodb version for buster & bullseye +* mongodb: Deny the install on Debian 11 « Bullseye » when the version is unsupported +* mongodb: Support version 5.0 (for buster) +* mysql: use python3 and mariadb-client-10.5 with Debian 11 and later +* nodejs: default to version 16 LTS +* php: enforce Debian version with assert instead of fail +* squid: improve default whitelist (more specific patterns) +* squid: must be started in foreground mode for systemd +* squid: remove obsolete variable on Squid 4 + +### Fixed + +* evolinux-base: fix alert5.service dependency syntax +* certbot: sync_remote excludes itself +* lxc-php: fix config for opensmtpd on bullseye containers +* mysql : Create a default ~root/.my.cnf for compatibility reasons +* nginx : fix variable name and debug to actually use nginx-light +* packweb-apache : Support php 8.0 +* nagios-nrpe: Fix check_nfsserver for buster and bullseye + +### Removed + +* evocheck: package install is not supported anymore +* logstash: no more dependency on Java +* php: remove php-gettext for 7.4 + +## [10.6.0] 2021-06-28 + +### Added + +* Add Elastic GPG key to kibana, filebeat, logstash, metricbeat roles +* apache: new variable for mpm mode (+ updated default config accordingly) +* evolinux-base: add default motd template +* kvm-host: add migrate-vm script +* mysql: variable to disable myadd script overwrite (default: True) +* nodejs: update apt cache before installing the package +* squid: add Yarn apt repository in default whitelist + +### Changed + +* Update Galaxy metadata (company, platforms and galaxy_tags) +* Use 'loop' syntax instead of 'with_first_found/with_items/with_dict/with_nested/with_list' +* Use Ansible syntax used in Ansible 2.8+ +* apt: store keys in /etc/apt/trusted.gpg.d in ascii format +* certbot: sync_remote.sh is configurable +* evolinux-base: copy GPG key instead of using apt-key +* evomaintenance: upstream release 0.6.4 +* kvm-host: replace the "kvm-tools" package with scripts deployed by Ansible +* listupgrade: upstream release 21.06.2 +* nodejs: change GPG key name +* ntpd: Add leapfile configuration setting to ntpd on debian 10+ +* packweb-apache: install phpMyAdmin from buster-backports +* spamassassin: change dependency on evomaintenance +* squid: remove obsolete variable on Squid 4 + +### Fixed + +* add default (useless) value for file lookup (first_found) +* fix pipefail option for shell invocations +* elasticsearch: inline YAML formatting of seed_hosts and initial_master_nodes +* evolinux-base: fix motd lookup path +* ldap: fix edge cases where passwords were not set/get properly +* listupgrade: fix wget error + shellcheck cleanup + +### Removed + +* elasticsearch: recent versiond don't depend on external JRE + +## [10.5.1] 2021-04-13 + +### Added + +* haproxy: dedicated internal address/binding (without SSL) + +### Changed + +* etc-git: commit in /usr/share/scripts when there's an active repository + +## [10.5.0] 2021-04-01 + +### Added + +* apache: new variables for logrotate + server-status +* filebeat: package can be upgraded to latest (default: False) +* haproxy: possible admin access with login/pass +* lxc-php: Add PHP 7.4 support +* metricbeat: package can be upgraded to latest (default: False) +* metricbeat: new variables to configure SSL mode +* nagios-nrpe: new script check_phpfpm_multi +* nginx: add access to server status on default VHost +* postfix: add smtpd_relay_restrictions in configuration + +### Changed + +* apache: rotate logs daily instead of weekly +* apache: deny requests to ^/evolinux_fpm_status-.* +* certbot: use a fixed 1.9.0 version of the certbot-auto script (renamed "letsencrypt-auto") +* certbot: use the legacy script on Debian 8 and 9 +* elasticsearch: log rotation is more readable/maintainable +* evoacme: upstream release 21.01 +* evolinux-users: Add sudo rights for nagios for multi-php lxc +* listupgrade: update script from upstream +* minifirewall: change some defaults +* nagios-nrpe: update check_phpfpm_status.pl & install perl dependencies +* redis: use /run instead or /var/run +* redis: escape password in Munin configuration + +### Fixed + +* bind9: added log files to apparmor definition so bind can run +* filebeat: fix Ansible syntax error +* nagios-nrpe: libfcgi-client-perl is not available before Debian 10 +* redis: socket/pid directories have the correct permissions + +### Removed + +* nginx: no more "minimal" mode, but the package remains customizable. + +## [10.4.0] 2020-12-24 + +### Added + +* certbot: detect domains if missing +* certbot: new "sync_remote.sh" hook to sync certificates and execute hooks on remote servers +* varnish: variable for jail configuration + +### Changed + +* certbot: disable auth for Let's Encrypt challenge +* nginx: change from "nginx_status-XXX" to "server-status-XXX" + +## [10.3.0] 2020-12-21 + +### Added + +* bookworm-detect: transitional role to help dealing with unreleased bookworm version +* dovecot: Update munin plugin & configure it +* dovecot: vmail uid/gid are configurable +* evoacme: variable to disable Debian version check (default: False) +* kvm-host: Add drbd role dependency (toggleable with kvm_install_drbd) +* minifirewall: upstream release 20.12 +* minifirewall: add variables to force upgrade the script and the config (default: False) +* mysql: install save_mysql_processlist script +* nextcloud: New role to setup a nextcloud instance +* redis: variable to force use of port 6379 in instances mode +* redis: check maxmemory in NRPE check +* lxc-php: Allow php containers to contact local MySQL with localhost +* varnish: config file name is configurable + +### Changed + +* Create system users for vmail (dovecot) and evoadmin +* apt: disable APT Periodic +* evoacme: upstream release 20.12 +* evocheck: upstream release 20.12 +* evolinux-users: improve uid/login checks +* tomcat-instance: fail if uid already exists +* varnish: change template name for better readability +* varnish: no threadpool delay by default +* varnish: no custom reload script for Debian 10 and later + +### Fixed + +* cerbot: parse HAProxy config file only if HAProxy is found + +## [10.2.0] 2020-09-17 + +### Added + +* evoacme: remount /usr if necessary +* evolinux-base: swappiness is customizable +* evolinux-base: install wget +* tomcat: root directory owner/group are configurable + +### Changed + +* Change default public SSH/SFTP port from 2222 to 22222 + +### Fixed + +* certbot: an empty change shouldn't raise an exception +* certbot: fix "no-self-upgrade" option + +### Removed + +* evoacme: remove Debian 9 support + +## [10.1.0] 2020-08-21 + +### Added + +* certbot: detect HAProxy cert directory +* filebeat: allow using a template +* generate-ldif: add NVMe disk support +* haproxy: add deny_ips file to reject connections +* haproxy: add some comments to default config +* haproxy: enable stats frontend with access lists +* haproxy: preconfigure SSL with defaults +* lxc-php: Don't disable putenv() by default in PHP settings +* lxc-php: Install php-sqlite by default +* metricbeat: allow using a template +* mysql: activate binary logs by specifying log_bin path +* mysql: option to define as read only +* mysql: specify a custom server_id +* nagios-nrpe/evolinux-base: brand new check for hardware raid on HP servers gen 10 +* nginx: make default vhost configurable +* packweb-apache: Install zip & unzip by default +* php: Don't disable putenv() by default in PHP settings +* php: Install php-sqlite by default + +### Changed + +* certbot: fix haproxy hook (ssl cert directory detection) +* certbot: install certbot dependencies non-interactively for jessie +* elasticsearch: configure cluster with seed hosts and initial masters +* elasticsearch: set tmpdir before datadir +* evoacme: read values from environment before defaults file +* evoacme: update for new certbot role +* evoacme: upstream release 20.08 +* haproxy: adapt backports installed package list to distibution +* haproxy: chroot and socket path are configurable +* haproxy: deport SSL tuning to Mozilla SSL generator +* haproxy: rotate logs with date extension and immediate compression +* haproxy: split stats variables +* lxc-php: Do --no-install-recommends for ssmtp/opensmtpd +* mongodb: install custom munin plugins +* nginx: read server-status values before changing the config +* packweb-apache: Don't turn on mod-evasive emails by default +* redis: create sudoers file if missing +* redis: new syntax for match filter +* redis: raise an error is port 6379 is used in "instance" mode + +### Fixed + +* certbot: restore compatibility with old Nginx +* evobackup-client: fixed the ssh connection test +* generate-ldif: better detection of computerOS field +* generate-ldif: skip some odd ethernet devices +* lxc-php: Install opensmtpd as intended +* mongodb: fix logrotate patterm on Debian buster +* nagios-nrpe: check_amavis: updated regex +* squid: better regex to match sa-update domains +* varnish: fix start command when multiple addresses are present + +## [10.0.0] - 2020-05-13 + +### Added +* apache: the default VHost doesn't redirect to https for ".well-known" paths +* apt: added buster backports prerferences +* apt: check if cron is installed before adding a cron job +* apt: remove jessie/buster sources from Gandi servers +* apt: verify that /etc/evolinux is present +* certbot : new role to install and configure certbot +* etc-git: add versioning for /usr/share/scripts on Debian 10+ +* evoacme: upstream version 19.11 +* evolinux-base: default value for "evolinux_ssh_group" +* evolinux-base: install /sbin/deny +* evolinux-base: install Evocheck (default: `True`) +* evolinux-base: on debian 10 and later, add noexec on /dev/shm +* evolinux-base: on debian 10 and later, add /usr/share/scripts in root's PATH +* evolinux-base: remove the chrony package +* evomaintenance: don't configure firewall for database if not necessary +* generate-ldif: support MariaDB 10.3 +* haproxy: add a variable to keep the existing configuration +* java: add Java 11 as possible version to install +* listupgrade: install old-kernel-autoremoval script +* minifirewall: add a variable to force the check scripts update +* mongodb: mongodb: compatibility with Debian 10 +* mysql-oracle: backport tasks from mysql role +* networkd-to-ifconfig: add variables for configuration by variables +* packweb-apache: Deploy opcache.php to give some insights on PHP's opcache status +* php: variable to install the mysqlnd module instead of the default mysql module +* postgresql : variable to install PostGIS (default: `False`) +* redis: rewrite of the role (separate instances, better systemd units…) +* webapps/evoadmin-web Add an htpasswd to evoadmin if you cant use an apache IP whitelist +* webapps/evoadmin-web Overload templates if needed +* evolinux-base: install ssacli for HP Smart Array +* evobackup-client role to configure a machine for backups with bkctld(8) +* bind: enable query logging for recursive resolvers +* bind: enable logrotate for recursive resolvers +* bind: enable bind9 munin plugin for recursive resolvers + +### Changed +* replace version_compare() with version()s +* removed some deprecations for Ansible 2.7 +* apache: improve permissions in save_apache_status script +* apt: hold packages only if package is installed +* bind: the munin task was present, but not included +* bind: change name of logrotate file to bind9 +* certbot: commit hook must be executed at the end +* elasticsearch: listen on local interface only by default +* evocheck: upstream version 20.04.4 +* evocheck: cron jobs execute in verbose +* evolinux-base: use "evolinux_internal_group" for SSH authentication +* evolinux-base: Don't customize the logcheck recipient by default. +* evolinux-base: configure cciss-vol-statusd in the proper file +* evomaintenance: upstream release 0.6.3 +* evomaintenance: Turn on API by default (instead of DB) +* evomaintenance: install PG dependencies only when needed +* listupgrade: update from upstream +* lxc: rely on lxc_container module instead of command module +* lxc: remove useless loop in apt execution +* lxc: update our default template to be compatible with Debian 10 +* lxc-php: refactor tasks for better maintainability +* lxc-php: Use OpenSMTPD for Stretch/Buster containers, and ssmtp for Jessie containers +* lxc-solr: changed default Solr version to 8.4.1 +* minifirewall: better alert5 activation +* minifirewall: no http filtering by default +* minifirewall: /bin/true command doesn't report "changed" anymore +* nagios-nrpe: update check_redis_instances (same as redis role) +* nagios-nrpe: change default haproxy socket path +* nagios-nrpe: check_mode per cpu dynamically +* nodejs: change default version to 12 (new LTS) +* packweb-apache: Do the install & conffigure phpContainer script (instead of evoadmin-web role) +* php: By default, allow 128M for OpCache (instead of 64M) +* php: Don't set a chroot for the default fpm pool +* php: Make sure the default pool we define can be fully functionnal witout debian's default pool file +* php: Change the default pool names to something more explicit (and same for the variables names) +* php: Add a task to remove Debian's default FPM pool file (off by default) +* php: Cleanup CLI Settings. Also, allow url fopen and don't disable functions (in CLI only) +* postgresql : changed logrotate config to 10 days (and fixed permissions) +* rbenv: changed default Ruby version to 2.7.0 +* squid: Remove wait time when we turn off squid +* squid: compatibility wit Debian 10 +* tomcat: package version derived from Debian version if missing +* varnish: remove custom ExecReload= script for Debian 10+ + +### Fixed +* etc-git: fix warnings ansible-lint +* evoadmin-web: Put the php config at the right place for Buster +* lxc: Don't stop the container if it already exists +* lxc: Fix container existance check to be able to run in check_mode +* lxc-php: Don't remove the default pool +* minifirewall: fix warnings ansible-lint +* nginx: fix munin fcgi not working (missing chmod 660 on logs) +* php: add missing handler for php7.3-fpm +* roundcube: fix typo for roundcube vhost +* tomcat: fix typo for default tomcat_version +* evolinux-base: Fix our zsyslog rotate config that doesn't work on Debian 10 +* certbot: Properly evaluate when apache is installed +* evolinux-base: Don't make alert5.service executable as systemd will complain +* webapps/evoadmin-web: Set default evoadmin_mail_tpl_force to True to fix a regression where the mail template would not get updated because the file is created before the role is first run. +* minifirewall: Backport changes from minifirewall (properly open outgoing smtp(s)) +* minifirewall: Properly detect alert5.sh to turn on firewall at boot +* packweb-apache: Add missing dependency to evoacme role +* php: Chose the debian version repo archive for packages.sury.org +* php: update surry_post.yml to match current latest PHP release +* packweb-apache: Don't try to install PHPMyAdmin on Buster as it's not available + +### Removed +* clamav : do not install the zoo package anymore + +## [9.10.1] - 2019-06-21 + +### Changed +* evocheck : update (version 19.06) from upstream + +## [9.10.0] - 2019-06-21 + +### Added +* apache: add server status suffix in VHost (and default site) if missing +* apache: add a variable to customize the server-status host +* apt: add a script to manage packages with "hold" mark +* etc-git: gitignore /etc/letsencrypt/.certbot.lock +* evolinux-base: install "spectre-meltdown-checker" (Debian 10 and later) +* evomaintenance: make hooks configurable +* nginx: add server status suffix in VHost (and default site) if missing +* redmine: enable gzip compression in nginx vhost + +### Changed +* evocheck : update (unreleased) from upstream +* evomaintenance : use the web API instead of PG Insert +* fluentd: store gpg key locally +* rbenv: update defaults rbenv version to 1.1.2 and ruby version to 2.6.3 +* redmine: update default version to 4.0.3 +* nagios-nrpe: change required status code for http and https check +* redmine: use custom errors-pages in Nginx vhost +* nagios-nrpe: check_load is now based on ansible_processor_vcpus +* php: Stop enforcing /var/www/html as chroot while we use /var/www +* apt: Add Debian Buster repositories + +### Fixed +* rbenv: add check_mode for check rbenv and ruby versions +* nagios-nrpe: fix redis_instances check when Redis port equal 0 +* redmine: fix 500 error on logging +* evolinux-base: Validate sshd config with "-t" instead of "-T" +* evolinux-base: Ensure rename is present +* evolinux-users: Validate sshd config with "-t" instead of "-T" +* nagios-nrpe: Replace the dummy packages nagios-plugins-* with monitoring-plugins-* + +## [9.9.0] - 2019-04-16 + +### Added +* etc-git: ignore evobackup/.keep-* files +* lxc: /home is mounted in the container by default +* nginx : add "x-frame-options: sameorigin" for Munin + +### Changed +* changed remote repository to https://gitea.evolix.org/evolix/ansible-roles +* apt: Ensure jessie-backport from archives.debian.org is accepted +* apt: Remove jessie-update suite as it's no longer exists +* apt: Replace mirror.evolix.org by archives.debian.org for jessie-backport +* evocheck : update script from upstream +* evolinux-base: remove apt-listchanges on Stretch and later +* evomaintenance: embed version 0.5.0 +* opendkim: aligning roles with our conventions, major changes in opendkim-add.sh +* redis: higher limit of open files +* redis: set variables on inclusion, not with set_facts +* tomcat: better tomcat version management +* webapps/evoadmin-web: add dbadmin.sh to sudoers file + + +### Fixed +* spamassasin: fix sa-update.sh and ensure service is started and enabled +* tomcat-instance: deploy correct version of config files +* tomcat-instance: deploy correct version of server.xml + +## [9.8.0] - 2019-01-31 + +### Added +* filebeat: disable cloud_metadata processor by default +* metricbeat: disable cloud_metadata processor by default +* percona : new role to install Percona repositories and tools +* redis: add variable for configure unixsocketperm + +### Changed +* redmine: refactoring of redmine role with use of rbenv + +### Fixed +* ntpd: Update the restrictions to follow wiki.evolix.org/HowtoNTP client config + +## [9.7.0] - 2019-01-17 + +### Added +* apache: add Munin configuration for Apache server-status URL +* evomaintenance: database variables must be set or the task fails +* fail2ban: add "ips" tag added to fail2ban/tasks/ip_whitelist.yml +* metricbeat: add a variable for the protocol to use with Elasticsearch +* rbenv: add pkg-config to the list of packages to install +* redis: Configure munin when working in instance mode +* redis: add a variable for renamed/disabled commands +* redis: add a variable to disable the restart handler +* redis: add a variable to force a restart (even with no change) +* proftpd: add FTPS and SFTP support + +### Changed +* redis: distinction between main and master password +* evocheck: update evocheck.sh for source install +* php: added php-zip in the installed package list for debian 9 (and later) +* squid: added packagist.org in the whitelist +* java: update Oracle java package to 8u192 + +### Fixed +* fail2ban: fix "ignoreip" update +* metricbeat: fix username/password replacement +* nagios-nrpe: check_process now return the error code (making the check more usefull than /bin/true) +* nginx: Munin url config is now a template to insert the server-status prefix +* nodejs: Update yarn repo GPG key (current key expired) +* redis: In instance mode, ensure to replace the nrpe check_redis with the instance check script +* redis: Don't set the owner of /var/{lib,log}/redis to a redis instance account + + +## [9.6.0] - 2018-12-04 + +### Added +* evolinux-base: deploy custom motd if template are present +* minifirewall: all variables are configurable (untouched by default) +* minifirewall: main file is configurable +* squid: minifirewall main file is configurable + +### Changed +* minifirewall: compare config before/after (for restart condition) +* squid: better replacement in minifirewall config +* evoadmin-mail: complete refactoring, use Debian Package + +## [9.5.0] - 2018-11-14 + +### Added +* apache: separate task to update IP whitelist +* evolinux-base: install man package +* evolinux-users: add newaliases handler +* evomaintenance: FROM domain is configurable +* fail2ban: separate task to update IP whitelist +* nginx: add tag for ips management +* nginx: separate task to update IP whitelist +* postfix: enable SSL/TLS client +* ssl: add an SSL role for certificates deployment +* haproxy: add vars for tls configuration +* mysql: logdir can be customized + +### Changed +* evocheck: update script from upstream +* evomaintenance: update script from upstream +* mysql: restart service if systemd unit has been patched + +### Fixed +* packweb-apache: mod-security config is already included elsewhere +* redis: for permissions on log and lib directories +* redis: fix shell for instance users +* evoacme: fix error handling in sed_cert_path_for_(apache|nginx) + +## [9.4.2] - 2018-10-12 + +### Added +* evomaintenance: install dependencies manually when installing vendored version +* nagios-nrpe: add an option to ignore servers in NOLB status + +### Changed +* haproxy: move check_haproxy_stats to nagios-nrpe role + +### Fixed +* evoacme: better error when apache2ctl fails +* evomaintenance: fix role compatibility with OpenBSD +* spamassassin: add missing right for amavis +* amavis: fix output result checking + +## [9.4.1] - 2018-09-28 + +### Added +* redis: set masterauth when redis_password is defined +* evomaintenance: variable to install a vendored version +* evomaintenance: tasks/variables to handle minifirewall restarts + +### Changed +* mysql-oracle: better handle packages and users + +## [9.4.0] - 2018-09-20 + +### Added +* etc-git: manage a cron job to monitor uncommited changes in /etc/.git (default: `True`) +* evolinux-base: better shell history +* evolinux-users: add user to /etc/aliases +* generate-ldif: add a section for postgresql +* logstash: tmp directory can be customized +* logstash: max memory is set to 512M by default +* logstash: version 6.x is installed by default +* mysql: add a variable to prevent mysql from restarting +* networkd-to-ifconfig: add a role to switch from networkd to ifconfig +* webapps/evoadmin-web: add users to /etc/aliases +* redis: add support for multi instances +* nagios-nrpe: add check_redis_instances + +### Changed +* dovecot: stronger TLS configuration + +### Fixed +* apache: cleaner way to overwrite the server status suffix +* packweb-apache: don't regenerate phpMyAdmin suffix each time +* nginx: cleaner way to overwrite the server status suffix +* redis: add missing tags + +## [9.3.2] - 2018-09-06 + +### Added +* minifirewall: add a variable to disable the restart handler +* minifirewall: add a variable to force a restart of the firewall (even with no change) +* minifirewall: improve variables values and documentation + +### Changed +* dovecot: enable SSL/TLS by default with snakeoil certificate + +### Fixed + +### Security + +## [9.3.1] - 2018-08-30 + +### Added +* metricbeat: new variables to configure elasticsearch hosts and auth + +## [9.3.0] - 2018-08-24 + +### Added +* elasticsearch: tmpdir configuration compatible with 5.x also +* elasticsearch: add http.publish_host variable +* evoacme: disable old certbot cron also in cron.daily +* evocheck: detect installed packages even if "held" by APT (manual fix) +* evocheck: the crontab is updated by the role (default: `True`) +* evolinux-base: add mail related aliases +* evolinux-todo: new role, to help maintain a file of todo tasks +* fail2ban: add a variable to disable the ssh filter (default: `False`) +* etc-git: install a script to optimize the repository each month +* fail2ban: add a variable to update the list of ignored IP addresses/blocs (default: `False`) +* generate-ldif: detect installed packages even if "held" by APT +* java: support for Oracle JRE +* kibana: log messages go to /var/log/kibana/kibana.log +* metricbeat: add a role (copied from filebeat) +* munin: properly rename Munin cache directory +* mysql: add an option to install the client development libraries (default: `False`) +* mysql: add a few variables to customize the configuration +* nagios-nrpe: add check_postgrey + +### Changed +* etc-git: some entries of .gitignore are mandatory +* evocheck: update upstream script +* evolinux-base: improve hostname configuration (real vs. internal) +* evolinux-base: use the "evolinux-todo" role +* evolinux-users: add sudo permission for bkctld check +* java8: renamed to java (java8 symlinked to java for backward compatibility) +* minifirewall: the tail file can be overwritten, or not (default: `True`) +* nagios-nrpe: use bkctld internal check instead of nrpe plugin +* php: reorganization of the role for Sury overrides and more clear configuration +* redmine: use .my.cnf for mysql password +* rbenv: change default Ruby version (2.5.1) +* rbenv: switch from copy to lineinfile for default gems +* remount-usr: mount doesn't report a change +* squid: add a few news sites to the whitelist +* tomcat: better nrpe check output +* kvm-host: install kvm-tools package instead of copying add-vm.sh + +### Fixed +* apache: logrotate replacement is more subtle/precise. It replaces only the proper directive and not every occurence of the word. +* bind: chroot-bind.sh must not be executed in check mode +* evoacme: fix module detection in apache config +* fail2ban: fix fail2ban_ignore_ips definition +* mysql-oracle: fix configuration directory variable +* php: fpm slowlog needs an absolute path +* roundcube: add missing slash to https redirection + +## [9.2.0] - 2018-05-16 + +### Changed +* filebeat: install version 6.x by default +* filebeat: cleanup unused code +* squid: add some domaine and fix broken restrictions +* elasticsearch: defaults to version 6.x + +### Fixed +* evolinux-users: secondary groups are comma-separated +* ntpd: fix configuration (server and ACL) +* varnish: don't fork the process on startup with systemd + +## [9.1.9] - 2018-04-24 + +### Added + +### Changed +* apache: customize logrotate (52 weeks) +* evolinux: groups for SSH configuration are used with Debian 10 and later +* evolinux-base: fail2ban is not enabled by default +* evolinux-users: refactoring of the SSH configuration +* mysql-oracle: copy evolinux config files in mysql.cond.d +* mysql/mysql-oracle: mysqltuner cron scripts is 0755 +* generate-ldif: add a minifirewall service when /etc/default/minifirewall exists + +## [9.1.8] - 2018-04-16 + +### Changed +* packweb-apache: use dependencies instead of include_role for apache and php roles + +### Fixed +* mysql: use check_mode for apg command (Fix --check) +* mysql/mysql-oracle: properly reload systemd +* packweb-apache: use check_mode for apg command (Fix --check) + +## [9.1.7] - 2018-04-06 + +### Added +* added a few become attributes where missing +* etc-git: add tags for Ansible +* evolinux-base: install ncurses-term package +* haproxy: install Munin plugins +* listupgrade: add service restart notification for Squid and libstdc++6 +* minifirewall: add "check_minifirewall" Nagios plugin (and `minifirewall_status` script) +* mysql-oracle: new role to install MySQL 5.7 with Oracle packages +* mysql: remount /usr before creating scripts directory +* nagios-nrpe: add "check_open_files" plugin +* nagios-nrpe: mark plugins as executable +* nodejs: Yarn package manager can be installed (default: `false`) +* packweb-apache: choose mysql variant (default: `debian`) +* postfix: add lines in /etc/.gitignore +* proftpd: use "proftpd_accounts" list to manage ftp accounts +* redmine: added missing tags + +### Changed +* elasticsearch: RESTART_ON_UPGRADE is configurable (default: `true`) +* elasticsearch: use ES_TMPDIR variable for custom tmpdir, (from `/etc/default/elasticsearch` instead of changing `/etc/elesticsearch/jvm.options`). +* evolinux-base: Exec the firewall tasks sooner (to avoid dependency issues) +* evolinux-users: split AllowGroups/AllowUsers modes for SSH directives +* mongodb: allow unauthenticated packages for Jessie +* mongodb: configuration is forced by default but it's configurable (default: `false`) +* mongodb: rename logrotate script +* nagios-nrpe: mark plugins as executable +* nginx: don't debug variables in verbosity 0 +* nginx: package name can be specified (default: `nginx-full`) +* php: fix FPM custom file permissions +* php: more tasks notify FPM handler to restart if needed +* webapps/evoadmin-web: Fail if variable evoadmin_contact_email isn't defined + +### Fixed +* dovecot: fix support of plus sign +* mysql/mysql-oracle: mysqltuner cron task is executable +* nginx: fix basic auth for default vhost +* rbenv: fix become user issue with copy tasks + +## [9.1.6] - 2018-02-02 + +### Added +* mongodb: install python-pymongo for monitoring +* nagios-nrpe: allowed_hosts can be updated + +### Changed +* Changelog: explain the versioning scheme +* Changelog: add a release date for 9.1.5 +* evoacme: exclude typical certbot directories + +### Fixed +* fail2ban: fix horrible typo, Python is not Ruby +* nginx: fix servers status dirname + +## [9.1.5] - 2018-01-18 + +### Added +* There is a changelog! +* redis: configuration variable for protected mode (v3.2+) +* evolinux-users: users are in "adm" group for Debian 9 or later +* evolinx-base: purge locate/mlocate packages +* evolinx-base: create /etc/evolinux if missing +* many Ansible tags for easier fine grained execution of playbooks +* apache/nginx: server status suffix management +* unbound: retrieve list of root DNS servers +* redmine: ability to install themes and plugins + +### Changed +* rbenv: Ruby 2.5 becomes the default version +* evocheck: update upstream version embedded in role (c993244) +* bind: keep 52 weeks of logs + +### Fixed +* squid: different logrotate file for Jessie or Stretch+ +* evoacme: don't invoke evoacme if no vhost is found +* evomaintenance: explicit quotes in config file +* redmine: force xpath gem < 3.0.0 + +### Security +* evomaintenance: fix permissions for config file + +## [9.1.4] - 2017-12-20 + +### Added +* php: install php5-intl (for Jessie) and php-intl (for Debian 9 or later) +* mysql: add a check_mysql_slave in nrpe configuration +* ldap: slapd tcp port is configurable +* elasticsearch: broader patterns for log rotation + +### Changed +* split IP lists in 2 – default and additional – for easier customization. + +### Fixed +* minifirewall: allow outgoing SSH connections over IPv6 +* nodejs: rename source.list file + +### Security +* evoadmin-web: change config.local.php file permissions +* evolinux-base: change default_www file permissions + +## [9.1.3] 2017-12-08 + +### Added +* evolinux-base: install traceroute package +* evolinux-base/ntpd: purge openntpd +* tomcat: add Tomcat 8 cmpatibility +* log2mail: add "The total blob data length" pattern for MySQL +* nagios-nrpe: add bkctld check in evolix.cfg +* varnish: reload or restart if needed +* rabbitmq: add a munin plugin and an NRPE check +* minifirewall: add debug for variables +* elastic: option for stack main version + +### Changed +* nginx: rename Let's Encrypt snippet +* nginx: simpler apt preferences for backports +* generate-ldif: add clamd service instead of clamav_db +* mysql: parameterize evolinux config files +* rbenv: use Rbenv 1.1.1 and Ruby 2.4.2 by default +* elasticsearch: update curator debian repository +* evoacme: crontab management +* evoacme: better documentation +* mongodb: comatible with Stretch + +### Removed +* mongodb: logfile/pidfile are not configurable on Jessie +* minifirewall: remove zidane.evolix.net from HTTPSITES + +### Fixed +* nginx: fix munin CGI graphs +* ntpd: fix default configuration (localhost only) +* logstash: fix permissions on pipeline configuration +* postfix/spamassassin: add user in cron job +* php: php.ini custom file are now readable +* hostname customization needs the dbus package + +## [9.1.2] 2017-12-05 + +### Fixed +* listupgrade: remount /usr as rw + +## [9.1.1] 2017-11-21 + +### Added +* amazon-ec2: add egress rules + +### Fixed +* evoacme: fix multiple bugs + +## [9.1.0] 2017-11-19 + +_Warning: huge release, many entries are missing below._ + +### Added +* amazon-ec2: new role, for EC2 instances creation +* Move /usr rw remount into remount-usr role +* kibana: host and basepath configuration +* kibana: move optimize and data to /var +* logstash: daily job for log rotation +* elasticsearch: daily job for log rotation +* roundcube: add link in default site index +* nagios-nrpe: add opendkim check + +### Changed +* Combine evolix and additional trusted IP addresses +* amazon-ec2: split tasks +* apt: don't upgrade by default +* postfix: extract main.cf md5sum into variables +* evolinux-base: cache hwraid pgp key locally +* evoacme: improve cron task +* elasticsearch: use elastic.list APT source list for curator +* ldap: better variables + +### Fixed +* fail2ban: create config hierarchy beforehand +* elasticsearch: fix datadir/tmpdir conditions +* elastic: remove double ".list" suffix +* nagios-nrpe: fix check_free_mem for OpenBSD 6.2 +* nagios-nrpe: fix check_amavis + +### Removed + +### Security + + +## [9.0.1] 2017-10-02 + +### Added +* haproxy: add a Nagios check +* php: add "sury" mode for PHP 7.1 on Stretch +* minifirewall: explicit dependency on iptables +* apt: remove Gandi source files +* docker-host: new variable for docker home + +### Changed +* php: install php5/php package after fpm/libapache2-mod-php + +### Fixed +* mysql: add "REPLICATION CLIENT" privilege for nrpe +* evoadmin-web: revert from variables to keywords in the templates +* evoacme: many fixes +* etc-git: detect user if root (without su or sudo) +* docker-host: clean override of docker systemd unit +* varnish: fix systemd unit override + +## [9.0.0] 2017-09-19 + +First official release diff --git a/userlogrotate/files/userlogpurge b/userlogrotate/files/userlogpurge new file mode 100644 index 00000000..93efb080 --- /dev/null +++ b/userlogrotate/files/userlogpurge @@ -0,0 +1,6 @@ +#!/usr/bin/bash +# Purge des logs utilisateurs +# Ne pas activer sans l'accord du client. + +find /home/*/log/ -type f -mtime +365 -delete + diff --git a/userlogrotate/tasks/main.yml b/userlogrotate/tasks/main.yml index 4f9c5fc7..a82ce2d9 100644 --- a/userlogrotate/tasks/main.yml +++ b/userlogrotate/tasks/main.yml @@ -6,6 +6,13 @@ register: find_logrotate check_mode: no +- name: "Is userlogpurge active ?" + ansible.builtin.find: + paths: ["/etc/cron.weekly", "/etc/cron.daily"] + patterns: ["userlogpurge"] + register: find_logpurge + check_mode: no + - name: "Update userlogrotate" ansible.builtin.copy: src: userlogrotate @@ -14,6 +21,14 @@ loop: "{{ find_logrotate.files }}" when: find_logrotate.files | length>0 +- name: "Update userlogpurge" + ansible.builtin.copy: + src: userlogpurge + dest: "{{ item.path }}" + mode: "0755" + loop: "{{ find_logpurge.files }}" + when: find_logpurge.files | length>0 + - name: "Install userlogrotate (jessie)" ansible.builtin.copy: src: userlogrotate_jessie @@ -32,3 +47,11 @@ - ansible_distribution_major_version is version('9', '>=') - find_logrotate.files | length==0 +- name: "Install userlogpurge" + ansible.builtin.copy: + src: userlogpurge + dest: /etc/cron.weekly/userlogpurge.disabled + mode: "0755" + when: + - find_logpurge.files | length==0 + From fa35cb6d8fe69e049050209abf30c27628294d09 Mon Sep 17 00:00:00 2001 From: David Prevot Date: Mon, 10 Jul 2023 15:27:27 +0200 Subject: [PATCH 055/182] Use --force-yes for lxc-php so it can run on Jessie --- lxc-php/tasks/mail_ssmtp.yml | 2 +- lxc-php/tasks/php56.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lxc-php/tasks/mail_ssmtp.yml b/lxc-php/tasks/mail_ssmtp.yml index b57d5d77..07b54118 100644 --- a/lxc-php/tasks/mail_ssmtp.yml +++ b/lxc-php/tasks/mail_ssmtp.yml @@ -3,7 +3,7 @@ - name: "{{ lxc_php_version }} - Install ssmtp" community.general.lxc_container: name: "{{ lxc_php_version }}" - container_command: "DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y ssmtp " + container_command: "DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends --yes --force-yes ssmtp " - name: "{{ lxc_php_version }} - Configure ssmtp" ansible.builtin.template: diff --git a/lxc-php/tasks/php56.yml b/lxc-php/tasks/php56.yml index d210d80b..b299652e 100644 --- a/lxc-php/tasks/php56.yml +++ b/lxc-php/tasks/php56.yml @@ -3,7 +3,7 @@ - name: "{{ lxc_php_version }} - Install PHP packages" community.general.lxc_container: name: "{{ lxc_php_version }}" - container_command: "DEBIAN_FRONTEND=noninteractive apt install -y php5-fpm php5-cli php5-gd php5-imap php5-ldap php5-mcrypt php5-mysql php5-pgsql php5-sqlite php-gettext php5-intl php5-curl php5-ssh2 libphp-phpmailer" + container_command: "DEBIAN_FRONTEND=noninteractive apt install --yes --force-yes php5-fpm php5-cli php5-gd php5-imap php5-ldap php5-mcrypt php5-mysql php5-pgsql php5-sqlite php-gettext php5-intl php5-curl php5-ssh2 libphp-phpmailer" - name: "{{ lxc_php_version }} - Copy evolinux PHP configuration" ansible.builtin.template: From f50848917a79840584a10bc00f6c046fca5040ee Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Mon, 10 Jul 2023 16:41:12 +0200 Subject: [PATCH 056/182] fail2ban: Fix cron fail2ban_dbpurge (should be bash instead of sh) --- CHANGELOG.md | 1 + fail2ban/templates/fail2ban_dbpurge.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 143d8a65..f45bd313 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Fixed * elasticsearch: comment the Xlog:gc line instead of changing it completely +* fail2ban: Fix cron fail2ban_dbpurge (should be bash instead of sh) * nagios-nrpe: remount /usr **after** installing the packages * packweb-apache,nagios-nrpe: add missing task and config for PHP 8.2 container * potsfix: add missing `localhost.$mydomain` to mydestination diff --git a/fail2ban/templates/fail2ban_dbpurge.j2 b/fail2ban/templates/fail2ban_dbpurge.j2 index 44c20f4c..26c80f32 100644 --- a/fail2ban/templates/fail2ban_dbpurge.j2 +++ b/fail2ban/templates/fail2ban_dbpurge.j2 @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Juin - Decembre 2022 : #64088 # Purge pour Stretch et Buster From 83f7b6cdca2bd1f421b6bf9a12e3b65c5edbc11a Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 11 Jul 2023 11:13:28 +0200 Subject: [PATCH 057/182] evolinux: Install HPE Agentless Management Service (amsd) --- CHANGELOG.md | 11 ++++++----- evolinux-base/tasks/hardware.hp.yml | 6 ++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f45bd313..e89d515b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,13 +13,14 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Added -* userlogrotate: rotate also php.log. +* docker-host: added var for user namespace setting +* dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) +* dovecot: fix old_stats plugin for Dovecot 2.3. +* evolinux: Install HPE Agentless Management Service (amsd) +* fail2ban: add default variable fail2ban_dbpurgeage_default * nagios-nrpe: add a NRPE check-local command with completion. * policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory -* docker-host: added var for user namespace setting -* dovecot: fix old_stats plugin for Dovecot 2.3. -* dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) -* fail2ban: add default variable fail2ban_dbpurgeage_default +* userlogrotate: rotate also php.log. ### Changed diff --git a/evolinux-base/tasks/hardware.hp.yml b/evolinux-base/tasks/hardware.hp.yml index a22eeb70..62f6e0a0 100644 --- a/evolinux-base/tasks/hardware.hp.yml +++ b/evolinux-base/tasks/hardware.hp.yml @@ -35,6 +35,12 @@ tags: - packages +- name: Install HPE Agentless Management Service (amsd) + ansible.builtin.apt: + name: amsd + tags: + - packages + # NOTE: check_hpraid cron use check_hpraid from nagios-nrpe role # So, if nagios-nrpe role is not installed it will not work - name: Install and configure check_hpraid cron (HP gen >=10) From 4476c4b63338d0d39c4a5868600785a2552cb23e Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Wed, 12 Jul 2023 09:40:19 +0200 Subject: [PATCH 058/182] =?UTF-8?q?etc-git:=20include=20=E2=86=92=20import?= =?UTF-8?q?=5Ftasks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etc-git/tasks/main.yml | 4 ++-- etc-git/tasks/repositories.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc-git/tasks/main.yml b/etc-git/tasks/main.yml index bae705d3..ef136bdf 100644 --- a/etc-git/tasks/main.yml +++ b/etc-git/tasks/main.yml @@ -10,12 +10,12 @@ - ansible_distribution == "Debian" - name: Install and configure utilities - ansible.builtin.include: utils.yml + ansible.builtin.import_tasks: utils.yml tags: - etc-git - name: Configure repositories - ansible.builtin.include: repositories.yml + ansible.builtin.import_tasks: repositories.yml tags: - etc-git when: etc_git_config_repositories | bool \ No newline at end of file diff --git a/etc-git/tasks/repositories.yml b/etc-git/tasks/repositories.yml index d9d64ad6..6c76d265 100644 --- a/etc-git/tasks/repositories.yml +++ b/etc-git/tasks/repositories.yml @@ -26,7 +26,7 @@ when: - _usr_share_scripts.stat.isdir -- ansible.builtin.include: repository.yml +- ansible.builtin.import_tasks: repository.yml vars: repository_path: "/usr/share/scripts" gitignore_items: [] From 7133783695ff1a57d8e9777f271ad441d84d9777 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Mon, 17 Jul 2023 17:08:20 +0200 Subject: [PATCH 059/182] Update CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e89d515b..89e2af08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,11 @@ The **patch** part changes is incremented if multiple releases happen the same m * nagios-nrpe: add a NRPE check-local command with completion. * policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory * userlogrotate: rotate also php.log. +* docker-host: added var for user namespace setting +* dovecot: fix old_stats plugin for Dovecot 2.3. +* dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) +* fail2ban: add default variable fail2ban_dbpurgeage_default +* userlogrotate: add a userlogpurge script disabled by default ### Changed From 67f0fa594297de6879fdfcc0f9e17ec035c78f86 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Mon, 17 Jul 2023 17:18:55 +0200 Subject: [PATCH 060/182] evolinux-base: configure bashrc for all users --- CHANGELOG.md | 1 + evolinux-base/tasks/bash.yml | 14 ++++++++++++++ evolinux-base/tasks/main.yml | 3 +++ 3 files changed, 18 insertions(+) create mode 100644 evolinux-base/tasks/bash.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 89e2af08..d2db0d1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) * fail2ban: add default variable fail2ban_dbpurgeage_default * userlogrotate: add a userlogpurge script disabled by default +* evolinux-base: configure bashrc for all users ### Changed diff --git a/evolinux-base/tasks/bash.yml b/evolinux-base/tasks/bash.yml new file mode 100644 index 00000000..cca21c5f --- /dev/null +++ b/evolinux-base/tasks/bash.yml @@ -0,0 +1,14 @@ +--- + +- name: "Customize common bashrc" + ansible.builtin.lineinfile: + dest: /etc/bash.bashrc + line: "{{ item }}" + create: yes + state: present + loop: + - "export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoreboth,erasedups" + - "export HISTSIZE=65535" + - "export HISTTIMEFORMAT=\"%c : \"" + - "shopt -s histappend" + - "PROMPT_COMMAND=\"history -a;${PROMPT_COMMAND}\"" diff --git a/evolinux-base/tasks/main.yml b/evolinux-base/tasks/main.yml index fc9f5b87..582bcfe0 100644 --- a/evolinux-base/tasks/main.yml +++ b/evolinux-base/tasks/main.yml @@ -74,6 +74,9 @@ # name: evolix/evolinux-users # when: evolinux_users_include +- name: Bash configuration + ansible.builtin.import_tasks: bash.yml + - name: Root user configuration ansible.builtin.import_tasks: root.yml when: evolinux_root_include | bool From f2eaac0894c92385ed803a5dc03e239f3a1faf13 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Mon, 17 Jul 2023 17:31:21 +0200 Subject: [PATCH 061/182] nginx: set default server directive in default vhost --- CHANGELOG.md | 1 + nginx/templates/evolinux-default.conf.j2 | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2db0d1d..f7c32603 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * packweb-apache,nagios-nrpe: add missing task and config for PHP 8.2 container * potsfix: add missing `localhost.$mydomain` to mydestination * nagios-nrpe: check\_ssl\_local now has an output that nrpe can understand when it isn't OK +* nginx: set default server directive in default vhost ### Removed diff --git a/nginx/templates/evolinux-default.conf.j2 b/nginx/templates/evolinux-default.conf.j2 index a0ed95c3..97645827 100644 --- a/nginx/templates/evolinux-default.conf.j2 +++ b/nginx/templates/evolinux-default.conf.j2 @@ -1,12 +1,12 @@ server { - listen [::]:80; - listen 80; + listen [::]:80 default_server; + listen 80 default_server; server_name {{ ansible_fqdn }}; return 301 https://{{ ansible_fqdn }}$request_uri; } server { - listen 443 ssl; + listen 443 ssl default_server; # listen [::]:80 default_server ipv6only=on; ## listen for ipv6 ssl_certificate /etc/ssl/certs/{{ ansible_fqdn }}.crt; From 440a54c21cfb20758e1298d13e8a78d4e245f529 Mon Sep 17 00:00:00 2001 From: David Prevot Date: Thu, 20 Jul 2023 16:17:43 +0200 Subject: [PATCH 062/182] Allow script to work on old and not yet usr-merged systems --- apt/files/deb822-migration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apt/files/deb822-migration.py b/apt/files/deb822-migration.py index a8873923..ab4bd79c 100755 --- a/apt/files/deb822-migration.py +++ b/apt/files/deb822-migration.py @@ -1,4 +1,4 @@ -#!/bin/env python3 +#!/usr/bin/env python3 import re import sys @@ -149,4 +149,4 @@ def main(): if __name__ == "__main__": main() -sys.exit(0) \ No newline at end of file +sys.exit(0) From 030871ea9b6a3d3fb27b3f165bf447c650dba8ff Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Thu, 20 Jul 2023 16:33:11 +0200 Subject: [PATCH 063/182] opendkim: update apt cache before install --- CHANGELOG.md | 1 + opendkim/tasks/main.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7c32603..505c585e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * potsfix: add missing `localhost.$mydomain` to mydestination * nagios-nrpe: check\_ssl\_local now has an output that nrpe can understand when it isn't OK * nginx: set default server directive in default vhost +* opendkim: update apt cache before install ### Removed diff --git a/opendkim/tasks/main.yml b/opendkim/tasks/main.yml index a9c1bf49..02a7aaec 100644 --- a/opendkim/tasks/main.yml +++ b/opendkim/tasks/main.yml @@ -7,6 +7,7 @@ - ssl-cert - dns-root-data state: present + update_cache: yes tags: - opendkim From ef642e564e08cf00a14075390530e6a93789de0c Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 21 Jul 2023 16:19:26 +0200 Subject: [PATCH 064/182] bind: Add reload-zone helper --- CHANGELOG.md | 1 + bind/files/reload-zone | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100755 bind/files/reload-zone diff --git a/CHANGELOG.md b/CHANGELOG.md index 505c585e..3c935b68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * fail2ban: add default variable fail2ban_dbpurgeage_default * userlogrotate: add a userlogpurge script disabled by default * evolinux-base: configure bashrc for all users +* bind: Add reload-zone helper ### Changed diff --git a/bind/files/reload-zone b/bind/files/reload-zone new file mode 100755 index 00000000..47514907 --- /dev/null +++ b/bind/files/reload-zone @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Script utilitaire pour tester et recharger facilement un domaine dans Bind +# Usage : reload-zone +# +# TODO: +# - vérifier le serial +# - prendre en charge plusieurs +# - ajouter le script dans le role bind + +named-checkzone "$1" /etc/bind/db."$1" && rndc reload "$1" + From 1a1d4265a7cf1745bb5da1409daf9a393885e8a4 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 21 Jul 2023 16:33:15 +0200 Subject: [PATCH 065/182] dovecot: set Munin config in dedicated file --- dovecot/files/z-evolinux-dovecot.conf | 6 ++++++ dovecot/tasks/munin.yml | 22 ++++------------------ 2 files changed, 10 insertions(+), 18 deletions(-) create mode 100644 dovecot/files/z-evolinux-dovecot.conf diff --git a/dovecot/files/z-evolinux-dovecot.conf b/dovecot/files/z-evolinux-dovecot.conf new file mode 100644 index 00000000..58052ee1 --- /dev/null +++ b/dovecot/files/z-evolinux-dovecot.conf @@ -0,0 +1,6 @@ +[dovecot1] +user root + +[dovecot_stats_*] +user root + diff --git a/dovecot/tasks/munin.yml b/dovecot/tasks/munin.yml index d223f1e0..7227e991 100644 --- a/dovecot/tasks/munin.yml +++ b/dovecot/tasks/munin.yml @@ -44,25 +44,11 @@ mode: "0755" tags: dovecot_stats_ - - name: Sections dovecot1 and dovecot_stats_ are in /etc/munin/plugin-conf.d/zzz-evolinux - ansible.builtin.lineinfile: - path: /etc/munin/plugin-conf.d/zzz-evolinux - regex: '\[{{ item }}\]' - line: '[{{ item }}]' - create: yes + - name: Copy Munin config + ansible.builtin.copy: + src: z-evolinux-dovecot.conf + dest: /etc/munin/plugin-conf.d/z-evolinux-dovecot mode: '0644' - loop: ['dovecot1', 'dovecot_stats_*'] - notify: restart munin-node - - - name: User root is set for plugins in /etc/munin/plugin-conf.d/zzz-evolinux - ansible.builtin.lineinfile: - path: /etc/munin/plugin-conf.d/zzz-evolinux - regex: '^[[:blank:]]*user root[[:blank:]]*$' - insertafter: '\[{{ item }}\]' - line: 'user root' - create: yes - mode: '0644' - loop: ['dovecot1', 'dovecot_stats_*'] notify: restart munin-node - name: Enable dovecot1 plugin From b6886384b936373b185c6558d9a313dfe860733e Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 21 Jul 2023 16:51:02 +0200 Subject: [PATCH 066/182] redis: replace errorneous ini_file module for Munin config, fix dedicted Munin config filename (z-XXX) --- CHANGELOG.md | 1 + redis/tasks/default-munin.yml | 22 ++++++-------------- redis/tasks/instance-munin.yml | 10 +-------- redis/templates/munin-plugin-default.conf.j2 | 6 ++++++ 4 files changed, 14 insertions(+), 25 deletions(-) create mode 100644 redis/templates/munin-plugin-default.conf.j2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c935b68..5fe9bdab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * nagios-nrpe: check\_ssl\_local now has an output that nrpe can understand when it isn't OK * nginx: set default server directive in default vhost * opendkim: update apt cache before install +* redis: replace errorneous ini_file module for Munin config, fix dedicted Munin config filename (z-XXX). ### Removed diff --git a/redis/tasks/default-munin.yml b/redis/tasks/default-munin.yml index c7e18cff..bdbe47d2 100644 --- a/redis/tasks/default-munin.yml +++ b/redis/tasks/default-munin.yml @@ -11,14 +11,6 @@ tags: - redis -- name: Create plugin directory - ansible.builtin.file: - name: /usr/local/lib/munin/ - state: directory - mode: "0755" - tags: - - redis - - name: Create plugin directory ansible.builtin.file: name: /usr/local/lib/munin/plugins/ @@ -63,20 +55,18 @@ changed_when: False check_mode: no -- name: Add redis password for munin (if no more than 1 config block) - community.general.ini_file: - dest: /etc/munin/plugin-conf.d/munin-node - section: 'redis_*' - option: env.password - value: '{{ redis_password }}' - notify: restart munin-node +- name: Configure redis plugin for munin + ansible.builtin.template: + src: templates/munin-plugin-default.conf.j2 + dest: '/etc/munin/plugin-conf.d/z-evolinux-redis' + mode: "0740" when: - redis_password is not none - redis_password | length > 0 - (munin_redis_blocs_in_config.stdout | int) <= 1 + notify: restart munin-node tags: redis - - name: Warn if multiple instance in munin-plugins configuration ansible.builtin.debug: msg: "WARNING - It seems you have multiple redis sections in your munin-node configuration - Munin config NOT changed" diff --git a/redis/tasks/instance-munin.yml b/redis/tasks/instance-munin.yml index 4492ccd7..8d0adf7e 100644 --- a/redis/tasks/instance-munin.yml +++ b/redis/tasks/instance-munin.yml @@ -11,14 +11,6 @@ tags: - redis -- name: Create plugin directory - ansible.builtin.file: - name: /usr/local/lib/munin/ - state: directory - mode: "0755" - tags: - - redis - - name: Create plugin directory ansible.builtin.file: name: /usr/local/lib/munin/plugins/ @@ -58,7 +50,7 @@ - name: Configure redis plugin for munin ansible.builtin.template: src: templates/munin-plugin-instances.conf.j2 - dest: '/etc/munin/plugin-conf.d/evolinux.redis_{{ redis_instance_name }}' + dest: '/etc/munin/plugin-conf.d/z-evolinux-redis_{{ redis_instance_name }}' mode: "0740" notify: restart munin-node tags: redis diff --git a/redis/templates/munin-plugin-default.conf.j2 b/redis/templates/munin-plugin-default.conf.j2 new file mode 100644 index 00000000..674c257d --- /dev/null +++ b/redis/templates/munin-plugin-default.conf.j2 @@ -0,0 +1,6 @@ +# Ansible managed + +{% if redis_password %} +[redis_*] +env.password {{ redis_password | replace("#", "\#") }} +{% endif %} From c2e27d025c581bfc914b6e0f361254805203d030 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Mon, 24 Jul 2023 15:35:09 +0200 Subject: [PATCH 067/182] nagios-nrpe: add brackets in check grep --- nagios-nrpe/files/check-local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nagios-nrpe/files/check-local b/nagios-nrpe/files/check-local index 40587425..8fcc3da8 100755 --- a/nagios-nrpe/files/check-local +++ b/nagios-nrpe/files/check-local @@ -6,7 +6,7 @@ if ! test -f /usr/lib/nagios/plugins/check_nrpe; then fi if [ -r /etc/nagios/nrpe.d/evolix.cfg ]; then - command=$(grep "check_$1" /etc/nagios/nrpe.d/evolix.cfg | grep -v '^[[:blank:]]*#' | tail -n1 | cut -d'=' -f2-) + command=$(grep "\[check_$1\]" /etc/nagios/nrpe.d/evolix.cfg | grep -v '^[[:blank:]]*#' | tail -n1 | cut -d'=' -f2-) echo "Command:" echo " $command" fi From b64072fbbb2972c6b6b0a397d6380ff457113ef7 Mon Sep 17 00:00:00 2001 From: David Prevot Date: Tue, 25 Jul 2023 10:24:41 +0200 Subject: [PATCH 068/182] =?UTF-8?q?Ticket=20#70508=C2=A0:=20ajout=20check?= =?UTF-8?q?=5Felasticsearch=5Fshards?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../files/plugins/check_elasticsearch_shards | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100755 nagios-nrpe/files/plugins/check_elasticsearch_shards diff --git a/nagios-nrpe/files/plugins/check_elasticsearch_shards b/nagios-nrpe/files/plugins/check_elasticsearch_shards new file mode 100755 index 00000000..53bae890 --- /dev/null +++ b/nagios-nrpe/files/plugins/check_elasticsearch_shards @@ -0,0 +1,97 @@ +#!/bin/bash + +usage() { +cat << EOL + Usage : + + $0 --crendentials CREDENTIALS --nodeid NODE_ID + + -c|--crendentials CREDENTIALS # : + -n|--nodeid NODE_ID # the to check +EOL +} + + +return=0 +nb_shards=0 +nb_shards_max=0 +nb_shards_avail=0 +nb_shards_warn=0 +nb_shards_crit=0 +output="" + +# If no argument then show usage +if [ "$#" -eq 0 ]; then + usage + exit 2 +fi + +while :; do + case $1 in + -h|-\?|--help) # Call a "usage" function to display a synopsis, then exit. + usage + exit + ;; + -c|--crendentials) # Takes an option argument, ensuring it has been specified. + if [ -n "$2" ]; then + CREDENTIALS="$2" + shift + else + printf 'ERROR: "--crendentials" requires a non-empty option argument.\n' >&2 + exit 2 + fi + ;; + -n|--nodeid) # Takes an option argument, ensuring it has been specified. + if [ -n "$2" ]; then + NODE_ID="$2" + shift + else + printf 'ERROR: "--nodeid" requires a non-empty option argument.\n' >&2 + exit 2 + fi + ;; + -?*) + printf 'WARNING: Unknown option (ignored): %s\n' "$1" >&2 + ;; + *) # Default case: If no more options then break out of the loop. + break + esac + shift +done + +if [ ! -e "/usr/bin/jq" ]; then + printf "UNKNWON - jq is not installed" + exit 3 +fi + +nb_shards=$(curl -s -k -u ${CREDENTIALS} https://127.0.0.1:9200/_cat/allocation/${NODE_ID}?h=shards) +nb_shards_max=$(curl -s -k -u ${CREDENTIALS} https://127.0.0.1:9200/_cluster/settings?flat_settings | jq -r ".persistent[]" ) + +nb_shards_avail=$(( $nb_shards_max - $nb_shards )) + +if [ "$nb_shards_max" -ge "1000" ]; then + nb_shards_warn=$(( $nb_shards_max / 100 )) +elif [ $nb_shards_max -ge 100 ]; then + nb_shards_warn=$(( $nb_shards_max / 10 )) +else + nb_shards_warn=10 +fi + +nb_shards_crit=$(( $nb_shards_warn / 4 )) + +# debug… +# printf '%d out of %d, avail: %d, warn: %d, crit: %d' $nb_shards $nb_shards_max $nb_shards_avail $nb_shards_warn $nb_shards_crit + +if [ "${nb_shards_avail}" -le "${nb_shards_crit}" ]; then + printf "CRITICAL - %d USED / %d MAX" "${nb_shards}" "${nb_shards_max}" + exit 2 +elif [ "${nb_shards_avail}" -le "${nb_shards_warn}" ]; then + printf "WARNING - %d USED / %d MAX" "${nb_shards}" "${nb_shards_max}" + exit 1 +elif [ "${nb_shards_avail}" -ge "${nb_shards_warn}" ]; then + printf "OK - %d USED / %d MAX" "${nb_shards}" "${nb_shards_max}" + exit 0 +else + printf "UNKNWON - %d USED / %d MAX" "${nb_shards}" "${nb_shards_max}" + exit 3 +fi From 4b4b34e8490ca4454eb804eb68033e714cfebcff Mon Sep 17 00:00:00 2001 From: David Prevot Date: Tue, 25 Jul 2023 10:59:53 +0200 Subject: [PATCH 069/182] Ensure {{ apt_keyring_dir }} directory exists --- apt/tasks/evolix_public.deb822.yml | 8 ++++++++ apt/tasks/evolix_public.oneline.yml | 8 ++++++++ docker-host/tasks/main.yml | 8 ++++++++ elasticsearch/tasks/apt_sources.yml | 10 +++++++++- evolinux-base/tasks/hardware.dell.yml | 8 ++++++++ evolinux-base/tasks/hardware.hp.yml | 8 ++++++++ filebeat/tasks/apt_sources.yml | 10 +++++++++- fluentd/tasks/main.yml | 8 ++++++++ jenkins/tasks/main.yml | 8 ++++++++ kibana/tasks/apt_sources.yml | 10 +++++++++- logstash/tasks/apt_sources.yml | 10 +++++++++- lxc-php/tasks/php80.yml | 8 ++++++++ lxc-php/tasks/php81.yml | 8 ++++++++ lxc-php/tasks/php82.yml | 8 ++++++++ metricbeat/tasks/apt_sources.yml | 10 +++++++++- mongodb/tasks/main_bullseye.yml | 8 ++++++++ mongodb/tasks/main_buster.yml | 8 ++++++++ newrelic/tasks/sources.yml | 10 +++++++++- nodejs/tasks/yarn.yml | 8 ++++++++ percona/tasks/main.yml | 8 ++++++++ php/tasks/sury_pre.yml | 8 ++++++++ postgresql/tasks/pgdg-repo.yml | 8 ++++++++ 22 files changed, 182 insertions(+), 6 deletions(-) diff --git a/apt/tasks/evolix_public.deb822.yml b/apt/tasks/evolix_public.deb822.yml index 84d193b3..0a91dddf 100644 --- a/apt/tasks/evolix_public.deb822.yml +++ b/apt/tasks/evolix_public.deb822.yml @@ -16,6 +16,14 @@ - apt when: _trusted_gpg_keyring.stat.exists +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Add Evolix GPG key ansible.builtin.copy: src: pub_evolix.asc diff --git a/apt/tasks/evolix_public.oneline.yml b/apt/tasks/evolix_public.oneline.yml index deff0b7d..9501e595 100644 --- a/apt/tasks/evolix_public.oneline.yml +++ b/apt/tasks/evolix_public.oneline.yml @@ -16,6 +16,14 @@ - apt when: _trusted_gpg_keyring.stat.exists +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Add Evolix GPG key ansible.builtin.copy: src: pub_evolix.asc diff --git a/docker-host/tasks/main.yml b/docker-host/tasks/main.yml index f4175297..92c6ab3e 100644 --- a/docker-host/tasks/main.yml +++ b/docker-host/tasks/main.yml @@ -22,6 +22,14 @@ state: present when: ansible_distribution_major_version is version('10', '<') +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Add Docker's official GPG key ansible.builtin.copy: src: docker-debian.asc diff --git a/elasticsearch/tasks/apt_sources.yml b/elasticsearch/tasks/apt_sources.yml index e525ba4b..812c4303 100644 --- a/elasticsearch/tasks/apt_sources.yml +++ b/elasticsearch/tasks/apt_sources.yml @@ -5,6 +5,14 @@ state: present when: ansible_distribution_major_version is version('10', '<') +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Elastic GPG key is installed ansible.builtin.copy: src: elastic.asc @@ -33,4 +41,4 @@ - name: Update APT cache ansible.builtin.apt: update_cache: yes - when: elastic_sources is changed \ No newline at end of file + when: elastic_sources is changed diff --git a/evolinux-base/tasks/hardware.dell.yml b/evolinux-base/tasks/hardware.dell.yml index 532b3f58..7eeefc49 100644 --- a/evolinux-base/tasks/hardware.dell.yml +++ b/evolinux-base/tasks/hardware.dell.yml @@ -41,6 +41,14 @@ state: absent when: perc_hba11_search.rc == 0 +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: MegaCLI SAS package is present block: - name: HWRaid GPG key is installed diff --git a/evolinux-base/tasks/hardware.hp.yml b/evolinux-base/tasks/hardware.hp.yml index 62f6e0a0..baded38c 100644 --- a/evolinux-base/tasks/hardware.hp.yml +++ b/evolinux-base/tasks/hardware.hp.yml @@ -1,5 +1,13 @@ --- +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: HPE GPG key is installed ansible.builtin.copy: src: hpePublicKey2048_key1.asc diff --git a/filebeat/tasks/apt_sources.yml b/filebeat/tasks/apt_sources.yml index e525ba4b..812c4303 100644 --- a/filebeat/tasks/apt_sources.yml +++ b/filebeat/tasks/apt_sources.yml @@ -5,6 +5,14 @@ state: present when: ansible_distribution_major_version is version('10', '<') +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Elastic GPG key is installed ansible.builtin.copy: src: elastic.asc @@ -33,4 +41,4 @@ - name: Update APT cache ansible.builtin.apt: update_cache: yes - when: elastic_sources is changed \ No newline at end of file + when: elastic_sources is changed diff --git a/fluentd/tasks/main.yml b/fluentd/tasks/main.yml index 9f350bf4..de76320c 100644 --- a/fluentd/tasks/main.yml +++ b/fluentd/tasks/main.yml @@ -1,5 +1,13 @@ --- +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Add Fluentd GPG key ansible.builtin.copy: src: treasuredata.asc diff --git a/jenkins/tasks/main.yml b/jenkins/tasks/main.yml index 835d3a3e..2ea8ece4 100644 --- a/jenkins/tasks/main.yml +++ b/jenkins/tasks/main.yml @@ -5,6 +5,14 @@ # http://mirrors.jenkins.io/.* # http://jenkins.mirror.isppower.de/.* +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Add Jenkins GPG key ansible.builtin.copy: src: jenkins.asc diff --git a/kibana/tasks/apt_sources.yml b/kibana/tasks/apt_sources.yml index e525ba4b..812c4303 100644 --- a/kibana/tasks/apt_sources.yml +++ b/kibana/tasks/apt_sources.yml @@ -5,6 +5,14 @@ state: present when: ansible_distribution_major_version is version('10', '<') +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Elastic GPG key is installed ansible.builtin.copy: src: elastic.asc @@ -33,4 +41,4 @@ - name: Update APT cache ansible.builtin.apt: update_cache: yes - when: elastic_sources is changed \ No newline at end of file + when: elastic_sources is changed diff --git a/logstash/tasks/apt_sources.yml b/logstash/tasks/apt_sources.yml index e525ba4b..812c4303 100644 --- a/logstash/tasks/apt_sources.yml +++ b/logstash/tasks/apt_sources.yml @@ -5,6 +5,14 @@ state: present when: ansible_distribution_major_version is version('10', '<') +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Elastic GPG key is installed ansible.builtin.copy: src: elastic.asc @@ -33,4 +41,4 @@ - name: Update APT cache ansible.builtin.apt: update_cache: yes - when: elastic_sources is changed \ No newline at end of file + when: elastic_sources is changed diff --git a/lxc-php/tasks/php80.yml b/lxc-php/tasks/php80.yml index 043c0174..1fd37dea 100644 --- a/lxc-php/tasks/php80.yml +++ b/lxc-php/tasks/php80.yml @@ -27,6 +27,14 @@ - "deb [signed-by={{ lxc_apt_keyring_dir }}/sury.gpg] https://packages.sury.org/php/ bullseye main" - "deb [signed-by={{ lxc_apt_keyring_dir }}/pub_evolix.asc] http://pub.evolix.org/evolix bullseye-php80 main" +- name: "Ensure {{ lxc_rootfs }}{{ apt_keyring_dir }} directory exists" + file: + path: "{{ lxc_rootfs }}{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: copy pub.evolix.net GPG key ansible.builtin.copy: src: pub_evolix.asc diff --git a/lxc-php/tasks/php81.yml b/lxc-php/tasks/php81.yml index a1e9c71b..b9460215 100644 --- a/lxc-php/tasks/php81.yml +++ b/lxc-php/tasks/php81.yml @@ -26,6 +26,14 @@ - "deb [signed-by={{ lxc_apt_keyring_dir }}/sury.gpg] https://packages.sury.org/php/ bullseye main" - "deb [signed-by={{ lxc_apt_keyring_dir }}/pub_evolix.asc] http://pub.evolix.org/evolix bullseye-php81 main" +- name: "Ensure {{ lxc_rootfs }}{{ apt_keyring_dir }} directory exists" + file: + path: "{{ lxc_rootfs }}{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: copy pub.evolix.net GPG key ansible.builtin.copy: src: pub_evolix.asc diff --git a/lxc-php/tasks/php82.yml b/lxc-php/tasks/php82.yml index 1fb81851..a40af195 100644 --- a/lxc-php/tasks/php82.yml +++ b/lxc-php/tasks/php82.yml @@ -26,6 +26,14 @@ - "deb [signed-by={{ apt_keyring_dir }}/sury.gpg] https://packages.sury.org/php/ bullseye main" - "deb [signed-by={{ apt_keyring_dir }}/pub_evolix.asc] http://pub.evolix.org/evolix bullseye-php82 main" +- name: "Ensure {{ lxc_rootfs }}{{ apt_keyring_dir }} directory exists" + file: + path: "{{ lxc_rootfs }}{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: copy pub.evolix.net GPG key ansible.builtin.copy: src: pub_evolix.asc diff --git a/metricbeat/tasks/apt_sources.yml b/metricbeat/tasks/apt_sources.yml index e525ba4b..812c4303 100644 --- a/metricbeat/tasks/apt_sources.yml +++ b/metricbeat/tasks/apt_sources.yml @@ -5,6 +5,14 @@ state: present when: ansible_distribution_major_version is version('10', '<') +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Elastic GPG key is installed ansible.builtin.copy: src: elastic.asc @@ -33,4 +41,4 @@ - name: Update APT cache ansible.builtin.apt: update_cache: yes - when: elastic_sources is changed \ No newline at end of file + when: elastic_sources is changed diff --git a/mongodb/tasks/main_bullseye.yml b/mongodb/tasks/main_bullseye.yml index 0cfebf20..7c83a618 100644 --- a/mongodb/tasks/main_bullseye.yml +++ b/mongodb/tasks/main_bullseye.yml @@ -6,6 +6,14 @@ - ansible_distribution_release == "bullseye" - mongodb_version is version('5.2', '<') +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Add MongoDB GPG key ansible.builtin.copy: src: "server-{{ mongodb_version }}.asc" diff --git a/mongodb/tasks/main_buster.yml b/mongodb/tasks/main_buster.yml index 7d47ed25..ae4f27eb 100644 --- a/mongodb/tasks/main_buster.yml +++ b/mongodb/tasks/main_buster.yml @@ -12,6 +12,14 @@ state: absent when: _trusted_gpg_keyring.stat.exists +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Add MongoDB GPG key ansible.builtin.copy: src: "server-{{ mongodb_version }}.asc" diff --git a/newrelic/tasks/sources.yml b/newrelic/tasks/sources.yml index 3f745db9..3314c1c8 100644 --- a/newrelic/tasks/sources.yml +++ b/newrelic/tasks/sources.yml @@ -1,5 +1,13 @@ --- +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Add NewRelic GPG key ansible.builtin.copy: src: newrelic.asc @@ -28,4 +36,4 @@ - name: Update APT cache ansible.builtin.apt: update_cache: yes - when: newrelic_sources is changed \ No newline at end of file + when: newrelic_sources is changed diff --git a/nodejs/tasks/yarn.yml b/nodejs/tasks/yarn.yml index 645f8f90..4cf34988 100644 --- a/nodejs/tasks/yarn.yml +++ b/nodejs/tasks/yarn.yml @@ -1,5 +1,13 @@ --- +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Yarn GPG key is installed ansible.builtin.copy: src: yarn.asc diff --git a/percona/tasks/main.yml b/percona/tasks/main.yml index 069956d0..e415ece6 100644 --- a/percona/tasks/main.yml +++ b/percona/tasks/main.yml @@ -15,6 +15,14 @@ state: absent when: _trusted_gpg_keyring.stat.exists +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Add Percona GPG key ansible.builtin.copy: src: percona.asc diff --git a/php/tasks/sury_pre.yml b/php/tasks/sury_pre.yml index 1f04b661..ab51d4ed 100644 --- a/php/tasks/sury_pre.yml +++ b/php/tasks/sury_pre.yml @@ -6,6 +6,14 @@ state: present when: ansible_distribution_major_version is version('10', '<') +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: copy pub.evolix.org GPG key ansible.builtin.copy: src: pub_evolix.asc diff --git a/postgresql/tasks/pgdg-repo.yml b/postgresql/tasks/pgdg-repo.yml index b988618a..2aa2f8a9 100644 --- a/postgresql/tasks/pgdg-repo.yml +++ b/postgresql/tasks/pgdg-repo.yml @@ -8,6 +8,14 @@ - ansible.builtin.meta: flush_handlers +- name: "Ensure {{ apt_keyring_dir }} directory exists" + file: + path: "{{ apt_keyring_dir }}" + state: directory + mode: "755" + owner: root + group: root + - name: Add PGDG GPG key ansible.builtin.copy: src: postgresql.asc From 3c3db4fefa3a08b5a5f81fc4bd2cd983b8612a8e Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Tue, 25 Jul 2023 15:24:00 +0200 Subject: [PATCH 070/182] postfix: new spam.sh update script that avoids reloading if files did not change. --- CHANGELOG.md | 1 + postfix/files/spam.sh | 149 +++++++++++++++++++++++------------------- 2 files changed, 81 insertions(+), 69 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fe9bdab..b49d6af5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * postfix (packmail or when postfix_slow_transport_include is True): change `minimal_backoff_time` from 2h to 15m (see HowtoPostfix) * postfix (packmail) : optimize Amavis integration * redis: standardize plugins path from /usr/local/share/munin/ to /usr/local/lib/munin/plugins/ +* postfix: new spam.sh update script that avoids reloading if files did not change. ### Fixed diff --git a/postfix/files/spam.sh b/postfix/files/spam.sh index 10d5e62a..8ad7125e 100644 --- a/postfix/files/spam.sh +++ b/postfix/files/spam.sh @@ -1,87 +1,98 @@ #!/bin/bash #set -x - umask 022 -tmp_file=$(mktemp) +tmp_dir="/tmp/spam_sh" +mkdir -p "${tmp_dir}" +data_url="http://antispam00.evolix.org/spam" +rc=0 -tmp=$(mktemp -d) +function is_installed { + dpkg -l "${1}" 2>&1 | grep -v "no packages found matching" | grep -q ^ii +} -if [ -f $tmp_file ] ; - then rm $tmp_file ; -fi +function is_new { + # Check whether a file name provided as argument has been changed remotely + cd "${tmp_dir}" + wget -q -t 3 "${data_url}/${1}.md5" -O "${1}.md5.new" + if ! [ -e "${1}.md5" ] || ! cmp -s "$1.md5" "${1}.md5.new"; then + return 0 + fi + return 1 +} -sleep $[ $RANDOM / 1024 ] +function download { + cd "${tmp_dir}" + wget -q -t 3 "${data_url}/${1}" -O "${1}" + wget -q -t 3 "${data_url}/${1}.md5" -O "${1}.md5" +} -# Postfix -cd $tmp +function check_integrity { + cd "$tmp_dir" + md5sum -c "${1}.md5" > /dev/null && [ -e "${1}" ] +} -wget -q -t 3 http://antispam00.evolix.org/spam/client.access -O $tmp_file -cp $tmp_file /etc/postfix/client.access -rm $tmp_file - -wget -q -t 3 http://antispam00.evolix.org/spam/sender.access -O $tmp_file -cp $tmp_file /etc/postfix/sender.access -rm $tmp_file - -wget -q -t 3 http://antispam00.evolix.org/spam/recipient.access -O $tmp_file -cp $tmp_file /etc/postfix/recipient.access -rm $tmp_file - -wget -q -t 3 http://antispam00.evolix.org/spam/header_kill -O $tmp_file -cp $tmp_file /etc/postfix/header_kill -rm $tmp_file - -wget -q -t 3 http://antispam00.evolix.org/spam/sa-blacklist.access -O sa-blacklist.access -wget -q -t 3 http://antispam00.evolix.org/spam/sa-blacklist.access.md5 -O $tmp_file -if md5sum -c $tmp_file > /dev/null && [ -s sa-blacklist.access ] ; then - cp sa-blacklist.access /etc/postfix/sa-blacklist.access -fi -rm sa-blacklist.access -rm $tmp_file - -/usr/sbin/postmap hash:/etc/postfix/client.access -/usr/sbin/postmap hash:/etc/postfix/sender.access -/usr/sbin/postmap hash:/etc/postfix/recipient.access -/usr/sbin/postmap -r hash:/etc/postfix/sa-blacklist.access - -wget -q -t 3 http://antispam00.evolix.org/spam/spamd.cidr -O spamd.cidr -wget -q -t 3 http://antispam00.evolix.org/spam/spamd.cidr.md5 -O $tmp_file -if md5sum -c $tmp_file > /dev/null && [ -s spamd.cidr ] ; then - cp spamd.cidr /etc/postfix/spamd.cidr -fi -rm spamd.cidr -rm $tmp_file +function cleanup { + rm -f /etc/postfix/header_kill.db + rm -f /etc/postfix/header_kill_local.db + rm -f "$tmp_dir"/*.md5.new +} +postfix_dbs="client.access sender.access recipient.access header_kill sa-blacklist.access spamd.cidr" +for db in ${postfix_dbs}; do + if is_new "${db}"; then + download "${db}" + if check_integrity "${db}"; then + cp "${tmp_dir}/${db}" /etc/postfix/ + if [ "${db}" != "header_kill" ]; then + /usr/sbin/postmap -r "/etc/postfix/${db}" + fi + else + >&2 echo "Integrity check failed for new ${db}." + rc=1 + fi + fi +done # SpamAssassin -cd $tmp -wget -q -t 3 http://antispam00.evolix.org/spam/evolix_rules.cf -O evolix_rules.cf -wget -q -t 3 http://antispam00.evolix.org/spam/evolix_rules.cf.md5 -O $tmp_file -if md5sum -c $tmp_file > /dev/null && [ -s evolix_rules.cf ] ; then - dpkg -l spamassassin 2>&1 | grep -v "no packages found matching" | grep -q ^ii && cp evolix_rules.cf /etc/spamassassin - dpkg -l spamassassin 2>&1 | grep -v "no packages found matching" | grep -q ^ii && /etc/init.d/spamassassin reload > /dev/null - if [ -d /etc/spamassassin/sa-update-hooks.d ]; then +sa_db="evolix_rules.cf" +if is_installed spamassassin; then + if is_new "${sa_db}"; then + download "${sa_db}" + if check_integrity "${sa_db}"; then + cp ${tmp_dir}/evolix_rules.cf /etc/spamassassin + /etc/init.d/spamassassin reload > /dev/null + if [ -d /etc/spamassassin/sa-update-hooks.d ]; then run-parts --lsbsysinit /etc/spamassassin/sa-update-hooks.d + fi + else + >&2 echo "Integrity check failed for ${sa_db}." + rc=1 fi + fi fi -# ClamAV -cd $tmp -wget -q -t 3 http://antispam00.evolix.org/spam/evolix.ndb -O evolix.ndb -wget -q -t 3 http://antispam00.evolix.org/spam/evolix.ndb.md5 -O $tmp_file -dpkg -l clamav-daemon 2>&1 | grep -v "no packages found matching" | grep -q ^ii && chown clamav: evolix.ndb -if md5sum -c $tmp_file > /dev/null && [ -s evolix.ndb ] ; then - dpkg -l clamav-daemon 2>&1 | grep -v "no packages found matching" | grep -q ^ii && cp -a evolix.ndb /var/lib/clamav/ -fi -wget -q -t 3 http://antispam00.evolix.org/spam/evolix.hsb -O evolix.hsb -wget -q -t 3 http://antispam00.evolix.org/spam/evolix.hsb.md5 -O $tmp_file -dpkg -l clamav-daemon 2>&1 | grep -v "no packages found matching" | grep -q ^ii && chown clamav: evolix.hsb -if md5sum -c $tmp_file > /dev/null && [ -s evolix.hsb ] ; then - dpkg -l clamav-daemon 2>&1 | grep -v "no packages found matching" | grep -q ^ii && cp -a evolix.hsb /var/lib/clamav/ -fi -dpkg -l clamav-daemon 2>&1 | grep -v "no packages found matching" | grep -q ^ii && /etc/init.d/clamav-daemon reload-database > /dev/null -rm $tmp_file +cleanup -rm -rf $tmp +exit "${rc}" + +# Commenté car fichiers plus maintenus (cf. Reg) +## ClamAV +#cd $tmp +#wget -q -t 3 http://antispam00.evolix.org/spam/evolix.ndb -O evolix.ndb +#wget -q -t 3 http://antispam00.evolix.org/spam/evolix.ndb.md5 -O $tmp_file +#dpkg -l clamav-daemon 2>&1 | grep -v "no packages found matching" | grep -q ^ii && chown clamav: evolix.ndb +#if md5sum -c $tmp_file > /dev/null && [ -s evolix.ndb ] ; then +# dpkg -l clamav-daemon 2>&1 | grep -v "no packages found matching" | grep -q ^ii && cp -a evolix.ndb /var/lib/clamav/ +#fi +#wget -q -t 3 http://antispam00.evolix.org/spam/evolix.hsb -O evolix.hsb +#wget -q -t 3 http://antispam00.evolix.org/spam/evolix.hsb.md5 -O $tmp_file +#dpkg -l clamav-daemon 2>&1 | grep -v "no packages found matching" | grep -q ^ii && chown clamav: evolix.hsb +#if md5sum -c $tmp_file > /dev/null && [ -s evolix.hsb ] ; then +# dpkg -l clamav-daemon 2>&1 | grep -v "no packages found matching" | grep -q ^ii && cp -a evolix.hsb /var/lib/clamav/ +#fi +#dpkg -l clamav-daemon 2>&1 | grep -v "no packages found matching" | grep -q ^ii && /etc/init.d/clamav-daemon reload-database > /dev/null +#rm $tmp_file +# +#rm -rf $tmp From 5bd6893dac56dd50dc4dd628a615b1d8ff6e6c78 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Wed, 26 Jul 2023 09:37:45 +0200 Subject: [PATCH 071/182] postfix: split packmail.yml, create packmail-spam.yml to be called separately for update --- postfix/tasks/packmail-spam.yml | 39 +++++++++++++++++++++++++++++++++ postfix/tasks/packmail.yml | 39 +-------------------------------- 2 files changed, 40 insertions(+), 38 deletions(-) create mode 100644 postfix/tasks/packmail-spam.yml diff --git a/postfix/tasks/packmail-spam.yml b/postfix/tasks/packmail-spam.yml new file mode 100644 index 00000000..114be769 --- /dev/null +++ b/postfix/tasks/packmail-spam.yml @@ -0,0 +1,39 @@ +--- +- name: "mount /usr in rw" + ansible.builtin.command: + cmd: 'mount -o remount,rw /usr' + changed_when: False + tags: postfix + +- name: copy spam.sh script + ansible.builtin.copy: + src: spam.sh + dest: /usr/share/scripts/spam.sh + mode: "0700" + tags: postfix + +- name: Check if cron is installed + ansible.builtin.shell: + cmd: "set -o pipefail && dpkg -l cron 2>/dev/null | grep -q -E '^(i|h)i'" + executable: /bin/bash + check_mode: no + failed_when: False + changed_when: False + register: is_cron_installed + tags: postfix + +- name: enable spam.sh cron + ansible.builtin.lineinfile: + dest: /etc/cron.d/spam + line: "42 * * * * root /usr/share/scripts/spam.sh" + create: yes + state: present + mode: "0640" + when: is_cron_installed.rc == 0 + tags: postfix + +- name: update antispam list + ansible.builtin.command: + cmd: /usr/share/scripts/spam.sh + changed_when: False + tags: postfix diff --git a/postfix/tasks/packmail.yml b/postfix/tasks/packmail.yml index f5ccf66d..945d2c6f 100644 --- a/postfix/tasks/packmail.yml +++ b/postfix/tasks/packmail.yml @@ -99,42 +99,5 @@ tags: - postfix -- ansible.builtin.include_role: - name: evolix/remount-usr - tags: - - postfix +- ansible.builtin.include: packmail-spam.yml -- name: copy spam.sh script - ansible.builtin.copy: - src: spam.sh - dest: /usr/share/scripts/spam.sh - mode: "0700" - tags: - - postfix - -- name: Check if cron is installed - ansible.builtin.shell: - cmd: "set -o pipefail && dpkg -l cron 2>/dev/null | grep -q -E '^(i|h)i'" - executable: /bin/bash - check_mode: no - failed_when: False - changed_when: False - register: is_cron_installed - -- name: enable spam.sh cron - ansible.builtin.lineinfile: - dest: /etc/cron.d/spam - line: "42 * * * * root /usr/share/scripts/spam.sh" - create: yes - state: present - mode: "0640" - when: is_cron_installed.rc == 0 - tags: - - postfix - -- name: update antispam list - ansible.builtin.command: - cmd: /usr/share/scripts/spam.sh - changed_when: False - tags: - - postfix From 6f218a77633688fa1f62420abb29edc2e9630a47 Mon Sep 17 00:00:00 2001 From: Eric Morino Date: Wed, 26 Jul 2023 10:44:26 +0200 Subject: [PATCH 072/182] Add enabled and started systemd unit for mailgraph --- postfix/tasks/packmail.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postfix/tasks/packmail.yml b/postfix/tasks/packmail.yml index 945d2c6f..6562e0d3 100644 --- a/postfix/tasks/packmail.yml +++ b/postfix/tasks/packmail.yml @@ -18,11 +18,11 @@ group: www-data mode: '0755' -- name: make sure a service Mailgraph is running +- name: make sure a service Mailgraph is running and enabled ansible.builtin.systemd: name: mailgraph.service + enabled: yes state: started - enabled: true - name: create packmail main.cf ansible.builtin.template: From 043f714722de41c384a7f5d229f5f45011c270ce Mon Sep 17 00:00:00 2001 From: David Prevot Date: Thu, 27 Jul 2023 14:43:03 +0200 Subject: [PATCH 073/182] Clean file committed by mistake --- userlogrotate/' | 1347 ----------------------------------------------- 1 file changed, 1347 deletions(-) delete mode 100644 userlogrotate/' diff --git a/userlogrotate/' b/userlogrotate/' deleted file mode 100644 index 9a8b52de..00000000 --- a/userlogrotate/' +++ /dev/null @@ -1,1347 +0,0 @@ -# Changelog -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - -This project does not follow semantic versioning. -The **major** part of the version is the year -The **minor** part changes is the month -The **patch** part changes is incremented if multiple releases happen the same month - - -## [Unreleased] - -### Added - -* userlogrotate: rotate also php.log. -* nagios-nrpe: add a NRPE check-local command with completion. -* policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory -* docker-host: added var for user namespace setting -* dovecot: fix old_stats plugin for Dovecot 2.3. -* dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) -* fail2ban: add default variable fail2ban_dbpurgeage_default -* userlogrotate: add a userlogpurge script disabled by default - -### Changed - -* all: change syntax "force: [yes,no]" → "force: [true,false]" -* all: change syntax "become: [yes,no]" → "become: [true,false]" -* elasticsearch: improve networking configuration -* evolinux-users: remove Stretch references in tasks that also apply to next Debian versions -* minifirewall: upstream release 23.07 -* minifirewall: update nrpe script to check active configuration -* mysql: improve shell syntax for mysql_skip script -* pbbouncer: minor fixes -* varnish: Allow the systemd template to be overriden with a template outside of the role -* postfix (packmail or when postfix_slow_transport_include is True): change `minimal_backoff_time` from 2h to 15m (see HowtoPostfix) -* postfix (packmail) : optimize Amavis integration -* redis: standardize plugins path from /usr/local/share/munin/ to /usr/local/lib/munin/plugins/ - -### Fixed - -* elasticsearch: comment the Xlog:gc line instead of changing it completely -* nagios-nrpe: remount /usr **after** installing the packages -* packweb-apache,nagios-nrpe: add missing task and config for PHP 8.2 container -* potsfix: add missing `localhost.$mydomain` to mydestination -* nagios-nrpe: check\_ssl\_local now has an output that nrpe can understand when it isn't OK - -### Removed - -* dovecot: remove Munin plugin dovecot (not working) - -### Security - -## [23.04] 2023-04-23 - -### Added - -* graylog: new role -* lxc-php: add support for PHP 8.2 container - -### Changed - -* Use FQCN (Fully Qualified Collection Name) -* apt: with Debian 12, backports are installed but disabled by default -* openvpn: updated the README file -* pgbouncer: add handler to restart the service - -### Fixed - -* generate-ldif: Support for Debian 12 - -## [23.03.1] 2023-03-16 - -### Added - -* pgbouncer: new role - -### Changed - -* apt: deb822 migration python script is looked relative to shell script -* listupgrade: remove old typo version of the cron task -* minifirewall: support protocols in numeric form - -## [23.03] 2023-03-16 - -### Added - -* apache: add task to enable mailgraph on default vhost and index.html -* apt: add move-apt-keyrings script/tasks -* apt: add tools to migrate sources to deb822 format -* fail2ban: add "Internal login failure" to Dovecot filter -* lxc: copy `/etc/profile.d/evolinux.sh` from host into container -* nagios-nrpe: add tasks/files for a wrapper -* nagios-nrpe: Print pool config path in check_phpfpm_multi output -* php: add `php_version` variable when sury is activated for each Debian version -* php: add a way to choose which version to install using sury repository -* postfix: Add task to enable mailgraph on packmail -* postgresql: configure max_connections -* userlogrotate: create dedicated role, separated from packweb-apache -* varnish: add `varnish_update_config` variable to disable configuration update - -### Changed - -* Use systemd module instead of command -* Removed all `warn: False` args in command, shell and other modules as it's been deprecated and will give a hard fail in ansible-core 2.14.0. -* apt: Use pub.evolix.org instead of pub.evolix.net -* bind: refactor role -* elasticsearch: Disable garabge collector logging (JDK >= 9) -* evolinux-users: Update sudoers template to remove commands allowed without password -* listupgrade: upstream release 23.03.3 -* kvmstats: use virsh domstats | awk to get guests informations -* nagios-nrpe : Rewrite `check_vrrpd` for a better check (check `rp_filter`, `vrrpd` and `uvrrpd` compatible, use arguments, …) -* openvpn: Change `check_openvpn` destination file to comply with recent EvoBSD change -* postfix: come back to default value of `notify_classes` for pack mails. -* userlogrotate: set rotate date format in right order (YYYY-MM-DD)! -* webapps/nextcloud : Change default data directory to be outside web root -* webapps/nextcloud : Small enhancement on the vhost template to lock out data dir -* yarn: update apt key - -### Fixed - -* Proper jinja spacing -* clamav: set `MaxConnectionQueueLength` to its default value (200), custom (15) was way too small and caused recurring failures in Postfix. -* docker-host: fix type in `daemon.json` and remove host configuration that is already in the systemd service by default -* evolinux-base: ensure dbus is started and enabled (not by default in the case of an offline netinst) -* haproxy: fix missing admin ACL in stats module access permissions -* openvpn: fix the client cipher configuration to match the server cipher configuration -* php: fix error introduced in #33503e4538 (`False` evaluated as a String instead of Boolean) -* php: install using Sury repositories on Bullseye -* postfix (packmail only): disable `concurrency_failed_cohort_limit` for destination smtp-amavis to prevent the suspension of this destination when Amavis fails to answer. Indeed, we configure the suspension delay quite long in `minimal_backoff_time` (2h) and `maximal_backoff_time` (6h) to reduce the risk of ban from external SMTPs. -* postfix: avoid Amavis transport to be considered dead when restarted. -* postfix: remove unused `aliases_scope=sub` from virtual_aliases.cf (it generated warnings) -* userlogrotate: fix bug introduced in commit 2e54944a246 (rotated files were not zipped) -* userlogrotate: skip zipping if .gz log already exists (prevents interactive question) - -### Removed - -* evolinux-base: subversion is not installed anymore - - -## [22.12] 2022-12-14 - -### Added - -* all: add signed-by option for additional APT sources -* all: preliminary work to support Debian 12 -* all: use proper keyrings directory for APT version -* evolinux-base: replace regular kernel by cloud kernel on virtual servers -* lxc-php: set php-fpm umask to `007` -* nagios-nrpe: `check_ceph_*` -* nagios-nrpe: `check_haproxy_stats` supports DRAIN status -* packweb-apache: enable `log_forensic` module -* rabbitmq: add link in default page -* varnish: create special tmp directory for syntax validation -* postfix: add localhost.$mydomain to mydestination - -### Changed - -* certbot: auto-detect HAPEE version in renewal hook -* evocheck: install script according to Debian version -* evolinux-base: `utils.yml` can be excluded -* evolinux-todo: execute tasks only for Debian distribution (because this task is a dependency for others roles used on different distributions) -* evolinux-user: add sudoers privilege for check `php_fpm81` -* evomaintenance: allow missing API endpoint if APi is disabled -* java: use default JRE package when version is not specified -* keepalived: change exit code (_warning_ if running but not on expected state ; _critical_ if not running) -* listupgrade: better detection for PostgreSQL -* listupgrade: sort/uniq of packages/services lists in email template -* lxc-solr: detect the real partition options -* lxc-solr: download URL according to Solr Version -* lxc-solr: set homedir and port at install -* minifirewall: whitelist deb.freexian.com -* openvpn: shellpki upstream release 22.12.2 -* openvpn: specifies that the mail for expirations is for OpenVPN -* packweb-apache: manual dependencies resolution -* redis: some values should be quoted -* redis: variable to disable transparent hugepage (default: do nothing) -* squid: whitelist `deb.freexian.com` -* varnish: better package facts usage with check mode and tags -* varnish: systemd override depends on Varnish version instead of Debian version - -### Fixed - -* evolinux-user: Fix sudoers privilege for check `php_fpm80` -* nagios-nrpe: Fix check opendkim for recent change in listening port -* openvpn: Fix mode of shellpki script -* proftpd: Fix format of public key files controlled by Ansible -* proftpd: Fix mode of public key directory and files (they have to be accessible by `proftpd:nobody`) -* varnish: fix missing state, that blocked the task - -### Removed - -* openvpn: Deleted the task fixing the CRL rights since it has been fixed in upstream - - -## [22.09] 2022-09-19 - -### Added - -* evolinux_users: create only users who have a certain value for the `create` key (default: `always`). -* php: install php-xml with recent PHP versions -* vrrp: add an `ip.yml` task file to help create VRRP addresses -* webapps/nextcloud: Add compatibility with apache2, and apache2 mod_php. -* memcached: NRPE check for multi-instance setup -* munin: Add ipmi_ plugins on dedicated hardware -* proftpd: Add options to override configs (and add a warning if file was overriden) -* proftpd: Allow user auth with ssh keys - - -### Changed - -* evocheck: upstream release 22.09 -* evolinux-base: update-evobackup-canary upstream release 22.06 -* generate-ldif: Support any MariaDB version -* minifirewall: use handlers to restart minifirewall -* openvpn: automate the initialization of the CA and the creation of the server certificate ; use openssl_dhparam module instead of a command -* generate-ldif: support any version of MariaDB (instead of only 10.0, 10.1 and 10.3) -* openvpn: Run OpenVPN with the \_openvpn user and group instead of nobody which is originally for NFS -* nagios-nrpe: Upgrade check_mongo - -### Fixed - -* fail2ban: fix dovecot-evolix regex syntax -* haproxy: make it so that munin doesn't break if there is a non default `haproxy_stats_path` -* mysql: Add missing Munin conf for Debian 11 -* redis: config directory must be owned by the user that runs the service (to be able to write tmp config files in it) -* varnish: make `-j ` the first argument on jessie/stretch as it has to be the first argument there. -* webapps/nextcloud: Add missing dependencies for imagick - -### Removed - -* evocheck: remove failure if deprecated variable is used -* webapps/nextcloud: Drop support for Nginx - -## [22.07.1] 2022-07-28 - -### Changed - -* evocheck: upstream release 22.07 -* evomaintenance: upstream release 22.07 -* mongodb: replace version_compare() with version() -* nagios-nrpe: check_disk1 returns only alerts -* nagios-nrpe: use regexp to exclude paths/devices in check_disk1 - -## [22.07] 2022-07-08 - -### Added - -* fail2ban: Ensure apply dbpurgeage from stretch and buster - -## [22.07] 2022-07-06 - -### Added - -* evolinux-base: session timeout is configurable (default: 36000 seconds = 10 hours) -* haproxy: add haproxy_allow_ip_nonlocal_bind to set sysctl value (optional) -* kvm-host: fix depreciation of "drbd-overview" by "drbdadm status" in add-vm.sh -* openvpn: configure logrotate - -### Changed - -* openvpn: minimal rights on /etc/shellpki/ and crl.pem - -### Fixed - -* evolinux-base: Update PermitRootLogin task to work on Debian 11 -* evolinux-user: Update PermitRootLogin task to work on Debian 11 -* minifirewall: docker mode is configurable - -## [22.06.3] 2022-06-17 - -### Changed - -* evolinux-base: blacklist and do not install megaclisas-status package on incompatible servers - -## [22.06.2] 2022-06-10 - -### Added - -* postgresql: add variable to configure binding addresses (default: 127.0.0.1) - -### Changed - -* evocheck: upstream release 22.06.2 -* fail2ban: Give the possibility to override jail.local (with fail2ban_override_jaillocal) -* fail2ban: If jail.local was overriden, add a warning -* fail2ban: Allow to tune some jail settings (maxretry, bantime, findtime) with ansible -* fail2ban: Allow to tune the default action with ansible -* fail2ban: Change default action to ban only (instead of ban + mail with whois report) -* fail2ban: Configure recidive jail (off by default) + extend dbpurgeage -* redis: binding is possible on multiple interfaces (breaking change) - -### Fixed - -* Enforce String notation for mode -* postgresql: fix nested loop for Munin plugins -* postgresql: Fix task order when using pgdg repo -* postgresql: Install the right pg version - -## [22.06.1] 2022-06-06 - -### Changed - -* evocheck: upstream release 22.06.1 -* minifirewall: upstream release 22.06 -* mysql: evomariabackup release 22.06.1 -* mysql: reorganize evomariabackup to use mtree instead of our own dir-check - -## [22.06] 2022-06-03 - -### Added - -* certbot: add hapee (HAProxy Enterprise Edition) deploy hook -* evolinux-base: add dir-check script -* evolinux-base: add update-evobackup-canary script -* mysql: add post-backup-hook to evomariabackup -* mysql: use dir-check inside evomariabackup - -### Changed - -* docker: Allow "live-restore" to be toggled with docker_conf_live_restore -* evocheck: upstream release 22.06 -* evolinux-base: Replacement of variable `evolinux_packages_hardware` by `ansible_virtualization_role == "host"` automatize host type detection and avoids installing smartd & other on VM. -* minifirewall: tail template follows symlinks -* mysql: add "set crypt_use_gpgme=no" Mutt option, for mysqltuner - -### Fixed - -* Role `postfix`: Add missing `localhost.localdomain localhost` to `mydestination` variable which caused undelivered of some local mails. - -## [22.05.1] 2022-05-12 - -### Added - -* docker : Introduce new default settings + allow to change the docker data directory -* docker : Introduce new variables to tweak daemon settings - -### Changed - -* evocheck: upstream release 22.05 - -### Removed - -* docker : Removed Debian Jessie support - -## [22.05] 2022-05-10 - -### Added - -* etc-git: use "ansible-commit" to efficiently commit all available repositories (including /etc inside LXC) from Ansible -* minifirewall: compatibility with "legacy" version of minifirewall -* minifirewall: configure proxy/backup/sysctl values -* munin: Add possibility to install local plugins, and install dhcp_pool plugin -* nagios-nrpe: Add a check dhcp_pool -* redis: Activate overcommit sysctl -* redis: Add log2mail user to redis group - -### Changed - -* dump-server-state: upstream release 22.04.3 -* evocheck: upstream release 22.04.1 -* evolinux-base: Add non-free repos & install non-free firmware on dedicated hardware -* evolinux-base: rename backup-server-state to dump-server-state -* generate-ldif: Add services check for bkctld -* minifirewall: restore "force-restart" and fix "restart-if-needed" -* minifirewall: tail template follows symlinks -* minifirewall: upstream release 22.05 -* opendkim : add generate opendkim-genkey in sha256 and key 4096 -* openvpn: use a local copy of files instead of cloning an external git repository -* openvpn: use a subnet topology instead of the net30 default topology -* tomcat: Tomcat 9 by default with Debian 11 -* vrrpd: Store sysctl values in specific file - -### Fixed - -* etc-git : Remount /usr in rw for git gc in in /usr/share/scripts/ -* etc-git: Make evocommit fully compatible with OpenBSD -* generate-ldif: Correct generated entries for php-fpm in containers -* keepalived: repair broken role -* minifirewall: fix `failed_when` condition on restart -* postfix: Do not send mails through milters a second time after amavis (in packmail) -* redis: Remount /usr with RW before adding nagios plugin - -## [22.03] 2022-03-02 - -### Added - -* apt: apt_hold_packages: broadcast message with wall, if present -* evolinux-base: option to bypass raid-related tasks -* Explicit permissions for systemd overrides -* generate-ldif: Add support for php-fpm in containers -* kvm-host: add missing default value -* lxc-php: preliminary support for PHP 8.1 container -* openvpn: now check that openvpn has been restarted since last certificates renewal -* redis: always install check_redis_instances -* redis: check_redis_instances tolerates absence of instances - -### Changed - -* elasticsearch: Use `/etc/elasticsearch/jvm.options.d/evolinux` instead of default `/etc/elasticsearch/jvm.options` -* evolinux-users: check permissions for /etc/sudoers.d -* evolinux-users: optimize sudo configuration -* lxc: Fail if /var is nosuid -* openvpn: make it compatible with OpenBSD and add some improvements - -## [22.01.3] 2022-01-31 - -### Changed - -* rbenv: install Ruby 3.1.0 by default -* evolinux-base: backup-server-state: add "force" mode - -### Fixed - -* evolinux-base: backup-server-state: fix systemctl invocation -* varnish: update munin plugin to work with recent varnish versions - -## [22.01.2] 2022-01-27 - -### Changed - -* evolinux-base: many improvements for backup-server-state script -* remount-usr: use findmnt to find if usr is a readonly partition - -## [22.01] 2022-01-25 - -### Added - -* Support for Debian 11 « Bullseye » (with possible remaining blind spots) -* apache: new variable for MPM mode (+ updated default config accordingly) -* apache: prevent accessing Git or "env" related files -* certbot: add script for manual deploy hooks execution -* docker-host: install additional dependencies -* dovecot: switch to TLS 1.2+ and external DH params -* etc-git: centralize cron jobs in dedicated crontab -* etc-git: manage commits with an optimized shell script instead of many slow Ansible tasks -* evolinux-base: add script backup-server-state -* evolinux-base: configure top and htop to display the swap column -* evolinux-base: install molly-guard by default -* generate-ldif: detect RAID controller -* generate-ldif: detect mdadm -* listupgrade: crontab is configurable -* logstash: logging to syslog is configurable (default: True) -* mongodb: create munin plugins directory if missing -* munin: systemd override to unprotect home directory -* mysql: add evomariabackup 21.11 -* mysql: improve Bullseye compatibility -* mysql: script "mysql_connections" to display a compact list of connections -* mysql: script "mysql-queries-killer.sh" to kill MySQL queries -* nagios-nrpe + evolinux-users: new check for ipmi -* nagios-nrpe + evolinux-users: new check for RAID (soft + hard) -* nagios-nrpe + evolinux-users: new checks for bkctld -* nagios-nrpe: new check influxdb -* openvpn: new role (beta) -* redis: instance service for Debian 11 -* squid: add *.o.lencr.org to default whitelist - -### Changed - -* Change version pattern -* Install python 2 or 3 libraries according to running python version -* Remove embedded GPG keys only if legacy keyring is present -* apt: remove workaround for Evolix public repositories with Debian 11 -* apt: upgrade packages after all the configuration is done -* apt: use the new security repository for Bullseye -* certbot: silence letsencrypt deprecation warnings -* elasticsearch: elastic_stack_version = 7.x -* evoacme: exclude renewal-hooks directory from cron -* evoadmin-web: simpler PHP packages lists -* evocheck: upstream release 21.10.4 -* evolinux-base: alert5 comes after the network -* evolinux-base: force Debian version to buster for Evolix repository (temporary) -* evolinux-base: install freeipmi by default on dedicated hw -* evolinux-base: logs are rotated with dateext by default -* evolinux-base: split dpkg logrotate configuration -* evolinux-users + nagios-nrpe: Add support for php-fpm80 in lxc -* evomaintenance: extract a config.yml tasks file -* evomaintenance: upstream release 22.01 -* filebeat/metricbeat: elastic_stack_version = 7.x -* kibana: elastic_stack_version = 7.x -* listupgrade: old-kernel-removal version 21.10 -* listupgrade: upstream release 21.06.3 -* logstash: elastic_stack_version = 7.x -* mongodb: Allow to specify a mongodb version for buster & bullseye -* mongodb: Deny the install on Debian 11 « Bullseye » when the version is unsupported -* mongodb: Support version 5.0 (for buster) -* mysql: use python3 and mariadb-client-10.5 with Debian 11 and later -* nodejs: default to version 16 LTS -* php: enforce Debian version with assert instead of fail -* squid: improve default whitelist (more specific patterns) -* squid: must be started in foreground mode for systemd -* squid: remove obsolete variable on Squid 4 - -### Fixed - -* evolinux-base: fix alert5.service dependency syntax -* certbot: sync_remote excludes itself -* lxc-php: fix config for opensmtpd on bullseye containers -* mysql : Create a default ~root/.my.cnf for compatibility reasons -* nginx : fix variable name and debug to actually use nginx-light -* packweb-apache : Support php 8.0 -* nagios-nrpe: Fix check_nfsserver for buster and bullseye - -### Removed - -* evocheck: package install is not supported anymore -* logstash: no more dependency on Java -* php: remove php-gettext for 7.4 - -## [10.6.0] 2021-06-28 - -### Added - -* Add Elastic GPG key to kibana, filebeat, logstash, metricbeat roles -* apache: new variable for mpm mode (+ updated default config accordingly) -* evolinux-base: add default motd template -* kvm-host: add migrate-vm script -* mysql: variable to disable myadd script overwrite (default: True) -* nodejs: update apt cache before installing the package -* squid: add Yarn apt repository in default whitelist - -### Changed - -* Update Galaxy metadata (company, platforms and galaxy_tags) -* Use 'loop' syntax instead of 'with_first_found/with_items/with_dict/with_nested/with_list' -* Use Ansible syntax used in Ansible 2.8+ -* apt: store keys in /etc/apt/trusted.gpg.d in ascii format -* certbot: sync_remote.sh is configurable -* evolinux-base: copy GPG key instead of using apt-key -* evomaintenance: upstream release 0.6.4 -* kvm-host: replace the "kvm-tools" package with scripts deployed by Ansible -* listupgrade: upstream release 21.06.2 -* nodejs: change GPG key name -* ntpd: Add leapfile configuration setting to ntpd on debian 10+ -* packweb-apache: install phpMyAdmin from buster-backports -* spamassassin: change dependency on evomaintenance -* squid: remove obsolete variable on Squid 4 - -### Fixed - -* add default (useless) value for file lookup (first_found) -* fix pipefail option for shell invocations -* elasticsearch: inline YAML formatting of seed_hosts and initial_master_nodes -* evolinux-base: fix motd lookup path -* ldap: fix edge cases where passwords were not set/get properly -* listupgrade: fix wget error + shellcheck cleanup - -### Removed - -* elasticsearch: recent versiond don't depend on external JRE - -## [10.5.1] 2021-04-13 - -### Added - -* haproxy: dedicated internal address/binding (without SSL) - -### Changed - -* etc-git: commit in /usr/share/scripts when there's an active repository - -## [10.5.0] 2021-04-01 - -### Added - -* apache: new variables for logrotate + server-status -* filebeat: package can be upgraded to latest (default: False) -* haproxy: possible admin access with login/pass -* lxc-php: Add PHP 7.4 support -* metricbeat: package can be upgraded to latest (default: False) -* metricbeat: new variables to configure SSL mode -* nagios-nrpe: new script check_phpfpm_multi -* nginx: add access to server status on default VHost -* postfix: add smtpd_relay_restrictions in configuration - -### Changed - -* apache: rotate logs daily instead of weekly -* apache: deny requests to ^/evolinux_fpm_status-.* -* certbot: use a fixed 1.9.0 version of the certbot-auto script (renamed "letsencrypt-auto") -* certbot: use the legacy script on Debian 8 and 9 -* elasticsearch: log rotation is more readable/maintainable -* evoacme: upstream release 21.01 -* evolinux-users: Add sudo rights for nagios for multi-php lxc -* listupgrade: update script from upstream -* minifirewall: change some defaults -* nagios-nrpe: update check_phpfpm_status.pl & install perl dependencies -* redis: use /run instead or /var/run -* redis: escape password in Munin configuration - -### Fixed - -* bind9: added log files to apparmor definition so bind can run -* filebeat: fix Ansible syntax error -* nagios-nrpe: libfcgi-client-perl is not available before Debian 10 -* redis: socket/pid directories have the correct permissions - -### Removed - -* nginx: no more "minimal" mode, but the package remains customizable. - -## [10.4.0] 2020-12-24 - -### Added - -* certbot: detect domains if missing -* certbot: new "sync_remote.sh" hook to sync certificates and execute hooks on remote servers -* varnish: variable for jail configuration - -### Changed - -* certbot: disable auth for Let's Encrypt challenge -* nginx: change from "nginx_status-XXX" to "server-status-XXX" - -## [10.3.0] 2020-12-21 - -### Added - -* bookworm-detect: transitional role to help dealing with unreleased bookworm version -* dovecot: Update munin plugin & configure it -* dovecot: vmail uid/gid are configurable -* evoacme: variable to disable Debian version check (default: False) -* kvm-host: Add drbd role dependency (toggleable with kvm_install_drbd) -* minifirewall: upstream release 20.12 -* minifirewall: add variables to force upgrade the script and the config (default: False) -* mysql: install save_mysql_processlist script -* nextcloud: New role to setup a nextcloud instance -* redis: variable to force use of port 6379 in instances mode -* redis: check maxmemory in NRPE check -* lxc-php: Allow php containers to contact local MySQL with localhost -* varnish: config file name is configurable - -### Changed - -* Create system users for vmail (dovecot) and evoadmin -* apt: disable APT Periodic -* evoacme: upstream release 20.12 -* evocheck: upstream release 20.12 -* evolinux-users: improve uid/login checks -* tomcat-instance: fail if uid already exists -* varnish: change template name for better readability -* varnish: no threadpool delay by default -* varnish: no custom reload script for Debian 10 and later - -### Fixed - -* cerbot: parse HAProxy config file only if HAProxy is found - -## [10.2.0] 2020-09-17 - -### Added - -* evoacme: remount /usr if necessary -* evolinux-base: swappiness is customizable -* evolinux-base: install wget -* tomcat: root directory owner/group are configurable - -### Changed - -* Change default public SSH/SFTP port from 2222 to 22222 - -### Fixed - -* certbot: an empty change shouldn't raise an exception -* certbot: fix "no-self-upgrade" option - -### Removed - -* evoacme: remove Debian 9 support - -## [10.1.0] 2020-08-21 - -### Added - -* certbot: detect HAProxy cert directory -* filebeat: allow using a template -* generate-ldif: add NVMe disk support -* haproxy: add deny_ips file to reject connections -* haproxy: add some comments to default config -* haproxy: enable stats frontend with access lists -* haproxy: preconfigure SSL with defaults -* lxc-php: Don't disable putenv() by default in PHP settings -* lxc-php: Install php-sqlite by default -* metricbeat: allow using a template -* mysql: activate binary logs by specifying log_bin path -* mysql: option to define as read only -* mysql: specify a custom server_id -* nagios-nrpe/evolinux-base: brand new check for hardware raid on HP servers gen 10 -* nginx: make default vhost configurable -* packweb-apache: Install zip & unzip by default -* php: Don't disable putenv() by default in PHP settings -* php: Install php-sqlite by default - -### Changed - -* certbot: fix haproxy hook (ssl cert directory detection) -* certbot: install certbot dependencies non-interactively for jessie -* elasticsearch: configure cluster with seed hosts and initial masters -* elasticsearch: set tmpdir before datadir -* evoacme: read values from environment before defaults file -* evoacme: update for new certbot role -* evoacme: upstream release 20.08 -* haproxy: adapt backports installed package list to distibution -* haproxy: chroot and socket path are configurable -* haproxy: deport SSL tuning to Mozilla SSL generator -* haproxy: rotate logs with date extension and immediate compression -* haproxy: split stats variables -* lxc-php: Do --no-install-recommends for ssmtp/opensmtpd -* mongodb: install custom munin plugins -* nginx: read server-status values before changing the config -* packweb-apache: Don't turn on mod-evasive emails by default -* redis: create sudoers file if missing -* redis: new syntax for match filter -* redis: raise an error is port 6379 is used in "instance" mode - -### Fixed - -* certbot: restore compatibility with old Nginx -* evobackup-client: fixed the ssh connection test -* generate-ldif: better detection of computerOS field -* generate-ldif: skip some odd ethernet devices -* lxc-php: Install opensmtpd as intended -* mongodb: fix logrotate patterm on Debian buster -* nagios-nrpe: check_amavis: updated regex -* squid: better regex to match sa-update domains -* varnish: fix start command when multiple addresses are present - -## [10.0.0] - 2020-05-13 - -### Added -* apache: the default VHost doesn't redirect to https for ".well-known" paths -* apt: added buster backports prerferences -* apt: check if cron is installed before adding a cron job -* apt: remove jessie/buster sources from Gandi servers -* apt: verify that /etc/evolinux is present -* certbot : new role to install and configure certbot -* etc-git: add versioning for /usr/share/scripts on Debian 10+ -* evoacme: upstream version 19.11 -* evolinux-base: default value for "evolinux_ssh_group" -* evolinux-base: install /sbin/deny -* evolinux-base: install Evocheck (default: `True`) -* evolinux-base: on debian 10 and later, add noexec on /dev/shm -* evolinux-base: on debian 10 and later, add /usr/share/scripts in root's PATH -* evolinux-base: remove the chrony package -* evomaintenance: don't configure firewall for database if not necessary -* generate-ldif: support MariaDB 10.3 -* haproxy: add a variable to keep the existing configuration -* java: add Java 11 as possible version to install -* listupgrade: install old-kernel-autoremoval script -* minifirewall: add a variable to force the check scripts update -* mongodb: mongodb: compatibility with Debian 10 -* mysql-oracle: backport tasks from mysql role -* networkd-to-ifconfig: add variables for configuration by variables -* packweb-apache: Deploy opcache.php to give some insights on PHP's opcache status -* php: variable to install the mysqlnd module instead of the default mysql module -* postgresql : variable to install PostGIS (default: `False`) -* redis: rewrite of the role (separate instances, better systemd units…) -* webapps/evoadmin-web Add an htpasswd to evoadmin if you cant use an apache IP whitelist -* webapps/evoadmin-web Overload templates if needed -* evolinux-base: install ssacli for HP Smart Array -* evobackup-client role to configure a machine for backups with bkctld(8) -* bind: enable query logging for recursive resolvers -* bind: enable logrotate for recursive resolvers -* bind: enable bind9 munin plugin for recursive resolvers - -### Changed -* replace version_compare() with version()s -* removed some deprecations for Ansible 2.7 -* apache: improve permissions in save_apache_status script -* apt: hold packages only if package is installed -* bind: the munin task was present, but not included -* bind: change name of logrotate file to bind9 -* certbot: commit hook must be executed at the end -* elasticsearch: listen on local interface only by default -* evocheck: upstream version 20.04.4 -* evocheck: cron jobs execute in verbose -* evolinux-base: use "evolinux_internal_group" for SSH authentication -* evolinux-base: Don't customize the logcheck recipient by default. -* evolinux-base: configure cciss-vol-statusd in the proper file -* evomaintenance: upstream release 0.6.3 -* evomaintenance: Turn on API by default (instead of DB) -* evomaintenance: install PG dependencies only when needed -* listupgrade: update from upstream -* lxc: rely on lxc_container module instead of command module -* lxc: remove useless loop in apt execution -* lxc: update our default template to be compatible with Debian 10 -* lxc-php: refactor tasks for better maintainability -* lxc-php: Use OpenSMTPD for Stretch/Buster containers, and ssmtp for Jessie containers -* lxc-solr: changed default Solr version to 8.4.1 -* minifirewall: better alert5 activation -* minifirewall: no http filtering by default -* minifirewall: /bin/true command doesn't report "changed" anymore -* nagios-nrpe: update check_redis_instances (same as redis role) -* nagios-nrpe: change default haproxy socket path -* nagios-nrpe: check_mode per cpu dynamically -* nodejs: change default version to 12 (new LTS) -* packweb-apache: Do the install & conffigure phpContainer script (instead of evoadmin-web role) -* php: By default, allow 128M for OpCache (instead of 64M) -* php: Don't set a chroot for the default fpm pool -* php: Make sure the default pool we define can be fully functionnal witout debian's default pool file -* php: Change the default pool names to something more explicit (and same for the variables names) -* php: Add a task to remove Debian's default FPM pool file (off by default) -* php: Cleanup CLI Settings. Also, allow url fopen and don't disable functions (in CLI only) -* postgresql : changed logrotate config to 10 days (and fixed permissions) -* rbenv: changed default Ruby version to 2.7.0 -* squid: Remove wait time when we turn off squid -* squid: compatibility wit Debian 10 -* tomcat: package version derived from Debian version if missing -* varnish: remove custom ExecReload= script for Debian 10+ - -### Fixed -* etc-git: fix warnings ansible-lint -* evoadmin-web: Put the php config at the right place for Buster -* lxc: Don't stop the container if it already exists -* lxc: Fix container existance check to be able to run in check_mode -* lxc-php: Don't remove the default pool -* minifirewall: fix warnings ansible-lint -* nginx: fix munin fcgi not working (missing chmod 660 on logs) -* php: add missing handler for php7.3-fpm -* roundcube: fix typo for roundcube vhost -* tomcat: fix typo for default tomcat_version -* evolinux-base: Fix our zsyslog rotate config that doesn't work on Debian 10 -* certbot: Properly evaluate when apache is installed -* evolinux-base: Don't make alert5.service executable as systemd will complain -* webapps/evoadmin-web: Set default evoadmin_mail_tpl_force to True to fix a regression where the mail template would not get updated because the file is created before the role is first run. -* minifirewall: Backport changes from minifirewall (properly open outgoing smtp(s)) -* minifirewall: Properly detect alert5.sh to turn on firewall at boot -* packweb-apache: Add missing dependency to evoacme role -* php: Chose the debian version repo archive for packages.sury.org -* php: update surry_post.yml to match current latest PHP release -* packweb-apache: Don't try to install PHPMyAdmin on Buster as it's not available - -### Removed -* clamav : do not install the zoo package anymore - -## [9.10.1] - 2019-06-21 - -### Changed -* evocheck : update (version 19.06) from upstream - -## [9.10.0] - 2019-06-21 - -### Added -* apache: add server status suffix in VHost (and default site) if missing -* apache: add a variable to customize the server-status host -* apt: add a script to manage packages with "hold" mark -* etc-git: gitignore /etc/letsencrypt/.certbot.lock -* evolinux-base: install "spectre-meltdown-checker" (Debian 10 and later) -* evomaintenance: make hooks configurable -* nginx: add server status suffix in VHost (and default site) if missing -* redmine: enable gzip compression in nginx vhost - -### Changed -* evocheck : update (unreleased) from upstream -* evomaintenance : use the web API instead of PG Insert -* fluentd: store gpg key locally -* rbenv: update defaults rbenv version to 1.1.2 and ruby version to 2.6.3 -* redmine: update default version to 4.0.3 -* nagios-nrpe: change required status code for http and https check -* redmine: use custom errors-pages in Nginx vhost -* nagios-nrpe: check_load is now based on ansible_processor_vcpus -* php: Stop enforcing /var/www/html as chroot while we use /var/www -* apt: Add Debian Buster repositories - -### Fixed -* rbenv: add check_mode for check rbenv and ruby versions -* nagios-nrpe: fix redis_instances check when Redis port equal 0 -* redmine: fix 500 error on logging -* evolinux-base: Validate sshd config with "-t" instead of "-T" -* evolinux-base: Ensure rename is present -* evolinux-users: Validate sshd config with "-t" instead of "-T" -* nagios-nrpe: Replace the dummy packages nagios-plugins-* with monitoring-plugins-* - -## [9.9.0] - 2019-04-16 - -### Added -* etc-git: ignore evobackup/.keep-* files -* lxc: /home is mounted in the container by default -* nginx : add "x-frame-options: sameorigin" for Munin - -### Changed -* changed remote repository to https://gitea.evolix.org/evolix/ansible-roles -* apt: Ensure jessie-backport from archives.debian.org is accepted -* apt: Remove jessie-update suite as it's no longer exists -* apt: Replace mirror.evolix.org by archives.debian.org for jessie-backport -* evocheck : update script from upstream -* evolinux-base: remove apt-listchanges on Stretch and later -* evomaintenance: embed version 0.5.0 -* opendkim: aligning roles with our conventions, major changes in opendkim-add.sh -* redis: higher limit of open files -* redis: set variables on inclusion, not with set_facts -* tomcat: better tomcat version management -* webapps/evoadmin-web: add dbadmin.sh to sudoers file - - -### Fixed -* spamassasin: fix sa-update.sh and ensure service is started and enabled -* tomcat-instance: deploy correct version of config files -* tomcat-instance: deploy correct version of server.xml - -## [9.8.0] - 2019-01-31 - -### Added -* filebeat: disable cloud_metadata processor by default -* metricbeat: disable cloud_metadata processor by default -* percona : new role to install Percona repositories and tools -* redis: add variable for configure unixsocketperm - -### Changed -* redmine: refactoring of redmine role with use of rbenv - -### Fixed -* ntpd: Update the restrictions to follow wiki.evolix.org/HowtoNTP client config - -## [9.7.0] - 2019-01-17 - -### Added -* apache: add Munin configuration for Apache server-status URL -* evomaintenance: database variables must be set or the task fails -* fail2ban: add "ips" tag added to fail2ban/tasks/ip_whitelist.yml -* metricbeat: add a variable for the protocol to use with Elasticsearch -* rbenv: add pkg-config to the list of packages to install -* redis: Configure munin when working in instance mode -* redis: add a variable for renamed/disabled commands -* redis: add a variable to disable the restart handler -* redis: add a variable to force a restart (even with no change) -* proftpd: add FTPS and SFTP support - -### Changed -* redis: distinction between main and master password -* evocheck: update evocheck.sh for source install -* php: added php-zip in the installed package list for debian 9 (and later) -* squid: added packagist.org in the whitelist -* java: update Oracle java package to 8u192 - -### Fixed -* fail2ban: fix "ignoreip" update -* metricbeat: fix username/password replacement -* nagios-nrpe: check_process now return the error code (making the check more usefull than /bin/true) -* nginx: Munin url config is now a template to insert the server-status prefix -* nodejs: Update yarn repo GPG key (current key expired) -* redis: In instance mode, ensure to replace the nrpe check_redis with the instance check script -* redis: Don't set the owner of /var/{lib,log}/redis to a redis instance account - - -## [9.6.0] - 2018-12-04 - -### Added -* evolinux-base: deploy custom motd if template are present -* minifirewall: all variables are configurable (untouched by default) -* minifirewall: main file is configurable -* squid: minifirewall main file is configurable - -### Changed -* minifirewall: compare config before/after (for restart condition) -* squid: better replacement in minifirewall config -* evoadmin-mail: complete refactoring, use Debian Package - -## [9.5.0] - 2018-11-14 - -### Added -* apache: separate task to update IP whitelist -* evolinux-base: install man package -* evolinux-users: add newaliases handler -* evomaintenance: FROM domain is configurable -* fail2ban: separate task to update IP whitelist -* nginx: add tag for ips management -* nginx: separate task to update IP whitelist -* postfix: enable SSL/TLS client -* ssl: add an SSL role for certificates deployment -* haproxy: add vars for tls configuration -* mysql: logdir can be customized - -### Changed -* evocheck: update script from upstream -* evomaintenance: update script from upstream -* mysql: restart service if systemd unit has been patched - -### Fixed -* packweb-apache: mod-security config is already included elsewhere -* redis: for permissions on log and lib directories -* redis: fix shell for instance users -* evoacme: fix error handling in sed_cert_path_for_(apache|nginx) - -## [9.4.2] - 2018-10-12 - -### Added -* evomaintenance: install dependencies manually when installing vendored version -* nagios-nrpe: add an option to ignore servers in NOLB status - -### Changed -* haproxy: move check_haproxy_stats to nagios-nrpe role - -### Fixed -* evoacme: better error when apache2ctl fails -* evomaintenance: fix role compatibility with OpenBSD -* spamassassin: add missing right for amavis -* amavis: fix output result checking - -## [9.4.1] - 2018-09-28 - -### Added -* redis: set masterauth when redis_password is defined -* evomaintenance: variable to install a vendored version -* evomaintenance: tasks/variables to handle minifirewall restarts - -### Changed -* mysql-oracle: better handle packages and users - -## [9.4.0] - 2018-09-20 - -### Added -* etc-git: manage a cron job to monitor uncommited changes in /etc/.git (default: `True`) -* evolinux-base: better shell history -* evolinux-users: add user to /etc/aliases -* generate-ldif: add a section for postgresql -* logstash: tmp directory can be customized -* logstash: max memory is set to 512M by default -* logstash: version 6.x is installed by default -* mysql: add a variable to prevent mysql from restarting -* networkd-to-ifconfig: add a role to switch from networkd to ifconfig -* webapps/evoadmin-web: add users to /etc/aliases -* redis: add support for multi instances -* nagios-nrpe: add check_redis_instances - -### Changed -* dovecot: stronger TLS configuration - -### Fixed -* apache: cleaner way to overwrite the server status suffix -* packweb-apache: don't regenerate phpMyAdmin suffix each time -* nginx: cleaner way to overwrite the server status suffix -* redis: add missing tags - -## [9.3.2] - 2018-09-06 - -### Added -* minifirewall: add a variable to disable the restart handler -* minifirewall: add a variable to force a restart of the firewall (even with no change) -* minifirewall: improve variables values and documentation - -### Changed -* dovecot: enable SSL/TLS by default with snakeoil certificate - -### Fixed - -### Security - -## [9.3.1] - 2018-08-30 - -### Added -* metricbeat: new variables to configure elasticsearch hosts and auth - -## [9.3.0] - 2018-08-24 - -### Added -* elasticsearch: tmpdir configuration compatible with 5.x also -* elasticsearch: add http.publish_host variable -* evoacme: disable old certbot cron also in cron.daily -* evocheck: detect installed packages even if "held" by APT (manual fix) -* evocheck: the crontab is updated by the role (default: `True`) -* evolinux-base: add mail related aliases -* evolinux-todo: new role, to help maintain a file of todo tasks -* fail2ban: add a variable to disable the ssh filter (default: `False`) -* etc-git: install a script to optimize the repository each month -* fail2ban: add a variable to update the list of ignored IP addresses/blocs (default: `False`) -* generate-ldif: detect installed packages even if "held" by APT -* java: support for Oracle JRE -* kibana: log messages go to /var/log/kibana/kibana.log -* metricbeat: add a role (copied from filebeat) -* munin: properly rename Munin cache directory -* mysql: add an option to install the client development libraries (default: `False`) -* mysql: add a few variables to customize the configuration -* nagios-nrpe: add check_postgrey - -### Changed -* etc-git: some entries of .gitignore are mandatory -* evocheck: update upstream script -* evolinux-base: improve hostname configuration (real vs. internal) -* evolinux-base: use the "evolinux-todo" role -* evolinux-users: add sudo permission for bkctld check -* java8: renamed to java (java8 symlinked to java for backward compatibility) -* minifirewall: the tail file can be overwritten, or not (default: `True`) -* nagios-nrpe: use bkctld internal check instead of nrpe plugin -* php: reorganization of the role for Sury overrides and more clear configuration -* redmine: use .my.cnf for mysql password -* rbenv: change default Ruby version (2.5.1) -* rbenv: switch from copy to lineinfile for default gems -* remount-usr: mount doesn't report a change -* squid: add a few news sites to the whitelist -* tomcat: better nrpe check output -* kvm-host: install kvm-tools package instead of copying add-vm.sh - -### Fixed -* apache: logrotate replacement is more subtle/precise. It replaces only the proper directive and not every occurence of the word. -* bind: chroot-bind.sh must not be executed in check mode -* evoacme: fix module detection in apache config -* fail2ban: fix fail2ban_ignore_ips definition -* mysql-oracle: fix configuration directory variable -* php: fpm slowlog needs an absolute path -* roundcube: add missing slash to https redirection - -## [9.2.0] - 2018-05-16 - -### Changed -* filebeat: install version 6.x by default -* filebeat: cleanup unused code -* squid: add some domaine and fix broken restrictions -* elasticsearch: defaults to version 6.x - -### Fixed -* evolinux-users: secondary groups are comma-separated -* ntpd: fix configuration (server and ACL) -* varnish: don't fork the process on startup with systemd - -## [9.1.9] - 2018-04-24 - -### Added - -### Changed -* apache: customize logrotate (52 weeks) -* evolinux: groups for SSH configuration are used with Debian 10 and later -* evolinux-base: fail2ban is not enabled by default -* evolinux-users: refactoring of the SSH configuration -* mysql-oracle: copy evolinux config files in mysql.cond.d -* mysql/mysql-oracle: mysqltuner cron scripts is 0755 -* generate-ldif: add a minifirewall service when /etc/default/minifirewall exists - -## [9.1.8] - 2018-04-16 - -### Changed -* packweb-apache: use dependencies instead of include_role for apache and php roles - -### Fixed -* mysql: use check_mode for apg command (Fix --check) -* mysql/mysql-oracle: properly reload systemd -* packweb-apache: use check_mode for apg command (Fix --check) - -## [9.1.7] - 2018-04-06 - -### Added -* added a few become attributes where missing -* etc-git: add tags for Ansible -* evolinux-base: install ncurses-term package -* haproxy: install Munin plugins -* listupgrade: add service restart notification for Squid and libstdc++6 -* minifirewall: add "check_minifirewall" Nagios plugin (and `minifirewall_status` script) -* mysql-oracle: new role to install MySQL 5.7 with Oracle packages -* mysql: remount /usr before creating scripts directory -* nagios-nrpe: add "check_open_files" plugin -* nagios-nrpe: mark plugins as executable -* nodejs: Yarn package manager can be installed (default: `false`) -* packweb-apache: choose mysql variant (default: `debian`) -* postfix: add lines in /etc/.gitignore -* proftpd: use "proftpd_accounts" list to manage ftp accounts -* redmine: added missing tags - -### Changed -* elasticsearch: RESTART_ON_UPGRADE is configurable (default: `true`) -* elasticsearch: use ES_TMPDIR variable for custom tmpdir, (from `/etc/default/elasticsearch` instead of changing `/etc/elesticsearch/jvm.options`). -* evolinux-base: Exec the firewall tasks sooner (to avoid dependency issues) -* evolinux-users: split AllowGroups/AllowUsers modes for SSH directives -* mongodb: allow unauthenticated packages for Jessie -* mongodb: configuration is forced by default but it's configurable (default: `false`) -* mongodb: rename logrotate script -* nagios-nrpe: mark plugins as executable -* nginx: don't debug variables in verbosity 0 -* nginx: package name can be specified (default: `nginx-full`) -* php: fix FPM custom file permissions -* php: more tasks notify FPM handler to restart if needed -* webapps/evoadmin-web: Fail if variable evoadmin_contact_email isn't defined - -### Fixed -* dovecot: fix support of plus sign -* mysql/mysql-oracle: mysqltuner cron task is executable -* nginx: fix basic auth for default vhost -* rbenv: fix become user issue with copy tasks - -## [9.1.6] - 2018-02-02 - -### Added -* mongodb: install python-pymongo for monitoring -* nagios-nrpe: allowed_hosts can be updated - -### Changed -* Changelog: explain the versioning scheme -* Changelog: add a release date for 9.1.5 -* evoacme: exclude typical certbot directories - -### Fixed -* fail2ban: fix horrible typo, Python is not Ruby -* nginx: fix servers status dirname - -## [9.1.5] - 2018-01-18 - -### Added -* There is a changelog! -* redis: configuration variable for protected mode (v3.2+) -* evolinux-users: users are in "adm" group for Debian 9 or later -* evolinx-base: purge locate/mlocate packages -* evolinx-base: create /etc/evolinux if missing -* many Ansible tags for easier fine grained execution of playbooks -* apache/nginx: server status suffix management -* unbound: retrieve list of root DNS servers -* redmine: ability to install themes and plugins - -### Changed -* rbenv: Ruby 2.5 becomes the default version -* evocheck: update upstream version embedded in role (c993244) -* bind: keep 52 weeks of logs - -### Fixed -* squid: different logrotate file for Jessie or Stretch+ -* evoacme: don't invoke evoacme if no vhost is found -* evomaintenance: explicit quotes in config file -* redmine: force xpath gem < 3.0.0 - -### Security -* evomaintenance: fix permissions for config file - -## [9.1.4] - 2017-12-20 - -### Added -* php: install php5-intl (for Jessie) and php-intl (for Debian 9 or later) -* mysql: add a check_mysql_slave in nrpe configuration -* ldap: slapd tcp port is configurable -* elasticsearch: broader patterns for log rotation - -### Changed -* split IP lists in 2 – default and additional – for easier customization. - -### Fixed -* minifirewall: allow outgoing SSH connections over IPv6 -* nodejs: rename source.list file - -### Security -* evoadmin-web: change config.local.php file permissions -* evolinux-base: change default_www file permissions - -## [9.1.3] 2017-12-08 - -### Added -* evolinux-base: install traceroute package -* evolinux-base/ntpd: purge openntpd -* tomcat: add Tomcat 8 cmpatibility -* log2mail: add "The total blob data length" pattern for MySQL -* nagios-nrpe: add bkctld check in evolix.cfg -* varnish: reload or restart if needed -* rabbitmq: add a munin plugin and an NRPE check -* minifirewall: add debug for variables -* elastic: option for stack main version - -### Changed -* nginx: rename Let's Encrypt snippet -* nginx: simpler apt preferences for backports -* generate-ldif: add clamd service instead of clamav_db -* mysql: parameterize evolinux config files -* rbenv: use Rbenv 1.1.1 and Ruby 2.4.2 by default -* elasticsearch: update curator debian repository -* evoacme: crontab management -* evoacme: better documentation -* mongodb: comatible with Stretch - -### Removed -* mongodb: logfile/pidfile are not configurable on Jessie -* minifirewall: remove zidane.evolix.net from HTTPSITES - -### Fixed -* nginx: fix munin CGI graphs -* ntpd: fix default configuration (localhost only) -* logstash: fix permissions on pipeline configuration -* postfix/spamassassin: add user in cron job -* php: php.ini custom file are now readable -* hostname customization needs the dbus package - -## [9.1.2] 2017-12-05 - -### Fixed -* listupgrade: remount /usr as rw - -## [9.1.1] 2017-11-21 - -### Added -* amazon-ec2: add egress rules - -### Fixed -* evoacme: fix multiple bugs - -## [9.1.0] 2017-11-19 - -_Warning: huge release, many entries are missing below._ - -### Added -* amazon-ec2: new role, for EC2 instances creation -* Move /usr rw remount into remount-usr role -* kibana: host and basepath configuration -* kibana: move optimize and data to /var -* logstash: daily job for log rotation -* elasticsearch: daily job for log rotation -* roundcube: add link in default site index -* nagios-nrpe: add opendkim check - -### Changed -* Combine evolix and additional trusted IP addresses -* amazon-ec2: split tasks -* apt: don't upgrade by default -* postfix: extract main.cf md5sum into variables -* evolinux-base: cache hwraid pgp key locally -* evoacme: improve cron task -* elasticsearch: use elastic.list APT source list for curator -* ldap: better variables - -### Fixed -* fail2ban: create config hierarchy beforehand -* elasticsearch: fix datadir/tmpdir conditions -* elastic: remove double ".list" suffix -* nagios-nrpe: fix check_free_mem for OpenBSD 6.2 -* nagios-nrpe: fix check_amavis - -### Removed - -### Security - - -## [9.0.1] 2017-10-02 - -### Added -* haproxy: add a Nagios check -* php: add "sury" mode for PHP 7.1 on Stretch -* minifirewall: explicit dependency on iptables -* apt: remove Gandi source files -* docker-host: new variable for docker home - -### Changed -* php: install php5/php package after fpm/libapache2-mod-php - -### Fixed -* mysql: add "REPLICATION CLIENT" privilege for nrpe -* evoadmin-web: revert from variables to keywords in the templates -* evoacme: many fixes -* etc-git: detect user if root (without su or sudo) -* docker-host: clean override of docker systemd unit -* varnish: fix systemd unit override - -## [9.0.0] 2017-09-19 - -First official release From 8e99b9fcb8e958a7e49df489fb158e0d9c5dabee Mon Sep 17 00:00:00 2001 From: David Prevot Date: Thu, 27 Jul 2023 14:50:54 +0200 Subject: [PATCH 074/182] Use our current repository even in comments --- lxc-php/tasks/php80.yml | 2 +- lxc-php/tasks/php81.yml | 2 +- lxc-php/tasks/php82.yml | 2 +- minifirewall/files/minifirewall.legacy.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lxc-php/tasks/php80.yml b/lxc-php/tasks/php80.yml index 1fd37dea..0329d8b5 100644 --- a/lxc-php/tasks/php80.yml +++ b/lxc-php/tasks/php80.yml @@ -35,7 +35,7 @@ owner: root group: root -- name: copy pub.evolix.net GPG key +- name: copy pub.evolix.org GPG key ansible.builtin.copy: src: pub_evolix.asc dest: "{{ lxc_rootfs }}{{ lxc_apt_keyring_dir }}/pub_evolix.asc" diff --git a/lxc-php/tasks/php81.yml b/lxc-php/tasks/php81.yml index b9460215..67b50a28 100644 --- a/lxc-php/tasks/php81.yml +++ b/lxc-php/tasks/php81.yml @@ -34,7 +34,7 @@ owner: root group: root -- name: copy pub.evolix.net GPG key +- name: copy pub.evolix.org GPG key ansible.builtin.copy: src: pub_evolix.asc dest: "{{ lxc_rootfs }}{{ lxc_apt_keyring_dir }}/pub_evolix.asc" diff --git a/lxc-php/tasks/php82.yml b/lxc-php/tasks/php82.yml index a40af195..8a292056 100644 --- a/lxc-php/tasks/php82.yml +++ b/lxc-php/tasks/php82.yml @@ -34,7 +34,7 @@ owner: root group: root -- name: copy pub.evolix.net GPG key +- name: copy pub.evolix.org GPG key ansible.builtin.copy: src: pub_evolix.asc dest: /var/lib/lxc/{{ lxc_php_version }}/rootfs{{ apt_keyring_dir }}/pub_evolix.asc diff --git a/minifirewall/files/minifirewall.legacy.conf b/minifirewall/files/minifirewall.legacy.conf index b63ad7d8..00ff62c6 100644 --- a/minifirewall/files/minifirewall.legacy.conf +++ b/minifirewall/files/minifirewall.legacy.conf @@ -55,7 +55,7 @@ DNSSERVEURS='0.0.0.0/0' # HTTP authorizations # (you can use DNS names but set cron to reload minifirewall regularly) # (if you have HTTP proxy, set 0.0.0.0/0) -# HTTPSITES='security.debian.org pub.evolix.net security-cdn.debian.org mirror.evolix.org backports.debian.org hwraid.le-vert.net antispam00.evolix.org spamassassin.apache.org sa-update.space-pro.be sa-update.secnap.net www.sa-update.pccc.com sa-update.dnswl.org ocsp.int-x3.letsencrypt.org deb.freexian.com' +# HTTPSITES='security.debian.org pub.evolix.org security-cdn.debian.org mirror.evolix.org backports.debian.org hwraid.le-vert.net antispam00.evolix.org spamassassin.apache.org sa-update.space-pro.be sa-update.secnap.net www.sa-update.pccc.com sa-update.dnswl.org ocsp.int-x3.letsencrypt.org deb.freexian.com' HTTPSITES='0.0.0.0/0' # HTTPS authorizations From e6ef4396f34799c58b16648bf459ecaa61d817cf Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 28 Jul 2023 12:00:31 +0200 Subject: [PATCH 075/182] postfix: minor modifs spamp.sh --- postfix/files/spam.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/postfix/files/spam.sh b/postfix/files/spam.sh index 8ad7125e..29dc0b40 100644 --- a/postfix/files/spam.sh +++ b/postfix/files/spam.sh @@ -25,7 +25,7 @@ function is_new { function download { cd "${tmp_dir}" wget -q -t 3 "${data_url}/${1}" -O "${1}" - wget -q -t 3 "${data_url}/${1}.md5" -O "${1}.md5" + wget -q -t 3 "${data_url}/${1}.md5" -O "${1}.md5" } function check_integrity { @@ -39,6 +39,7 @@ function cleanup { rm -f "$tmp_dir"/*.md5.new } +# Postfix postfix_dbs="client.access sender.access recipient.access header_kill sa-blacklist.access spamd.cidr" for db in ${postfix_dbs}; do if is_new "${db}"; then @@ -61,7 +62,7 @@ if is_installed spamassassin; then if is_new "${sa_db}"; then download "${sa_db}" if check_integrity "${sa_db}"; then - cp ${tmp_dir}/evolix_rules.cf /etc/spamassassin + cp "${tmp_dir}/${sa_db}" /etc/spamassassin/ /etc/init.d/spamassassin reload > /dev/null if [ -d /etc/spamassassin/sa-update-hooks.d ]; then run-parts --lsbsysinit /etc/spamassassin/sa-update-hooks.d From 7e193e491678448cae5b14e337f0e342af907ade Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 28 Jul 2023 12:01:13 +0200 Subject: [PATCH 076/182] nagios-nrpe: improve check-local completion --- nagios-nrpe/files/check-local_completion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nagios-nrpe/files/check-local_completion b/nagios-nrpe/files/check-local_completion index 174ae061..62a523be 100644 --- a/nagios-nrpe/files/check-local_completion +++ b/nagios-nrpe/files/check-local_completion @@ -4,7 +4,7 @@ _check_local_dynamic_completion() { local cur; cur=${COMP_WORDS[COMP_CWORD]}; COMPREPLY=(); - COMPREPLY=( $( compgen -W '$(grep check_ /etc/nagios/nrpe.d/evolix.cfg | grep -vE "^[[:blank:]]*#" | awk -F"[\\\[\\\]=_]" "{print \$3}")' -- $cur ) ); + COMPREPLY=( $( compgen -W '$(grep "\[check_ /etc/nagios/nrpe.d/evolix.cfg | grep -vE "^[[:blank:]]*#" | awk -F"[\\\[\\\]=]" "{print \$2}" | sed "s/check_//")' -- $cur ) ); } complete -F _check_local_dynamic_completion check-local From 16bba8b4692ca6276ae8fec0f19f9c6fde8f22e0 Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Mon, 31 Jul 2023 11:50:36 +0200 Subject: [PATCH 077/182] fail2ban: add variable fail2ban_sshd_port to configure sshd port --- CHANGELOG.md | 1 + fail2ban/defaults/main.yml | 1 + fail2ban/templates/jail.local.j2 | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b49d6af5..1c14450d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * dovecot: fix old_stats plugin for Dovecot 2.3. * evolinux: Install HPE Agentless Management Service (amsd) * fail2ban: add default variable fail2ban_dbpurgeage_default +* fail2ban: add variable fail2ban_sshd_port to configure sshd port * nagios-nrpe: add a NRPE check-local command with completion. * policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory * userlogrotate: rotate also php.log. diff --git a/fail2ban/defaults/main.yml b/fail2ban/defaults/main.yml index 78862cb4..b4b3fda8 100644 --- a/fail2ban/defaults/main.yml +++ b/fail2ban/defaults/main.yml @@ -23,6 +23,7 @@ fail2ban_default_findtime: 10m fail2ban_default_action: "action_" fail2ban_sshd: True +fail2ban_sshd_port: "ssh,2222,22222" fail2ban_sshd_maxretry: 10 fail2ban_sshd_bantime: "{{ fail2ban_default_bantime }}" fail2ban_sshd_findtime: "{{ fail2ban_default_findtime }}" diff --git a/fail2ban/templates/jail.local.j2 b/fail2ban/templates/jail.local.j2 index 6713c92e..a1247f69 100644 --- a/fail2ban/templates/jail.local.j2 +++ b/fail2ban/templates/jail.local.j2 @@ -21,7 +21,7 @@ action = %({{ fail2ban_default_action }})s [sshd] enabled = {{ fail2ban_sshd }} -port = ssh,2222,22222 +port = {{ fail2ban_sshd_port }} maxretry = {{ fail2ban_sshd_maxretry }} findtime = {{ fail2ban_sshd_findtime }} From bc714c5ac86707619e5418abc398c1be95b3698f Mon Sep 17 00:00:00 2001 From: David Prevot Date: Mon, 31 Jul 2023 18:29:42 +0200 Subject: [PATCH 078/182] Prepare lxc-php82 on Bookworm (not yet by default) --- lxc-php/tasks/php82.yml | 21 +++++++++++++++++++-- lxc-php/templates/sury.sources.j2 | 8 ++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 lxc-php/templates/sury.sources.j2 diff --git a/lxc-php/tasks/php82.yml b/lxc-php/tasks/php82.yml index 8a292056..acb47f76 100644 --- a/lxc-php/tasks/php82.yml +++ b/lxc-php/tasks/php82.yml @@ -1,8 +1,14 @@ --- -- name: set APT keyring +- name: set APT keyring (Debian <12) ansible.builtin.set_fact: lxc_apt_keyring_dir: /etc/apt/trusted.gpg.d + when: ansible_distribution_major_version is version('12', '<') + +- name: set APT keyring (Debian >=12) + ansible.builtin.set_fact: + lxc_apt_keyring_dir: /etc/apt/keyrings + when: ansible_distribution_major_version is version('12', '>=') - name: "{{ lxc_php_version }} - Install dependency packages" community.general.lxc_container: @@ -15,7 +21,16 @@ regexp: 'bullseye/updates' replace: 'bullseye-security' -- name: "{{ lxc_php_version }} - Add sury repo" +- name: "{{ lxc_php_version }} - Add sury repo (Debian >=12)" + ansible.builtin.template: + src: sury.sources.j2 + dest: /etc/apt/sources.list.d/sury.sources + mode: "0644" + force: true + register: sury_sources + when: ansible_distribution_major_version is version('12', '>=') + +- name: "{{ lxc_php_version }} - Add sury repo (Debian <12)" ansible.builtin.lineinfile: dest: "{{ lxc_rootfs }}/etc/apt/sources.list.d/sury.list" line: "{{ item }}" @@ -25,6 +40,7 @@ loop: - "deb [signed-by={{ apt_keyring_dir }}/sury.gpg] https://packages.sury.org/php/ bullseye main" - "deb [signed-by={{ apt_keyring_dir }}/pub_evolix.asc] http://pub.evolix.org/evolix bullseye-php82 main" + when: ansible_distribution_major_version is version('12', '<') - name: "Ensure {{ lxc_rootfs }}{{ apt_keyring_dir }} directory exists" file: @@ -41,6 +57,7 @@ mode: "0644" owner: root group: root + when: ansible_distribution_major_version is version('12', '<') - name: copy packages.sury.org GPG Key ansible.builtin.copy: diff --git a/lxc-php/templates/sury.sources.j2 b/lxc-php/templates/sury.sources.j2 new file mode 100644 index 00000000..7d8a95c5 --- /dev/null +++ b/lxc-php/templates/sury.sources.j2 @@ -0,0 +1,8 @@ +# {{ ansible_managed }} + +Types: deb +URIs: https://packages.sury.org/php/ +Suites: {{ ansible_distribution_release }} +Components: main +Signed-by: {{ apt_keyring_dir }}/sury.gpg +Enabled: yes \ No newline at end of file From 05715d92f337ef2c79d04e1497e10b3bf85504e4 Mon Sep 17 00:00:00 2001 From: David Prevot Date: Mon, 31 Jul 2023 18:30:08 +0200 Subject: [PATCH 079/182] Fix template has no state --- php/tasks/sury_pre.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/php/tasks/sury_pre.yml b/php/tasks/sury_pre.yml index ab51d4ed..d38efe13 100644 --- a/php/tasks/sury_pre.yml +++ b/php/tasks/sury_pre.yml @@ -57,7 +57,8 @@ ansible.builtin.template: src: sury.sources.j2 dest: /etc/apt/sources.list.d/sury.sources - state: present + mode: "0644" + force: true register: sury_sources when: ansible_distribution_major_version is version('12', '>=') From 3ce412341f6894a686e637b66aaaa353679cbf18 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 1 Aug 2023 23:00:11 +0200 Subject: [PATCH 080/182] dump-server-state: upstream release 23.08 --- evolinux-base/files/dump-server-state.sh | 27 ++++++++++++++---------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/evolinux-base/files/dump-server-state.sh b/evolinux-base/files/dump-server-state.sh index 5f76413f..8ed50c7a 100644 --- a/evolinux-base/files/dump-server-state.sh +++ b/evolinux-base/files/dump-server-state.sh @@ -3,7 +3,7 @@ PROGNAME="dump-server-state" REPOSITORY="https://gitea.evolix.org/evolix/dump-server-state" -VERSION="22.04.3" +VERSION="23.08" readonly VERSION dump_dir= @@ -15,7 +15,7 @@ show_version() { cat <, +Copyright 2018-2023 Evolix , Jérémy Lecour , Éric Morino , Brice Waegeneire @@ -23,7 +23,7 @@ Copyright 2018-2022 Evolix , ${REPOSITORY} -${PROGNAME} comes with ABSOLUTELY NO WARRANTY.This is free software, +${PROGNAME} comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public License v3.0 for details. END @@ -442,14 +442,14 @@ task_iptables() { printf "\n#### ip6tables --table mangle --list ###############\n" ${ip6tables_bin} --table mangle --list --numeric --verbose --line-numbers fi - } > "${dump_dir}/iptables-v.txt") + } > "${dump_dir}/iptables-v.txt") 2> "${dump_dir}/iptables-v.err" last_rc=$? if [ ${last_rc} -eq 0 ]; then debug "* iptables -v OK" else debug "* iptables -v ERROR" - debug "${last_result}" + debug "$(cat ${dump_dir}/iptables-v.err)" # Ignore errors because we don't know if this is nft related or a real error # rc=10 fi @@ -467,14 +467,14 @@ task_iptables() { printf "\n#### ip6tables --table mangle --list ###############\n" ${ip6tables_bin} --table mangle --list --numeric fi - } > "${dump_dir}/iptables.txt") + } > "${dump_dir}/iptables.txt") 2> "${dump_dir}/iptables.err" last_rc=$? if [ ${last_rc} -eq 0 ]; then debug "* iptables OK" else debug "* iptables ERROR" - debug "${last_result}" + debug "$(cat ${dump_dir}/iptables.err)" # Ignore errors because we don't know if this is nft related or a real error # rc=10 fi @@ -485,14 +485,14 @@ task_iptables() { iptables_save_bin=$(command -v iptables-save) if [ -n "${iptables_save_bin}" ]; then - last_result=$(${iptables_save_bin} > "${dump_dir}/iptables-save.txt") + ${iptables_save_bin} > "${dump_dir}/iptables-save.txt" 2> "${dump_dir}/iptables-save.err" last_rc=$? if [ ${last_rc} -eq 0 ]; then debug "* iptables-save OK" else debug "* iptables-save ERROR" - debug "${last_result}" + debug "$(cat ${dump_dir}/iptables-save.err)" # Ignore errors because we don't know if this is nft related or a real error # rc=10 fi @@ -503,14 +503,14 @@ task_iptables() { nft_bin=$(command -v nft) if [ -n "${nft_bin}" ]; then - last_result=$(${nft_bin} list ruleset > "${dump_dir}/nft-ruleset.txt") + ${nft_bin} list ruleset > "${dump_dir}/nft-ruleset.txt" 2> "${dump_dir}/nft-ruleset.err" last_rc=$? if [ ${last_rc} -eq 0 ]; then debug "* nft ruleset OK" else debug "* nft ruleset ERROR" - debug "${last_result}" + debug "$(cat ${dump_dir}/nft-ruleset.err)" rc=10 fi fi @@ -762,6 +762,10 @@ task_systemctl() { fi } +clean_empty_error_file() { + find "${dump_dir}" -type f -name "*.err" -size 0 -delete +} + main() { if [ -z "${dump_dir}" ]; then echo "ERROR: You must provide the --dump-dir argument" >&2 @@ -841,6 +845,7 @@ main() { task_systemctl fi + clean_empty_error_file debug "=> Your dump is available at ${dump_dir}" exit ${rc} From eca010d9593a0000f01d1025c859b4dff954e1ca Mon Sep 17 00:00:00 2001 From: Eric Morino Date: Fri, 4 Aug 2023 09:56:44 +0200 Subject: [PATCH 081/182] postgresql: fix task "update apt cache" for PGDG repo --- CHANGELOG.md | 1 + postgresql/tasks/pgdg-repo.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c14450d..d948e74c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * postfix (packmail) : optimize Amavis integration * redis: standardize plugins path from /usr/local/share/munin/ to /usr/local/lib/munin/plugins/ * postfix: new spam.sh update script that avoids reloading if files did not change. +* postgresql: fix task "update apt cache" for PGDG repo ### Fixed diff --git a/postgresql/tasks/pgdg-repo.yml b/postgresql/tasks/pgdg-repo.yml index 2aa2f8a9..7df2a722 100644 --- a/postgresql/tasks/pgdg-repo.yml +++ b/postgresql/tasks/pgdg-repo.yml @@ -43,7 +43,7 @@ - name: Update APT cache ansible.builtin.apt: update_cache: yes - when: elastic_sources is changed + when: postgresql_sources is changed - name: Add APT preference file ansible.builtin.template: From 87d09275a0971fa195fc709702cd02c1df90987b Mon Sep 17 00:00:00 2001 From: Eric Morino Date: Fri, 4 Aug 2023 10:14:37 +0200 Subject: [PATCH 082/182] postgresql: fix file postgresql.pref.j2 for exclude package --- CHANGELOG.md | 1 + postgresql/templates/postgresql.pref.j2 | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d948e74c..12d504e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * redis: standardize plugins path from /usr/local/share/munin/ to /usr/local/lib/munin/plugins/ * postfix: new spam.sh update script that avoids reloading if files did not change. * postgresql: fix task "update apt cache" for PGDG repo +* postgresql: fix file postgresql.pref.j2 for exclude package ### Fixed diff --git a/postgresql/templates/postgresql.pref.j2 b/postgresql/templates/postgresql.pref.j2 index 5d252e05..40b500a9 100644 --- a/postgresql/templates/postgresql.pref.j2 +++ b/postgresql/templates/postgresql.pref.j2 @@ -1,3 +1,8 @@ Package: postgresql-{{ postgresql_version }} postgresql-client-common postgresql-common libpq5 ptop Pin: release a={{ ansible_distribution_release }}-pgdg Pin-Priority: 999 + +Package: * +Pin: release a=buster-pgdg +Pin-Priority: 1 + From f0abb53750ba7530c5eb9365e5d7243c52ea7607 Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Fri, 4 Aug 2023 11:47:42 +0200 Subject: [PATCH 083/182] evolinux-base: New variable "evolinux_system_include_ntpd" to chose wether or not to include ntpd role --- CHANGELOG.md | 1 + evolinux-base/defaults/main.yml | 1 + evolinux-base/tasks/system.yml | 2 ++ 3 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12d504e7..b89b63ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) * dovecot: fix old_stats plugin for Dovecot 2.3. * evolinux: Install HPE Agentless Management Service (amsd) +* evolinux-base: New variable "evolinux_system_include_ntpd" to chose wether or not to include ntpd role * fail2ban: add default variable fail2ban_dbpurgeage_default * fail2ban: add variable fail2ban_sshd_port to configure sshd port * nagios-nrpe: add a NRPE check-local command with completion. diff --git a/evolinux-base/defaults/main.yml b/evolinux-base/defaults/main.yml index 497a3d2b..025196e9 100644 --- a/evolinux-base/defaults/main.yml +++ b/evolinux-base/defaults/main.yml @@ -103,6 +103,7 @@ evolinux_system_locales: True evolinux_system_set_timezone: True evolinux_system_timezone: "Europe/Paris" +evolinux_system_include_ntpd: true evolinux_system_vim_skip_defaults: True evolinux_system_vim_default_editor: True diff --git a/evolinux-base/tasks/system.yml b/evolinux-base/tasks/system.yml index 8f3d7b03..67f4cc87 100644 --- a/evolinux-base/tasks/system.yml +++ b/evolinux-base/tasks/system.yml @@ -131,6 +131,8 @@ - ansible.builtin.include_role: name: evolix/ntpd + when: + - evolinux_system_include_ntpd | bool ## alert5 From a867da5ca9523a6bc4f071e7a119174c12815486 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Tue, 8 Aug 2023 16:53:47 +0200 Subject: [PATCH 084/182] nagios-nrpe: fix missing quote in check-local completion --- nagios-nrpe/files/check-local_completion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nagios-nrpe/files/check-local_completion b/nagios-nrpe/files/check-local_completion index 62a523be..d638ae24 100644 --- a/nagios-nrpe/files/check-local_completion +++ b/nagios-nrpe/files/check-local_completion @@ -4,7 +4,7 @@ _check_local_dynamic_completion() { local cur; cur=${COMP_WORDS[COMP_CWORD]}; COMPREPLY=(); - COMPREPLY=( $( compgen -W '$(grep "\[check_ /etc/nagios/nrpe.d/evolix.cfg | grep -vE "^[[:blank:]]*#" | awk -F"[\\\[\\\]=]" "{print \$2}" | sed "s/check_//")' -- $cur ) ); + COMPREPLY=( $( compgen -W '$(grep "\[check_" /etc/nagios/nrpe.d/evolix.cfg | grep -vE "^[[:blank:]]*#" | awk -F"[\\\[\\\]=]" "{print \$2}" | sed "s/check_//")' -- $cur ) ); } complete -F _check_local_dynamic_completion check-local From 204b8af59ba569cb289f45071be876f94e027e84 Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Wed, 9 Aug 2023 17:08:03 +0200 Subject: [PATCH 085/182] php: Add missing gpg key for pub.evolix.org (and remove reg.asc) Completes commit cc3fb051b00cc1161f2258fcc261c723ebbf1771 --- php/files/pub_evolix.asc | 87 ++++ php/files/reg.asc | 920 --------------------------------------- 2 files changed, 87 insertions(+), 920 deletions(-) create mode 100644 php/files/pub_evolix.asc delete mode 100644 php/files/reg.asc diff --git a/php/files/pub_evolix.asc b/php/files/pub_evolix.asc new file mode 100644 index 00000000..4a21bdfe --- /dev/null +++ b/php/files/pub_evolix.asc @@ -0,0 +1,87 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBGOsRdcBEADDPJ8Tsqr5Z4crmQlNQM32hfufe7gTUrXo0cAL8clt92y1QX3N +YyMv0Re4+Ugo7JZd4jsF2Q1twJMxsX5rA12xDnHHcZRSc/E0DIYvPnfLzEHkwseN +OK4f9lI+xo06k+B3KQQKMeI/RjVaN6AiSply9ZGaZVeGGqd4es4PsU1VQMTWdclV +Bn54HBWUnL5dPStPMnNkt0bMQYIqc5733Yby3qMiUKcql2bl9TYBw8SaJXvClsLw +ERqit6Fjlj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+IsUcFQpCyXMtcLRN75DGLIjIKdYrYJuwSiUgcH5FtgkuxMYfJEX9UX8rV7HAxUvs +UdIyHLl7k+khGlZa0/W6uCioFNiygnBEp7oP/iSj4Q2Xh5yKI6Jjw/IsfRcsiaac +lHc7uF0caYGMkqRNHiX17d5EtaidTbiqQii1W9slSPXmUuUcKfD1xUfLng7TbZVm +AdEbpHCT+q037cGCYFpHPMvw3OYhhGzYeh3+1oN9t3ZvyGlvAhkrtssDQB+gxX8r +adCpihziFLjm+6IvCLYHEh3gILVFbbhdYDDUduFFjf/snlJW7j8OVc7Cxa7FbPdf +SHLT9VESzf7oiwkP5/ijGmHiEQoJd9EWYkGGz+LZAXemBwe5ZnPPWVZvDEQRMe8v +2V8pa37vyReaK//O8xxGg3NzGTn9otwVr/4Ti9OxrSzmDWpd967oZ42IZSeSY2bz +kOaV8z4C8AIgIA7vWOS83Hncbrgf2nMCXmRjf0KTMm1P7Z0BQDWpxK9lP0nRpVAg +2T3/OjJ9KcAsTz02NFC3/kOUz//NcfDP747HsQB0sltIty140B7CfcWk0a0eKSad +OxGUehskjyKhO6v3dYF+8oR9p98Q8/Rh8r7evYy2mfhgJd7a9Cchn7612Y6k1SLf +nmPGYu3s0lf/k6GoHLfXXQIJDgWeua4ZBr6cgpGONLSvWBeCVaqnk8nhbNIiSBHk +jnrcX8xAtoPLgqg0+yi7rZ3NAauZcQE6UaNB+xjJxDOIpgVLUWtFyAG4MDeIh6GH +oA9QflpnDubMnCve +=ZCml +-----END PGP PUBLIC KEY BLOCK----- diff --git a/php/files/reg.asc b/php/files/reg.asc deleted file mode 100644 index 3fadeb07..00000000 --- a/php/files/reg.asc +++ /dev/null @@ -1,920 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: SKS 1.1.6 -Comment: Hostname: keyserver.ubuntu.com - -mQINBEoHZ5kBEAC680PjynWTcP3ZtVfWWL6zQAcD8JoC+c5MbnpFScqtBc2MdlVZu6zED+B5 -sw2SSLf1EZlfbT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QH6AHnORGS -g6FmBsbXSzosQOKWE3sO0dzjPIE6DRKwZIJmqQKvHqeAvPsC0U7JBWlKl0eMoIuDjp9qFDKz -BWcdiQ== -=iUyJ ------END PGP PUBLIC KEY BLOCK----- From 81849c6537fb29c8060dcd13546d931de9428bea Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 11 Aug 2023 10:51:45 +0200 Subject: [PATCH 086/182] userlogrotate: new version, with separate conf file --- CHANGELOG.md | 1 + userlogrotate/files/userlogrotate | 133 ++++++++++++++++++++++-------- 2 files changed, 101 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b89b63ca..adf6be36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * nagios-nrpe: add a NRPE check-local command with completion. * policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory * userlogrotate: rotate also php.log. +* userlogrotate: new version, with separate conf file * docker-host: added var for user namespace setting * dovecot: fix old_stats plugin for Dovecot 2.3. * dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) diff --git a/userlogrotate/files/userlogrotate b/userlogrotate/files/userlogrotate index ce8cc28a..9599d63b 100644 --- a/userlogrotate/files/userlogrotate +++ b/userlogrotate/files/userlogrotate @@ -1,58 +1,125 @@ #!/bin/bash +# Userlogrotate rotates logs in custom paths. +# The difference with logrotate is that it sets +# the owner:group according to the location of each log. + +CONF_PATH="/etc/evolinux/userlogrotate.conf" # optional file + +# Default conf +DELETE_AFTER_RETENTION_DAYS="false" # values: true | false +RETENTION_DAYS=365 # only applies if $RETENTION_DAYS == "true" +SYSTEM_LOGS_SEARCH_PATHS=( # will chown root:$user + /home/*/log +) +APPLICATIVE_LOGS_SEARCH_PATHS=( # will chown $user:$user + /home/*/www/{,current/}log +) +SYSTEM_LOG_NAMES=(access.log access-*.log error.log php.log) +APPLICATIVE_LOG_NAMES=(production.log delayed_job.log development.log test.log) +DRY_RUN=false # do echo instead of executing, values: true | false + +############################################################ + DATE="$(/bin/date +"%Y-%m-%d")" -HOMEPREFIX="/home" + +if [ -f "${CONF_PATH}" ]; then + source "${CONF_PATH}" +fi rotate () { - mv $1 $1.$DATE - touch $1 - chown $2 $1 - chmod g+r $1 + if [ ${DRY_RUN} == "false" ]; then + mv $1 $1.${DATE} + touch $1 + chown $2 $1 + chmod g+r $1 + else + echo "Move $1 to $1.${DATE}" + echo "Change $1 owner to $2" + fi } user_for() { - homedir="$(echo $1 | sed "s#\($HOMEPREFIX/\([^/]\+\)\).*#\1#")" - stat -L -c '%G' $homedir + stat -L -c '%G' $1 } -for log in access.log access-*.log error.log php.log; do - for i in $(ls -1 -d $HOMEPREFIX/*/log/$log 2>/dev/null | grep -v \.bak\.); do - USER="$(user_for $i)" - rotate $i root:$USER - done +delete_old() { + if [ ${DELETE_AFTER_RETENTION_DAYS} == "true" ]; then + if [ ${DRY_RUN} == "false" ]; then + find $1/ -ctime +${RETENTION_DAYS} -delete # slash is needed! + else + echo "Delete files:" + find $1/ -ctime +${RETENTION_DAYS} + fi + fi +} + +compress() { + if [ ${DRY_RUN} == "false" ]; then + gzip "$1" + else + echo "Gzipping $1" + fi +} + +for path in ${SYSTEM_LOGS_SEARCH_PATHS[@]}; do + for log_name in ${SYSTEM_LOG_NAMES[@]}; do + log_paths=$(ls -1 -d ${path}/${log_name} 2>/dev/null | grep -v \.bak\.) + for file in ${log_paths}; do + user="$(user_for "${file}")" + rotate "${file}" root:"${user}" + delete_old "$(dirname "${file}")" + done + done done -for log in production.log delayed_job.log development.log test.log; do - for i in $(ls -1 -d $HOMEPREFIX/*/www/{,current/}log/$log 2>/dev/null | grep -v \.bak\.); do - USER="$(user_for $i)" - rotate $i $USER:$USER - done +for path in ${APPLICATIVE_LOGS_SEARCH_PATHS[@]}; do + for log_name in ${APPLICATIVE_LOG_NAMES[@]}; do + log_paths=$(ls -1 -d ${path}/${log_name} 2>/dev/null | grep -v \.bak\.) + for file in ${log_paths}; do + user="$(user_for "${file}")" + rotate "${file}" "${user}":"${user}" + delete_old "$(dirname "${file}")" + done + done done -test -x /usr/sbin/apache2ctl && if /etc/init.d/apache2 status > /dev/null ; then \ - /etc/init.d/apache2 reload > /dev/null; \ -fi; +if [ -x /usr/sbin/apache2ctl ] && /etc/init.d/apache2 status > /dev/null ; then + if [ ${DRY_RUN} == "false" ]; then + /etc/init.d/apache2 reload > /dev/null + else + echo "Reloading Apache" + fi +fi -test -x /usr/sbin/nginx && invoke-rc.d nginx rotate >/dev/null 2>&1 +if [ -x /usr/sbin/nginx ]; then + if [ ${DRY_RUN} == "false" ]; then + invoke-rc.d nginx rotate >/dev/null 2>&1 + else + echo "Reloading Nginx" + fi +fi # Zipping is done after web server reload, so that the file descriptor is released. # Else, an error is raised (gzip file size changed while zipping) # and logs written during the zipping process might be lost. -for log in access.log*[!\.gz] access-*.log*[!\.gz] error.log*[!\.gz]; do - for i in $(ls -1 -d $HOMEPREFIX/*/log/$log 2>/dev/null | grep -v \.bak\.); do - if test -f "$i"; then - gzip "$i" - fi - done +for path in ${SYSTEM_LOGS_SEARCH_PATHS[@]}; do + for log_name in ${SYSTEM_LOG_NAMES[@]}; do + to_compress_paths=$(ls -1 -d ${path}/${log_name}*[!\.gz] 2>/dev/null | grep -v \.bak\.) + for file in ${to_compress_paths}; do + compress "${file}" + done + done done -for log in production.log*[!\.gz] delayed_job.log*[!\.gz] development.log*[!\.gz] test.log*[!\.gz]; do - for i in $(ls -1 -d $HOMEPREFIX/*/www/{,current/}log/$log 2>/dev/null | grep -v \.bak\.); do - if test -f "$i"; then - gzip "$i" - fi - done +for path in ${APPLICATIVE_LOGS_SEARCH_PATHS[@]}; do + for log_name in ${APPLICATIVE_LOG_NAMES[@]}; do + compressed_paths=$(ls -1 -d ${path}/${log_name}*[!\.gz] 2>/dev/null | grep -v \.bak\.) + for file in ${compressed_paths}; do + compress "${file}" + done + done done exit 0 From b92871bfef29baa4762c603216c01eb51b8513ed Mon Sep 17 00:00:00 2001 From: Eric Morino Date: Mon, 14 Aug 2023 09:29:12 +0200 Subject: [PATCH 087/182] Add variable ansible_distribution_release on preference file for fix version of postgresql --- postgresql/templates/postgresql.pref.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgresql/templates/postgresql.pref.j2 b/postgresql/templates/postgresql.pref.j2 index 40b500a9..3bf16cb2 100644 --- a/postgresql/templates/postgresql.pref.j2 +++ b/postgresql/templates/postgresql.pref.j2 @@ -3,6 +3,6 @@ Pin: release a={{ ansible_distribution_release }}-pgdg Pin-Priority: 999 Package: * -Pin: release a=buster-pgdg +Pin: release a={{ ansible_distribution_release }}-pgdg Pin-Priority: 1 From 52651199129bf142114d89151b2b0d818f3dbb42 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Wed, 1 Mar 2023 11:58:23 +0100 Subject: [PATCH 088/182] evocheck/ssh: add Debian 12 condition --- evocheck/files/evocheck.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/evocheck/files/evocheck.sh b/evocheck/files/evocheck.sh index 5b73eebf..d97020e7 100755 --- a/evocheck/files/evocheck.sh +++ b/evocheck/files/evocheck.sh @@ -231,8 +231,15 @@ check_customcrontab() { test "$found_lines" = 4 && failed "IS_CUSTOMCRONTAB" "missing custom field in crontab" } check_sshallowusers() { - grep -E -qir "(AllowUsers|AllowGroups)" /etc/ssh/sshd_config /etc/ssh/sshd_config.d \ - || failed "IS_SSHALLOWUSERS" "missing AllowUsers or AllowGroups directive in sshd_config" + if is_debian_bookworm; then + grep -E -qir "(AllowUsers|AllowGroups)" /etc/ssh/sshd_config.d \ + || failed "IS_SSHALLOWUSERS" "missing AllowUsers or AllowGroups directive in sshd_config.d/*" + grep -E -qir "(AllowUsers|AllowGroups)" /etc/ssh/sshd_config \ + || failed "IS_SSHALLOWUSERS" "AllowUsers or AllowGroups directive present in sshd_config" + else + grep -E -qir "(AllowUsers|AllowGroups)" /etc/ssh/sshd_config /etc/ssh/sshd_config.d \ + || failed "IS_SSHALLOWUSERS" "missing AllowUsers or AllowGroups directive in sshd_config" + fi } check_diskperf() { perfFile="/root/disk-perf.txt" From ec34d8afe150c5e27e619d5ee09046df22497b43 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Mon, 13 Mar 2023 17:58:57 +0100 Subject: [PATCH 089/182] Move PermitRootLogin to another file Debian >= 12. --- evolinux-base/tasks/root.yml | 16 +++++++++++++++- evolinux-users/tasks/ssh.yml | 19 ++++++++++++++++--- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/evolinux-base/tasks/root.yml b/evolinux-base/tasks/root.yml index 98cd3b3d..c7d7f1bd 100644 --- a/evolinux-base/tasks/root.yml +++ b/evolinux-base/tasks/root.yml @@ -97,7 +97,21 @@ replace: "PermitRootLogin no" validate: '/usr/sbin/sshd -t -f %s' notify: reload sshd - when: evolinux_root_disable_ssh | bool + when: + - evolinux_root_disable_ssh | bool + - ansible_distribution_major_version is version('11', '<=') + +- name: disable SSH access for root (Debian <= 12) + replace: + path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf + line: "PermitRootLogin no" + create: yes + validate: '/usr/sbin/sshd -t -f %s' + notify: reload sshd + when: + - evolinux_root_disable_ssh | bool + - ansible_distribution_major_version is version('12', '>=') + ### Disabled : it seems useless and too dangerous for now # - name: remove root from AllowUsers directive diff --git a/evolinux-users/tasks/ssh.yml b/evolinux-users/tasks/ssh.yml index 9110911f..3a03e175 100644 --- a/evolinux-users/tasks/ssh.yml +++ b/evolinux-users/tasks/ssh.yml @@ -2,7 +2,7 @@ - name: verify AllowGroups directive ansible.builtin.command: - cmd: "grep -E '^AllowGroups' /etc/ssh/sshd_config" + cmd: "grep -Er '^AllowGroups' /etc/ssh" changed_when: False failed_when: False check_mode: no @@ -14,7 +14,7 @@ - name: verify AllowUsers directive ansible.builtin.command: - cmd: "grep -E '^AllowUsers' /etc/ssh/sshd_config" + cmd: "grep -Er '^AllowUsers' /etc/ssh" changed_when: False failed_when: False check_mode: no @@ -62,6 +62,19 @@ regexp: '^#PermitRootLogin (yes|without-password|prohibit-password)' replace: "PermitRootLogin no" notify: reload sshd - when: evolinux_root_disable_ssh | bool + when: + - evolinux_root_disable_ssh | bool + - ansible_distribution_major_version is version('11', '<=') + +- name: disable root login (Debian <= 12) + replace: + path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf + line: "PermitRootLogin no" + create: yes + validate: '/usr/sbin/sshd -t -f %s' + notify: reload sshd + when: + - evolinux_root_disable_ssh | bool + - ansible_distribution_major_version is version('12', '>=') - ansible.builtin.meta: flush_handlers From eca2b5e4bf5ba30aa4c0f9b9738a552c94409667 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Fri, 31 Mar 2023 14:42:56 +0200 Subject: [PATCH 090/182] fqcn --- evolinux-base/tasks/root.yml | 2 +- evolinux-users/tasks/ssh.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/evolinux-base/tasks/root.yml b/evolinux-base/tasks/root.yml index c7d7f1bd..2558897e 100644 --- a/evolinux-base/tasks/root.yml +++ b/evolinux-base/tasks/root.yml @@ -102,7 +102,7 @@ - ansible_distribution_major_version is version('11', '<=') - name: disable SSH access for root (Debian <= 12) - replace: + ansible.builtin.replace: path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf line: "PermitRootLogin no" create: yes diff --git a/evolinux-users/tasks/ssh.yml b/evolinux-users/tasks/ssh.yml index 3a03e175..7998b714 100644 --- a/evolinux-users/tasks/ssh.yml +++ b/evolinux-users/tasks/ssh.yml @@ -67,7 +67,7 @@ - ansible_distribution_major_version is version('11', '<=') - name: disable root login (Debian <= 12) - replace: + ansible.builtin.replace: path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf line: "PermitRootLogin no" create: yes From fc241f28358b1aeaa59ff3a139e147dea0359c6f Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Fri, 7 Apr 2023 14:26:09 +0200 Subject: [PATCH 091/182] evolinux-base: Add SSH configuration template --- evolinux-base/tasks/ssh.included-files.yml | 89 ++++------------------ evolinux-base/templates/sshd/defaults.j2 | 13 ++++ 2 files changed, 26 insertions(+), 76 deletions(-) create mode 100644 evolinux-base/templates/sshd/defaults.j2 diff --git a/evolinux-base/tasks/ssh.included-files.yml b/evolinux-base/tasks/ssh.included-files.yml index 952b661f..dfae0b2b 100644 --- a/evolinux-base/tasks/ssh.included-files.yml +++ b/evolinux-base/tasks/ssh.included-files.yml @@ -1,71 +1,14 @@ --- -# This is a copy of ssh.single-file.yml -# It needs to be changed when we move to a included-files configuration - - - ansible.builtin.debug: - msg: "Warning: empty 'evolinux_ssh_password_auth_addresses' variable, tasks will be skipped!" + msg: "Warning: empty 'evolinux_ssh_password_auth_addresses' variable, some configuration elements won't be set!" when: evolinux_ssh_password_auth_addresses == [] -# From 'man sshd_config' : -# « If all of the criteria on the Match line are satisfied, the keywords -# on the following lines override those set in the global section of the config -# file, until either another Match line or the end of the file. -# If a keyword appears in multiple Match blocks that are satisfied, -# only the first instance of the keyword is applied. » -# -# We want to allow any user from a list of IP addresses to login with password, -# but users of the "{{ evolinux_internal_group }}" group can't login with password from other IP addresses +- name: add SSH server configuration template + ansible.builtin.template: + src: sshd/defaults.j2 + dest: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf -- name: "Security directives for Evolinux (Debian 10 or later)" - ansible.builtin.blockinfile: - dest: /etc/ssh/sshd_config - marker: "# {mark} EVOLINUX PASSWORD RESTRICTIONS" - block: | - Match Address {{ evolinux_ssh_password_auth_addresses | join(',') }} - PasswordAuthentication yes - Match Group {{ evolinux_internal_group }} - PasswordAuthentication no - insertafter: EOF - validate: '/usr/sbin/sshd -t -f %s' - notify: reload sshd - when: - - evolinux_ssh_password_auth_addresses != [] - - ansible_distribution_major_version is version('10', '>=') - -- name: Security directives for Evolinux (Jessie/Stretch) - ansible.builtin.blockinfile: - dest: /etc/ssh/sshd_config - marker: "# {mark} EVOLINUX PASSWORD RESTRICTIONS BY ADDRESS" - block: | - Match Address {{ evolinux_ssh_password_auth_addresses | join(',') }} - PasswordAuthentication yes - insertafter: EOF - validate: '/usr/sbin/sshd -t -f %s' - notify: reload sshd - when: - - evolinux_ssh_password_auth_addresses != [] - - ansible_distribution_major_version is version('10', '<') - -# We disable AcceptEnv because it can be a security issue, but also because we -# do not want clients to push their environment variables like LANG. -- name: disable AcceptEnv in ssh config - ansible.builtin.replace: - dest: /etc/ssh/sshd_config - regexp: '^AcceptEnv' - replace: "#AcceptEnv" - notify: reload sshd - when: evolinux_ssh_disable_acceptenv | bool - -- name: Set log level to verbose (for Debian >= 9) - ansible.builtin.replace: - dest: /etc/ssh/sshd_config - regexp: '^#?LogLevel [A-Z]+' - replace: "LogLevel VERBOSE" - notify: reload sshd - when: ansible_distribution_major_version is version('9', '>=') - -- name: "Get current user" +- name: "Get current user's group" ansible.builtin.command: cmd: logname changed_when: False @@ -73,10 +16,9 @@ check_mode: no when: evolinux_ssh_allow_current_user | bool -# we must double-escape caracters, because python - name: verify AllowUsers directive ansible.builtin.command: - cmd: "grep -E '^AllowUsers' /etc/ssh/sshd_config" + cmd: "grep -ER '^AllowUsers' /etc/ssh" failed_when: False changed_when: False register: grep_allowusers_ssh @@ -85,20 +27,15 @@ - name: "Add AllowUsers sshd directive for current user" ansible.builtin.lineinfile: - dest: /etc/ssh/sshd_config - line: "\nAllowUsers {{ logname.stdout }}" + dest: /etc/ssh/sshd_config.d/allow_evolinux_user + line: "AllowUsers {{ logname.stdout }}" insertafter: 'Subsystem' validate: '/usr/sbin/sshd -t -f %s' notify: reload sshd when: evolinux_ssh_allow_current_user and grep_allowusers_ssh.rc != 0 -- name: "Modify AllowUsers sshd directive for current user" - ansible.builtin.replace: - dest: /etc/ssh/sshd_config - regexp: '^(AllowUsers ((?!{{ logname.stdout }}).)*)$' - replace: '\1 {{ logname.stdout }}' - validate: '/usr/sbin/sshd -t -f %s' - notify: reload sshd - when: evolinux_ssh_allow_current_user and grep_allowusers_ssh.rc == 0 - - ansible.builtin.meta: flush_handlers + +# TODO vérifier présence de Include /etc/ssh/sshd_config.d/*.conf +# TODO si allowusers et allowgroups, ajouter utilisateur aux deux +# TODO si allowgroups, ajouter groupe de l’utilisateur diff --git a/evolinux-base/templates/sshd/defaults.j2 b/evolinux-base/templates/sshd/defaults.j2 new file mode 100644 index 00000000..25baf475 --- /dev/null +++ b/evolinux-base/templates/sshd/defaults.j2 @@ -0,0 +1,13 @@ +Port 22 +PermitRootLogin no +LogLevel VERBOSE +SetEnv LC_ALL=en_US.UTF-8 + +{% if evolinux_ssh_password_auth_addresses %} +Match Address {{ evolinux_ssh_password_auth_addresses | join(',') }} + PasswordAuthentication yes +{% endif %} +{% if evolinux_internal_group %} +Match Group {{ evolinux_internal_group }} + PasswordAuthentication no +{% endif %} From 87711ef00c2ac21ef14812a3b7df353a53eeb3f3 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Mon, 17 Apr 2023 16:00:37 +0200 Subject: [PATCH 092/182] evolinux-base: PermitRootLogin depends on evolinux_root_disable_ssh --- evolinux-base/templates/sshd/defaults.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/evolinux-base/templates/sshd/defaults.j2 b/evolinux-base/templates/sshd/defaults.j2 index 25baf475..373141a6 100644 --- a/evolinux-base/templates/sshd/defaults.j2 +++ b/evolinux-base/templates/sshd/defaults.j2 @@ -1,5 +1,7 @@ Port 22 +{% if evolinux_root_disable_ssh %} PermitRootLogin no +{% endif %} LogLevel VERBOSE SetEnv LC_ALL=en_US.UTF-8 From fc8105e84edd24f523269b3a701d2eb2a767f61d Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Mon, 17 Apr 2023 18:03:19 +0200 Subject: [PATCH 093/182] evolinux-users: prepare SSH configuration for Debian 12 (wip) --- evolinux-users/tasks/ssh.yml | 18 +++++++++++++++++- evolinux-users/tasks/ssh_allowgroups.yml | 21 ++++++++++++++++++--- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/evolinux-users/tasks/ssh.yml b/evolinux-users/tasks/ssh.yml index 7998b714..5b6967da 100644 --- a/evolinux-users/tasks/ssh.yml +++ b/evolinux-users/tasks/ssh.yml @@ -66,15 +66,31 @@ - evolinux_root_disable_ssh | bool - ansible_distribution_major_version is version('11', '<=') +- name: verify PermitRootLogin directive + ansible.builtin.command: + cmd: "grep -Er '^PermitRootLogin' /etc/ssh" + changed_when: False + failed_when: False + check_mode: no + register: grep_permitrootlogin_ssh + when: + - ansible_distribution_major_version is version('12', '>=') + +# TODO avertir lorsque PermitRootLogin est déjà configuré? +- ansible.builtin.debug: + var: grep_permitrootlogin_ssh + verbosity: 1 + - name: disable root login (Debian <= 12) ansible.builtin.replace: path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf line: "PermitRootLogin no" create: yes - validate: '/usr/sbin/sshd -t -f %s' + validate: '/usr/sbin/sshd -t -f /etc/ssh/sshd_config.d/z-evolinux-defaults.conf' notify: reload sshd when: - evolinux_root_disable_ssh | bool - ansible_distribution_major_version is version('12', '>=') + - grep_permitrootlogin_ssh.rc != 1 - ansible.builtin.meta: flush_handlers diff --git a/evolinux-users/tasks/ssh_allowgroups.yml b/evolinux-users/tasks/ssh_allowgroups.yml index 2dac1f80..6972b82b 100644 --- a/evolinux-users/tasks/ssh_allowgroups.yml +++ b/evolinux-users/tasks/ssh_allowgroups.yml @@ -4,11 +4,13 @@ # even if it's been done before - name: verify AllowGroups directive ansible.builtin.command: - cmd: "grep -E '^AllowGroups' /etc/ssh/sshd_config" + cmd: "grep -E '^AllowGroups' /etc/ssh" changed_when: False failed_when: False check_mode: no register: grep_allowgroups_ssh + when: + - ansible_distribution_major_version is version('11', '<=') - name: "Add AllowGroups sshd directive with '{{ evolinux_ssh_group }}'" ansible.builtin.lineinfile: @@ -17,7 +19,9 @@ insertafter: 'Subsystem' validate: '/usr/sbin/sshd -t -f %s' notify: reload sshd - when: grep_allowgroups_ssh.rc != 0 + when: + - grep_allowgroups_ssh.rc != 0 + - ansible_distribution_major_version is version('11', '<=') - name: "Append '{{ evolinux_ssh_group }}' to AllowGroups sshd directive" ansible.builtin.replace: @@ -26,4 +30,15 @@ replace: '\1 {{ evolinux_ssh_group }}' validate: '/usr/sbin/sshd -t -f %s' notify: reload sshd - when: grep_allowgroups_ssh.rc == 0 + when: + - grep_allowgroups_ssh.rc == 0 + - ansible_distribution_major_version is version('11', '<=') + +- name: "Add AllowGroups sshd directive with '{{ evolinux_ssh_group }}'" + ansible.builtin.lineinfile: + path: /etc/ssh/sshd_config.d/z-evolinux-users + line: "AllowGroups {{ evolinux_ssh_group }}" + create: yes + validate: '/usr/sbin/sshd -t -f /etc/ssh/sshd_config.d/z-evolinux-users' + when: + - ansible_distribution_major_version is version('12', '>=') From e70ab6d039ac7b50d20df4b52f0261ce28a82633 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Tue, 20 Jun 2023 10:57:55 +0200 Subject: [PATCH 094/182] evolinux-users: Fix tests order --- evolinux-users/tasks/ssh_allowgroups.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evolinux-users/tasks/ssh_allowgroups.yml b/evolinux-users/tasks/ssh_allowgroups.yml index 6972b82b..198a7222 100644 --- a/evolinux-users/tasks/ssh_allowgroups.yml +++ b/evolinux-users/tasks/ssh_allowgroups.yml @@ -20,8 +20,8 @@ validate: '/usr/sbin/sshd -t -f %s' notify: reload sshd when: - - grep_allowgroups_ssh.rc != 0 - ansible_distribution_major_version is version('11', '<=') + - grep_allowgroups_ssh.rc != 0 - name: "Append '{{ evolinux_ssh_group }}' to AllowGroups sshd directive" ansible.builtin.replace: @@ -31,8 +31,8 @@ validate: '/usr/sbin/sshd -t -f %s' notify: reload sshd when: - - grep_allowgroups_ssh.rc == 0 - ansible_distribution_major_version is version('11', '<=') + - grep_allowgroups_ssh.rc == 0 - name: "Add AllowGroups sshd directive with '{{ evolinux_ssh_group }}'" ansible.builtin.lineinfile: From 0098cd2f08dfa38d63792d06b600920d5a94e437 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Tue, 20 Jun 2023 10:58:29 +0200 Subject: [PATCH 095/182] evolinux-users: Fix "validate" syntax --- evolinux-users/tasks/ssh_allowgroups.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evolinux-users/tasks/ssh_allowgroups.yml b/evolinux-users/tasks/ssh_allowgroups.yml index 198a7222..b332b514 100644 --- a/evolinux-users/tasks/ssh_allowgroups.yml +++ b/evolinux-users/tasks/ssh_allowgroups.yml @@ -39,6 +39,6 @@ path: /etc/ssh/sshd_config.d/z-evolinux-users line: "AllowGroups {{ evolinux_ssh_group }}" create: yes - validate: '/usr/sbin/sshd -t -f /etc/ssh/sshd_config.d/z-evolinux-users' + validate: '/usr/sbin/sshd -t -f %s' when: - ansible_distribution_major_version is version('12', '>=') From 86978a8225a5f3e452eebfaf3a7749925ba3ac70 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Tue, 20 Jun 2023 11:58:18 +0200 Subject: [PATCH 096/182] evolinux-users: Fix "disable root login" task --- evolinux-users/tasks/ssh.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/evolinux-users/tasks/ssh.yml b/evolinux-users/tasks/ssh.yml index 5b6967da..660fb766 100644 --- a/evolinux-users/tasks/ssh.yml +++ b/evolinux-users/tasks/ssh.yml @@ -66,7 +66,7 @@ - evolinux_root_disable_ssh | bool - ansible_distribution_major_version is version('11', '<=') -- name: verify PermitRootLogin directive +- name: verify PermitRootLogin directive (Debian >= 12) ansible.builtin.command: cmd: "grep -Er '^PermitRootLogin' /etc/ssh" changed_when: False @@ -81,12 +81,12 @@ var: grep_permitrootlogin_ssh verbosity: 1 -- name: disable root login (Debian <= 12) - ansible.builtin.replace: +- name: disable root login (Debian >= 12) + ansible.builtin.lineinfile: path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf line: "PermitRootLogin no" create: yes - validate: '/usr/sbin/sshd -t -f /etc/ssh/sshd_config.d/z-evolinux-defaults.conf' + validate: '/usr/sbin/sshd -t -f %s' notify: reload sshd when: - evolinux_root_disable_ssh | bool From 7e15e01b14a9b46482881b52edd6b7a15f369e1a Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Fri, 21 Jul 2023 11:49:00 +0200 Subject: [PATCH 097/182] Fix task name --- evolinux-base/tasks/root.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evolinux-base/tasks/root.yml b/evolinux-base/tasks/root.yml index 2558897e..0baad708 100644 --- a/evolinux-base/tasks/root.yml +++ b/evolinux-base/tasks/root.yml @@ -101,7 +101,7 @@ - evolinux_root_disable_ssh | bool - ansible_distribution_major_version is version('11', '<=') -- name: disable SSH access for root (Debian <= 12) +- name: disable SSH access for root (Debian >= 12) ansible.builtin.replace: path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf line: "PermitRootLogin no" From fbb0b73e3a6e9d984eb217eb61f52bb3f6f8cf96 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Fri, 21 Jul 2023 11:49:35 +0200 Subject: [PATCH 098/182] Add permitrootlogin at beginning of file --- evolinux-users/tasks/ssh.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/evolinux-users/tasks/ssh.yml b/evolinux-users/tasks/ssh.yml index 660fb766..af889f71 100644 --- a/evolinux-users/tasks/ssh.yml +++ b/evolinux-users/tasks/ssh.yml @@ -83,10 +83,11 @@ - name: disable root login (Debian >= 12) ansible.builtin.lineinfile: - path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf + path: /etc/ssh/sshd_config.d/z-evolinux-users.conf line: "PermitRootLogin no" create: yes validate: '/usr/sbin/sshd -t -f %s' + insertbefore: "BOF" notify: reload sshd when: - evolinux_root_disable_ssh | bool From 4a0d3a49659e57efce782a29556549ff288149fe Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Fri, 21 Jul 2023 12:58:08 +0200 Subject: [PATCH 099/182] Fix permitrootlogin condition --- evolinux-users/tasks/ssh.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evolinux-users/tasks/ssh.yml b/evolinux-users/tasks/ssh.yml index af889f71..ae1db373 100644 --- a/evolinux-users/tasks/ssh.yml +++ b/evolinux-users/tasks/ssh.yml @@ -92,6 +92,6 @@ when: - evolinux_root_disable_ssh | bool - ansible_distribution_major_version is version('12', '>=') - - grep_permitrootlogin_ssh.rc != 1 + - grep_permitrootlogin_ssh.rc == 1 - ansible.builtin.meta: flush_handlers From f7f578705c4e1c00f84042c4d4bfbd860485d1f8 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Fri, 21 Jul 2023 12:58:55 +0200 Subject: [PATCH 100/182] Fix config file path --- evolinux-users/tasks/ssh_allowgroups.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evolinux-users/tasks/ssh_allowgroups.yml b/evolinux-users/tasks/ssh_allowgroups.yml index b332b514..236a985b 100644 --- a/evolinux-users/tasks/ssh_allowgroups.yml +++ b/evolinux-users/tasks/ssh_allowgroups.yml @@ -36,7 +36,7 @@ - name: "Add AllowGroups sshd directive with '{{ evolinux_ssh_group }}'" ansible.builtin.lineinfile: - path: /etc/ssh/sshd_config.d/z-evolinux-users + path: /etc/ssh/sshd_config.d/z-evolinux-users.conf line: "AllowGroups {{ evolinux_ssh_group }}" create: yes validate: '/usr/sbin/sshd -t -f %s' From a47834871634ed8855367feed74b649a6645d542 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Wed, 16 Aug 2023 14:26:35 +0200 Subject: [PATCH 101/182] Fix grep under /etc/ssh --- evolinux-users/tasks/ssh_allowgroups.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evolinux-users/tasks/ssh_allowgroups.yml b/evolinux-users/tasks/ssh_allowgroups.yml index 236a985b..fd74a7c0 100644 --- a/evolinux-users/tasks/ssh_allowgroups.yml +++ b/evolinux-users/tasks/ssh_allowgroups.yml @@ -4,7 +4,7 @@ # even if it's been done before - name: verify AllowGroups directive ansible.builtin.command: - cmd: "grep -E '^AllowGroups' /etc/ssh" + cmd: "grep -Er '^AllowGroups' /etc/ssh" changed_when: False failed_when: False check_mode: no From 263f940c3d727e73b9fc31db7f8f3fa260132188 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Wed, 16 Aug 2023 16:14:42 +0200 Subject: [PATCH 102/182] Update Changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index adf6be36..0b44a889 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,9 @@ The **patch** part changes is incremented if multiple releases happen the same m * userlogrotate: add a userlogpurge script disabled by default * evolinux-base: configure bashrc for all users * bind: Add reload-zone helper +* evolinux-base: add splitted SSH configuration for Debian >= 12 +* evolinux-users: add splitted SSH configuration for Debian >= 12 +* evocheck: add support for Debian >= 12 splitted SSH configuration ### Changed From 536d051890a8a1c074ed345533e82e1be235bd38 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Wed, 16 Aug 2023 18:21:06 +0200 Subject: [PATCH 103/182] Fix mode for files under /etc/ssh/sshd_config.d --- CHANGELOG.md | 2 ++ evolinux-base/tasks/root.yml | 1 + evolinux-base/tasks/ssh.included-files.yml | 3 ++- evolinux-users/tasks/ssh.yml | 1 + evolinux-users/tasks/ssh_allowgroups.yml | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b44a889..7bcf176a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,8 @@ The **patch** part changes is incremented if multiple releases happen the same m * nginx: set default server directive in default vhost * opendkim: update apt cache before install * redis: replace errorneous ini_file module for Munin config, fix dedicted Munin config filename (z-XXX). +* evolinux-base, evolinux-users: Fix files mode under /etc/ssh/sshd_config.d +* evolinux-base: Fix file extension ### Removed diff --git a/evolinux-base/tasks/root.yml b/evolinux-base/tasks/root.yml index 0baad708..183def7c 100644 --- a/evolinux-base/tasks/root.yml +++ b/evolinux-base/tasks/root.yml @@ -106,6 +106,7 @@ path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf line: "PermitRootLogin no" create: yes + mode: "0644" validate: '/usr/sbin/sshd -t -f %s' notify: reload sshd when: diff --git a/evolinux-base/tasks/ssh.included-files.yml b/evolinux-base/tasks/ssh.included-files.yml index dfae0b2b..87e9de5e 100644 --- a/evolinux-base/tasks/ssh.included-files.yml +++ b/evolinux-base/tasks/ssh.included-files.yml @@ -7,6 +7,7 @@ ansible.builtin.template: src: sshd/defaults.j2 dest: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf + mode: "0644" - name: "Get current user's group" ansible.builtin.command: @@ -27,7 +28,7 @@ - name: "Add AllowUsers sshd directive for current user" ansible.builtin.lineinfile: - dest: /etc/ssh/sshd_config.d/allow_evolinux_user + dest: /etc/ssh/sshd_config.d/allow_evolinux_user.conf line: "AllowUsers {{ logname.stdout }}" insertafter: 'Subsystem' validate: '/usr/sbin/sshd -t -f %s' diff --git a/evolinux-users/tasks/ssh.yml b/evolinux-users/tasks/ssh.yml index ae1db373..9a696901 100644 --- a/evolinux-users/tasks/ssh.yml +++ b/evolinux-users/tasks/ssh.yml @@ -86,6 +86,7 @@ path: /etc/ssh/sshd_config.d/z-evolinux-users.conf line: "PermitRootLogin no" create: yes + mode: "0644" validate: '/usr/sbin/sshd -t -f %s' insertbefore: "BOF" notify: reload sshd diff --git a/evolinux-users/tasks/ssh_allowgroups.yml b/evolinux-users/tasks/ssh_allowgroups.yml index fd74a7c0..11446b4d 100644 --- a/evolinux-users/tasks/ssh_allowgroups.yml +++ b/evolinux-users/tasks/ssh_allowgroups.yml @@ -39,6 +39,7 @@ path: /etc/ssh/sshd_config.d/z-evolinux-users.conf line: "AllowGroups {{ evolinux_ssh_group }}" create: yes + mode: "0644" validate: '/usr/sbin/sshd -t -f %s' when: - ansible_distribution_major_version is version('12', '>=') From 67c6167474e1456707b32cf518e2571f834e79ba Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Fri, 18 Aug 2023 12:00:03 +0200 Subject: [PATCH 104/182] apt: Disable NonFreeFirmware warning for VM on Debian 12+ --- CHANGELOG.md | 1 + apt/tasks/main.yml | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bcf176a..2f049fa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Added +* apt: Disable NonFreeFirmware warning for VM on Debian 12+ * docker-host: added var for user namespace setting * dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) * dovecot: fix old_stats plugin for Dovecot 2.3. diff --git a/apt/tasks/main.yml b/apt/tasks/main.yml index 295f42f1..4d357f8b 100644 --- a/apt/tasks/main.yml +++ b/apt/tasks/main.yml @@ -96,6 +96,18 @@ when: apt_clean_gandi_sourceslist | bool +- name: "Disable NonFreeFirmware warning for VM on Debian 12+" + ansible.builtin.lineinfile: + path: /etc/apt/apt.conf.d/no-bookworm-firmware.conf + create: yes + line: "APT::Get::Update::SourceListWarnings::NonFreeFirmware \"false\";" + tags: + - apt + when: + - ansible_distribution_major_version is version('12', '>=') + - ansible_virtualization_role == "guest" + + - name: Install check for packages marked hold ansible.builtin.import_tasks: hold_packages.yml when: apt_install_hold_packages | bool From feba74c469d6f54a677636324eb0d6a24fc73818 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Fri, 18 Aug 2023 12:09:56 +0200 Subject: [PATCH 105/182] evolinux-base: reboot the server if the Cloud kernel has been installed --- CHANGELOG.md | 25 +++++++++++++------------ evolinux-base/tasks/kernel.yml | 9 +++++++++ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f049fa7..e0b5a78c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,27 +14,28 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Added * apt: Disable NonFreeFirmware warning for VM on Debian 12+ +* bind: Add reload-zone helper +* docker-host: added var for user namespace setting * docker-host: added var for user namespace setting * dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) +* dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) * dovecot: fix old_stats plugin for Dovecot 2.3. -* evolinux: Install HPE Agentless Management Service (amsd) +* dovecot: fix old_stats plugin for Dovecot 2.3. +* evocheck: add support for Debian >= 12 splitted SSH configuration +* evolinux-base: add splitted SSH configuration for Debian >= 12 +* evolinux-base: configure bashrc for all users * evolinux-base: New variable "evolinux_system_include_ntpd" to chose wether or not to include ntpd role +* evolinux-base: reboot the server if the Cloud kernel has been installed +* evolinux-users: add splitted SSH configuration for Debian >= 12 +* evolinux: Install HPE Agentless Management Service (amsd) +* fail2ban: add default variable fail2ban_dbpurgeage_default * fail2ban: add default variable fail2ban_dbpurgeage_default * fail2ban: add variable fail2ban_sshd_port to configure sshd port * nagios-nrpe: add a NRPE check-local command with completion. * policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory -* userlogrotate: rotate also php.log. -* userlogrotate: new version, with separate conf file -* docker-host: added var for user namespace setting -* dovecot: fix old_stats plugin for Dovecot 2.3. -* dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) -* fail2ban: add default variable fail2ban_dbpurgeage_default * userlogrotate: add a userlogpurge script disabled by default -* evolinux-base: configure bashrc for all users -* bind: Add reload-zone helper -* evolinux-base: add splitted SSH configuration for Debian >= 12 -* evolinux-users: add splitted SSH configuration for Debian >= 12 -* evocheck: add support for Debian >= 12 splitted SSH configuration +* userlogrotate: new version, with separate conf file +* userlogrotate: rotate also php.log. ### Changed diff --git a/evolinux-base/tasks/kernel.yml b/evolinux-base/tasks/kernel.yml index da3abf57..b8b07853 100644 --- a/evolinux-base/tasks/kernel.yml +++ b/evolinux-base/tasks/kernel.yml @@ -4,6 +4,7 @@ ansible.builtin.apt: name: "linux-image-cloud-amd64" state: present + register: _use_cloud_kernel when: - ansible_machine == "x86_64" - ansible_virtualization_role == "guest" @@ -17,6 +18,14 @@ - ansible_machine == "x86_64" - ansible_virtualization_role == "guest" - evolinux_kernel_cloud_auto | bool + +- name: "Reboot the server to enable the new kernel" + ansible.builtin.reboot: + reboot_timeout: 600 + search_paths: ['/lib/molly-guard', '/sbin'] + when: + - _use_cloud_kernel | changed + - evolinux_kernel_cloud_reboot | bool - name: Reboot after panic ansible.posix.sysctl: From a56682a7ca29dfcd9fbb5b986a1f428fbaef0d82 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Fri, 18 Aug 2023 15:08:48 +0200 Subject: [PATCH 106/182] kvm-host: Add support for kvm solo --- kvm-host/files/add-vm.sh | 129 ++++++++++++++++++++++----------------- 1 file changed, 73 insertions(+), 56 deletions(-) diff --git a/kvm-host/files/add-vm.sh b/kvm-host/files/add-vm.sh index 78acfe1c..f945d401 100755 --- a/kvm-host/files/add-vm.sh +++ b/kvm-host/files/add-vm.sh @@ -26,6 +26,10 @@ dryRun() { fi } +isSolo() { + test -z "$slaveKVMIP" +} + critical() { echo -ne "\e[31m${1}\e[39m\n" && exit 1 } @@ -50,6 +54,7 @@ defaultVCPU="${defaultVCPU:-"2"}" defaultRAM="${defaultRAM:-"4G"}" defaultRootSize="${defaultRootSize:-"20G"}" defaultHomeSize="${defaultHomeSize:-"40G"}" +defaultVmName="${defaultVmName:-}" DIALOGOUT=$(mktemp --tmpdir=/tmp addvm.XXX) export DIALOGOUT @@ -62,7 +67,9 @@ HELPFILE=$(mktemp --tmpdir=/tmp addvm.XXX) export HELPFILE tmpResFile=$(mktemp --tmpdir=/tmp addvm.XXX) masterKVM="$(hostname -s)" -slaveKVM="$(ssh "${slaveKVMIP}" hostname -s)" +if ! isSolo; then + slaveKVM="$(ssh "${slaveKVMIP}" hostname -s)" +fi # Exit & Cleanup function. clean() { @@ -81,7 +88,7 @@ ${DIALOG} \ "memory" 2 1 "${defaultRAM}" 2 10 20 0 \ "volRoot" 3 1 "${disks[0]}-${defaultRootSize}" 3 10 20 0 \ "volHome" 4 1 "${disks[1]}-${defaultHomeSize}" 4 10 20 0 \ - "vmName" 5 1 "" 5 10 20 0 \ + "vmName" 5 1 "${defaultVmName}" 5 10 20 0 \ 2> "${DIALOGOUT}" vCPU=$(sed 1'q;d' "${DIALOGOUT}") @@ -114,7 +121,9 @@ else critical "Unknow disk ${volRootDisk} !" fi dryRun lvcreate -L"${volRootSize}" -n"${vmName}_root" "${volRootDisk}" - dryRun ssh "${slaveKVMIP}" "lvcreate -L$volRootSize -n${vmName}_root ${volRootDisk}" + if ! isSolo; then + dryRun ssh "${slaveKVMIP}" "lvcreate -L$volRootSize -n${vmName}_root ${volRootDisk}" + fi fi if ! [[ "${volHome}" =~ ([^-]+)-([0-9]+G) ]]; then @@ -127,10 +136,12 @@ else critical "Unknow disk ${volHomeDisk} !" fi dryRun lvcreate -L"${volHomeSize}" -n"${vmName}_home" "${volHomeDisk}" - dryRun ssh "${slaveKVMIP}" "lvcreate -L$volHomeSize -n${vmName}_home ${volHomeDisk}" + if ! isSolo; then + dryRun ssh "${slaveKVMIP}" "lvcreate -L$volHomeSize -n${vmName}_home ${volHomeDisk}" + fi fi -if [ -f "/etc/drbd.d/${vmName}.res" ]; then +if ! isSolo && [ -f "/etc/drbd.d/${vmName}.res" ]; then warn "The DRBD resource file ${vmName}.res is already present! Continue? [y/N]" read -r if ! [[ "${REPLY}" =~ (Y|y) ]]; then @@ -138,22 +149,23 @@ if [ -f "/etc/drbd.d/${vmName}.res" ]; then fi fi -# Generates drbd resource file. +if ! isSolo; then + # Generates drbd resource file. -# shellcheck disable=SC2012 -if [ "$(ls /etc/drbd.d/ | wc -l)" -gt 1 ]; then - lastdrbdPort=$(grep -hEo ':[0-9]{4}' /etc/drbd.d/*.res | sort | uniq | tail -1 | sed 's/://') - drbdPort=$((lastdrbdPort+1)) - lastMinor=$(grep -hEo 'minor [0-9]{1,}' /etc/drbd.d/*.res | sed 's/minor //' | sort -n | tail -1) - minorvol0=$((lastMinor+1)) - minorvol1=$((lastMinor+2)) -else - drbdPort=7900 - minorvol0=0 - minorvol1=1 -fi + # shellcheck disable=SC2012 + if [ "$(ls /etc/drbd.d/ | wc -l)" -gt 1 ]; then + lastdrbdPort=$(grep -hEo ':[0-9]{4}' /etc/drbd.d/*.res | sort | uniq | tail -1 | sed 's/://') + drbdPort=$((lastdrbdPort+1)) + lastMinor=$(grep -hEo 'minor [0-9]{1,}' /etc/drbd.d/*.res | sed 's/minor //' | sort -n | tail -1) + minorvol0=$((lastMinor+1)) + minorvol1=$((lastMinor+2)) + else + drbdPort=7900 + minorvol0=0 + minorvol1=1 + fi -cat << EOT > "${tmpResFile}" + cat << EOT > "${tmpResFile}" resource "${vmName}" { net { cram-hmac-alg "sha1"; @@ -178,16 +190,16 @@ resource "${vmName}" { meta-disk internal; } EOT -if [[ "${volHomeDisk}" != "none" ]]; then - cat << EOT >> "${tmpResFile}" + if [[ "${volHomeDisk}" != "none" ]]; then + cat << EOT >> "${tmpResFile}" volume 1 { device minor ${minorvol1}; disk /dev/${volHomeDisk}/${vmName}_home; meta-disk internal; } EOT -fi -cat << EOT >> "${tmpResFile}" + fi + cat << EOT >> "${tmpResFile}" on ${masterKVM} { address ${masterKVMIP}:${drbdPort}; } @@ -197,45 +209,52 @@ cat << EOT >> "${tmpResFile}" } EOT -# Create/Activate the new drbd resources. -drbdadm="$(command -v drbdadm)" -if isDryRun; then - drbdadm="${drbdadm} --dry-run" -fi + # Create/Activate the new drbd resources. + drbdadm="$(command -v drbdadm)" + if isDryRun; then + drbdadm="${drbdadm} --dry-run" + fi -if isDryRun; then - # shellcheck disable=SC2064 - trap "rm /etc/drbd.d/${vmName}.res && ssh ${slaveKVMIP} rm /etc/drbd.d/${vmName}.res" 0 -fi -install -m 600 "${tmpResFile}" "/etc/drbd.d/${vmName}.res" -scp "/etc/drbd.d/${vmName}.res" "${slaveKVMIP}:/etc/drbd.d/" -${drbdadm} create-md "${vmName}" -# shellcheck disable=SC2029 -ssh "${slaveKVMIP}" "${drbdadm} create-md ${vmName}" -${drbdadm} adjust "${vmName}" -# shellcheck disable=SC2029 -ssh "${slaveKVMIP}" "${drbdadm} adjust ${vmName}" -${drbdadm} -- --overwrite-data-of-peer primary "${vmName}" + if isDryRun; then + # shellcheck disable=SC2064 + trap "rm /etc/drbd.d/${vmName}.res && ssh ${slaveKVMIP} rm /etc/drbd.d/${vmName}.res" 0 + fi + install -m 600 "${tmpResFile}" "/etc/drbd.d/${vmName}.res" + scp "/etc/drbd.d/${vmName}.res" "${slaveKVMIP}:/etc/drbd.d/" + ${drbdadm} create-md "${vmName}" + # shellcheck disable=SC2029 + ssh "${slaveKVMIP}" "${drbdadm} create-md ${vmName}" + ${drbdadm} adjust "${vmName}" + # shellcheck disable=SC2029 + ssh "${slaveKVMIP}" "${drbdadm} adjust ${vmName}" + ${drbdadm} -- --overwrite-data-of-peer primary "${vmName}" -if ! isDryRun; then - sleep 5 - drbdadm status | tail -4 + if ! isDryRun; then + sleep 5 + drbdadm status | tail -4 - drbdDiskPath="/dev/drbd/by-res/${vmName}/0" - if ! [ -b "${drbdDiskPath}" ]; then - warn "${drbdDiskPath} not found! Continue? [y/N]" - read -r - if ! [[ "${REPLY}" =~ (Y|y) ]]; then - exit 1 + drbdDiskPath="/dev/drbd/by-res/${vmName}/0" + if ! [ -b "${drbdDiskPath}" ]; then + warn "${drbdDiskPath} not found! Continue? [y/N]" + read -r + if ! [[ "${REPLY}" =~ (Y|y) ]]; then + exit 1 + fi fi fi fi -virtRootDisk="--disk path=/dev/drbd/by-disk/${volRootDisk}/${vmName}_root,bus=virtio,io=threads,cache=none,format=raw" -virtHomeDisk="" -if [ "${volHomeDisk}" != "none" ]; then - virtHomeDisk="--disk path=/dev/drbd/by-disk/${volHomeDisk}/${vmName}_home,bus=virtio,io=threads,cache=none,format=raw" +if isSolo; then + virtRootDisk="--disk path=/dev/${volRootDisk}/${vmName}_root,bus=virtio,io=threads,cache=none,format=raw" + virtHomeDisk="--disk path=/dev/${volHomeDisk}/${vmName}_home,bus=virtio,io=threads,cache=none,format=raw" +else + virtRootDisk="--disk path=/dev/drbd/by-disk/${volRootDisk}/${vmName}_root,bus=virtio,io=threads,cache=none,format=raw" + virtHomeDisk="" + if [ "${volHomeDisk}" != "none" ]; then + virtHomeDisk="--disk path=/dev/drbd/by-disk/${volHomeDisk}/${vmName}_home,bus=virtio,io=threads,cache=none,format=raw" + fi fi + if [ -n "${preseedURL}" ]; then bootMode="--location https://deb.debian.org/debian/dists/${debianVersion}/main/installer-amd64/ --extra-args auto=true priority=critical url=${preseedURL} hostname=${vmName}" fi @@ -269,5 +288,3 @@ fi if ! isDryRun && [ -x /usr/share/scripts/evomaintenance.sh ]; then echo "Install VM ${vmName} (add-vm.sh)" | /usr/share/scripts/evomaintenance.sh fi - - From bb41d313a92f2cb7fbef67efa427613341385c06 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Fri, 18 Aug 2023 16:28:03 +0200 Subject: [PATCH 107/182] apt: Explicit "signed-by" directives for official sources --- CHANGELOG.md | 1 + apt/templates/bookworm_basics.sources.j2 | 1 + apt/templates/bookworm_security.sources.j2 | 1 + 3 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0b5a78c..5d336a9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Added +* apt: Explicit "signed-by" directives for official sources * apt: Disable NonFreeFirmware warning for VM on Debian 12+ * bind: Add reload-zone helper * docker-host: added var for user namespace setting diff --git a/apt/templates/bookworm_basics.sources.j2 b/apt/templates/bookworm_basics.sources.j2 index 5a0cd3aa..948c4adf 100644 --- a/apt/templates/bookworm_basics.sources.j2 +++ b/apt/templates/bookworm_basics.sources.j2 @@ -5,3 +5,4 @@ URIs: http://mirror.evolix.org/debian Suites: bookworm bookworm-updates Components: {{ apt_basics_components | mandatory }} Enabled: yes +Signed-By: /usr/share/keyrings/debian-archive-bookworm-automatic.gpg diff --git a/apt/templates/bookworm_security.sources.j2 b/apt/templates/bookworm_security.sources.j2 index 56180957..07f1345b 100644 --- a/apt/templates/bookworm_security.sources.j2 +++ b/apt/templates/bookworm_security.sources.j2 @@ -5,3 +5,4 @@ URIs: https://security.debian.org/debian-security Suites: bookworm-security Components: {{ apt_basics_components | mandatory }} Enabled: yes +Signed-By: /usr/share/keyrings/debian-archive-bookworm-security-automatic.gpg \ No newline at end of file From 5cc7c1310416d598ec1714f659b9c0eea8ea5177 Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Tue, 22 Aug 2023 12:28:57 +0200 Subject: [PATCH 108/182] evolinux-base/tasks/kernel.yml > fix typo, 'is changed' vs '| changed' --- evolinux-base/tasks/kernel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evolinux-base/tasks/kernel.yml b/evolinux-base/tasks/kernel.yml index b8b07853..231ec02f 100644 --- a/evolinux-base/tasks/kernel.yml +++ b/evolinux-base/tasks/kernel.yml @@ -24,7 +24,7 @@ reboot_timeout: 600 search_paths: ['/lib/molly-guard', '/sbin'] when: - - _use_cloud_kernel | changed + - _use_cloud_kernel is changed - evolinux_kernel_cloud_reboot | bool - name: Reboot after panic From 0e1fe0e81fbc82238b7ad2de574a7ef0e8689ad3 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Wed, 23 Aug 2023 15:05:10 +0200 Subject: [PATCH 109/182] evolinux-base: Disable logcheck monitoring of journald --- evolinux-base/defaults/main.yml | 1 + evolinux-base/tasks/logs.yml | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/evolinux-base/defaults/main.yml b/evolinux-base/defaults/main.yml index 025196e9..66478655 100644 --- a/evolinux-base/defaults/main.yml +++ b/evolinux-base/defaults/main.yml @@ -174,6 +174,7 @@ evolinux_logs_default_dateext : True evolinux_logs_disable_logrotate_rsyslog: True evolinux_logs_rsyslog_conf: True evolinux_logrotate_dateformat: "-%Y%m%d%H" +evolinux_logs_disable_logcheck_journald: True # default www diff --git a/evolinux-base/tasks/logs.yml b/evolinux-base/tasks/logs.yml index a6dd97ad..0be15a4b 100644 --- a/evolinux-base/tasks/logs.yml +++ b/evolinux-base/tasks/logs.yml @@ -61,4 +61,12 @@ insertafter: 'dateext' when: evolinux_logs_default_dateext | bool +# Logcheck +- name: Disable logcheck monitoring of journald + ansible.builtin.lineinfile: + dest: /etc/logrotate.conf + line: "#journal" + regexp: "^journal" + when: evolinux_logs_disable_logcheck_journald | bool + - ansible.builtin.meta: flush_handlers From fe369257ed60ba1d856dd96663946f00109e77c5 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Wed, 23 Aug 2023 15:11:39 +0200 Subject: [PATCH 110/182] evolinux-base: Limit journald to 1 day --- evolinux-base/defaults/main.yml | 1 + evolinux-base/handlers/main.yml | 4 ++++ evolinux-base/tasks/logs.yml | 16 ++++++++++++++++ 3 files changed, 21 insertions(+) diff --git a/evolinux-base/defaults/main.yml b/evolinux-base/defaults/main.yml index 66478655..90ed4975 100644 --- a/evolinux-base/defaults/main.yml +++ b/evolinux-base/defaults/main.yml @@ -175,6 +175,7 @@ evolinux_logs_disable_logrotate_rsyslog: True evolinux_logs_rsyslog_conf: True evolinux_logrotate_dateformat: "-%Y%m%d%H" evolinux_logs_disable_logcheck_journald: True +evolinux_logs_journald_conf: True # default www diff --git a/evolinux-base/handlers/main.yml b/evolinux-base/handlers/main.yml index 1c6df437..b9211532 100644 --- a/evolinux-base/handlers/main.yml +++ b/evolinux-base/handlers/main.yml @@ -79,3 +79,7 @@ name: log2mail state: restarted +- name: restart systemd-journald + ansible.builtin.service: + name: systemd-journald.service + state: restarted diff --git a/evolinux-base/tasks/logs.yml b/evolinux-base/tasks/logs.yml index 0be15a4b..0e8df35f 100644 --- a/evolinux-base/tasks/logs.yml +++ b/evolinux-base/tasks/logs.yml @@ -69,4 +69,20 @@ regexp: "^journal" when: evolinux_logs_disable_logcheck_journald | bool +# Journald +- name: /etc/systemd/journald.conf.d/ is present + ansible.builtin.file: + path: /etc/systemd/journald.conf.d/ + state: directory + mode: "0755" + when: evolinux_logs_journald_conf | bool + +- name: Copy journald.conf + ansible.builtin.copy: + src: logs/journald.conf + dest: /etc/systemd/journald.conf.d/00-evolinux-default.conf + mode: "0644" + notify: restart systemd-journald + when: evolinux_logs_journald_conf | bool + - ansible.builtin.meta: flush_handlers From 53aab6f405c778eb6c338cedff9a2996e2bb1d6d Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Wed, 23 Aug 2023 15:12:21 +0200 Subject: [PATCH 111/182] evolinux-base: Add comments structure in logs --- evolinux-base/tasks/logs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/evolinux-base/tasks/logs.yml b/evolinux-base/tasks/logs.yml index 0e8df35f..75978711 100644 --- a/evolinux-base/tasks/logs.yml +++ b/evolinux-base/tasks/logs.yml @@ -2,6 +2,7 @@ # TODO: voir comment faire des backups initiaux des fichiers +# RSyslog - name: Copy rsyslog.conf ansible.builtin.copy: src: logs/rsyslog.conf @@ -10,6 +11,7 @@ notify: restart rsyslog when: evolinux_logs_rsyslog_conf | bool +# Logrotate - name: Disable logrotate default conf ansible.builtin.command: cmd: mv /etc/logrotate.d/rsyslog /etc/logrotate.d/rsyslog.disabled From b8b48bbcb9c15db3c11d03fb2df225ee21d2343a Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Wed, 23 Aug 2023 16:17:51 +0200 Subject: [PATCH 112/182] evocheck: Fix IS_SSHALLOWUSERS condition --- CHANGELOG.md | 1 + evocheck/files/evocheck.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d336a9d..51959413 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * redis: replace errorneous ini_file module for Munin config, fix dedicted Munin config filename (z-XXX). * evolinux-base, evolinux-users: Fix files mode under /etc/ssh/sshd_config.d * evolinux-base: Fix file extension +* evocheck: Fix IS_SSHALLOWUSERS condition ### Removed diff --git a/evocheck/files/evocheck.sh b/evocheck/files/evocheck.sh index d97020e7..65a26a3e 100755 --- a/evocheck/files/evocheck.sh +++ b/evocheck/files/evocheck.sh @@ -235,7 +235,7 @@ check_sshallowusers() { grep -E -qir "(AllowUsers|AllowGroups)" /etc/ssh/sshd_config.d \ || failed "IS_SSHALLOWUSERS" "missing AllowUsers or AllowGroups directive in sshd_config.d/*" grep -E -qir "(AllowUsers|AllowGroups)" /etc/ssh/sshd_config \ - || failed "IS_SSHALLOWUSERS" "AllowUsers or AllowGroups directive present in sshd_config" + && failed "IS_SSHALLOWUSERS" "AllowUsers or AllowGroups directive present in sshd_config" else grep -E -qir "(AllowUsers|AllowGroups)" /etc/ssh/sshd_config /etc/ssh/sshd_config.d \ || failed "IS_SSHALLOWUSERS" "missing AllowUsers or AllowGroups directive in sshd_config" From 8c72a7de8e28f9da9f32c72d73c86618b66d95d0 Mon Sep 17 00:00:00 2001 From: Eric Morino Date: Thu, 24 Aug 2023 15:23:32 +0200 Subject: [PATCH 113/182] New container lcx php82 in bookworm --- lxc-php/defaults/main.yml | 2 +- lxc-php/tasks/php82.yml | 63 ++++--------------- lxc-php/templates/bookworm_basics.sources.j2 | 8 +++ .../templates/bookworm_security.sources.j2 | 8 +++ 4 files changed, 30 insertions(+), 51 deletions(-) create mode 100644 lxc-php/templates/bookworm_basics.sources.j2 create mode 100644 lxc-php/templates/bookworm_security.sources.j2 diff --git a/lxc-php/defaults/main.yml b/lxc-php/defaults/main.yml index 17af05cf..578cfd2b 100644 --- a/lxc-php/defaults/main.yml +++ b/lxc-php/defaults/main.yml @@ -21,7 +21,7 @@ lxc_php_container_releases: php74: "bullseye" php80: "bullseye" php81: "bullseye" - php82: "bullseye" + php82: "bookworm" lxc_php_services: php56: 'php5-fpm.service' diff --git a/lxc-php/tasks/php82.yml b/lxc-php/tasks/php82.yml index acb47f76..c0f623c3 100644 --- a/lxc-php/tasks/php82.yml +++ b/lxc-php/tasks/php82.yml @@ -1,46 +1,23 @@ --- -- name: set APT keyring (Debian <12) - ansible.builtin.set_fact: - lxc_apt_keyring_dir: /etc/apt/trusted.gpg.d - when: ansible_distribution_major_version is version('12', '<') - -- name: set APT keyring (Debian >=12) - ansible.builtin.set_fact: - lxc_apt_keyring_dir: /etc/apt/keyrings - when: ansible_distribution_major_version is version('12', '>=') - -- name: "{{ lxc_php_version }} - Install dependency packages" +- name: "{{ lxc_php_version }} - Install PHP packages" community.general.lxc_container: name: "{{ lxc_php_version }}" - container_command: "DEBIAN_FRONTEND=noninteractive apt install -y wget apt-transport-https gnupg" + container_command: "DEBIAN_FRONTEND=noninteractive apt install -y php-fpm php-cli php-gd php-intl php-imap php-ldap php-mysql php-pgsql php-sqlite3 php-curl php-zip php-mbstring php-xml php-zip composer libphp-phpmailer" -- name: "{{ lxc_php_version }} - fix bullseye repository" - ansible.builtin.replace: - dest: "{{ lxc_rootfs }}/etc/apt/sources.list" - regexp: 'bullseye/updates' - replace: 'bullseye-security' - -- name: "{{ lxc_php_version }} - Add sury repo (Debian >=12)" +- name: "{{ lxc_php_version }} - system bookworm repository" ansible.builtin.template: - src: sury.sources.j2 - dest: /etc/apt/sources.list.d/sury.sources - mode: "0644" + src: bookworm_basics.sources.j2 + dest: "{{ lxc_rootfs }}/etc/apt/sources.list.d/system.sources" + force: true + mode: "0644" + +- name: "{{ lxc_php_version }} - security bookworm repository" + ansible.builtin.template: + src: bookworm_security.sources.j2 + dest: "{{ lxc_rootfs }}/etc/apt/sources.list.d/security.sources" force: true - register: sury_sources - when: ansible_distribution_major_version is version('12', '>=') - -- name: "{{ lxc_php_version }} - Add sury repo (Debian <12)" - ansible.builtin.lineinfile: - dest: "{{ lxc_rootfs }}/etc/apt/sources.list.d/sury.list" - line: "{{ item }}" - state: present - create: yes mode: "0644" - loop: - - "deb [signed-by={{ apt_keyring_dir }}/sury.gpg] https://packages.sury.org/php/ bullseye main" - - "deb [signed-by={{ apt_keyring_dir }}/pub_evolix.asc] http://pub.evolix.org/evolix bullseye-php82 main" - when: ansible_distribution_major_version is version('12', '<') - name: "Ensure {{ lxc_rootfs }}{{ apt_keyring_dir }} directory exists" file: @@ -53,16 +30,7 @@ - name: copy pub.evolix.org GPG key ansible.builtin.copy: src: pub_evolix.asc - dest: /var/lib/lxc/{{ lxc_php_version }}/rootfs{{ apt_keyring_dir }}/pub_evolix.asc - mode: "0644" - owner: root - group: root - when: ansible_distribution_major_version is version('12', '<') - -- name: copy packages.sury.org GPG Key - ansible.builtin.copy: - src: sury.gpg - dest: /var/lib/lxc/{{ lxc_php_version }}/rootfs{{ apt_keyring_dir }}/sury.gpg + dest: "{{ lxc_rootfs }}{{ lxc_apt_keyring_dir }}/pub_evolix.asc" mode: "0644" owner: root group: root @@ -72,11 +40,6 @@ name: "{{ lxc_php_version }}" container_command: "DEBIAN_FRONTEND=noninteractive apt update" -- name: "{{ lxc_php_version }} - Install PHP packages" - community.general.lxc_container: - name: "{{ lxc_php_version }}" - container_command: "DEBIAN_FRONTEND=noninteractive apt install -y php-fpm php-cli php-gd php-intl php-imap php-ldap php-mysql php-pgsql php-sqlite3 php-curl php-zip php-mbstring php-xml php-zip composer libphp-phpmailer" - - name: "{{ lxc_php_version }} - Copy evolinux PHP configuration" ansible.builtin.template: src: z-evolinux-defaults.ini.j2 diff --git a/lxc-php/templates/bookworm_basics.sources.j2 b/lxc-php/templates/bookworm_basics.sources.j2 new file mode 100644 index 00000000..948c4adf --- /dev/null +++ b/lxc-php/templates/bookworm_basics.sources.j2 @@ -0,0 +1,8 @@ +# {{ ansible_managed }} + +Types: deb +URIs: http://mirror.evolix.org/debian +Suites: bookworm bookworm-updates +Components: {{ apt_basics_components | mandatory }} +Enabled: yes +Signed-By: /usr/share/keyrings/debian-archive-bookworm-automatic.gpg diff --git a/lxc-php/templates/bookworm_security.sources.j2 b/lxc-php/templates/bookworm_security.sources.j2 new file mode 100644 index 00000000..07f1345b --- /dev/null +++ b/lxc-php/templates/bookworm_security.sources.j2 @@ -0,0 +1,8 @@ +# {{ ansible_managed }} + +Types: deb +URIs: https://security.debian.org/debian-security +Suites: bookworm-security +Components: {{ apt_basics_components | mandatory }} +Enabled: yes +Signed-By: /usr/share/keyrings/debian-archive-bookworm-security-automatic.gpg \ No newline at end of file From e71cffd8fd53d59814f21b3cd4dae16b028a966a Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Mon, 28 Aug 2023 17:08:33 +0200 Subject: [PATCH 114/182] php: add new variable to disable oveeriding settings of php-fpm default pool (www) --- CHANGELOG.md | 1 + php/defaults/main.yml | 13 +++++++------ php/tasks/config_fpm.yml | 6 ++++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51959413..37331aa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * fail2ban: add default variable fail2ban_dbpurgeage_default * fail2ban: add variable fail2ban_sshd_port to configure sshd port * nagios-nrpe: add a NRPE check-local command with completion. +* php: add new variable to disable oveeriding settings of php-fpm default pool (www) * policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory * userlogrotate: add a userlogpurge script disabled by default * userlogrotate: new version, with separate conf file diff --git a/php/defaults/main.yml b/php/defaults/main.yml index 2e633d0f..e43f01eb 100644 --- a/php/defaults/main.yml +++ b/php/defaults/main.yml @@ -1,12 +1,13 @@ --- -php_sury_enable: False -php_fpm_enable: False -php_apache_enable: False -php_symfony_requirements: False +php_sury_enable: false +php_fpm_enable: false +php_apache_enable: false +php_symfony_requirements: false -php_modules_mysqlnd: False +php_modules_mysqlnd: false -php_fpm_remove_default_pool: False +php_fpm_remove_default_pool: false +php_fpm_override_default_pool: true apt_keyring_dir: "{{ ansible_distribution_major_version is version('12', '<') | ternary('/etc/apt/trusted.gpg.d', '/etc/apt/keyrings') }}" \ No newline at end of file diff --git a/php/tasks/config_fpm.yml b/php/tasks/config_fpm.yml index 836559bf..690c050e 100644 --- a/php/tasks/config_fpm.yml +++ b/php/tasks/config_fpm.yml @@ -35,7 +35,7 @@ force: false notify: "restart {{ php_fpm_service_name }}" -- name: Set default PHP FPM values +- name: Set default pool (www) config values community.general.ini_file: dest: "{{ php_fpm_default_pool_file }}" section: www @@ -57,7 +57,9 @@ - { option: "pm.status_path", value: "/fpm_status" } - { option: "request_terminate_timeout", value: "60s" } notify: "restart {{ php_fpm_service_name }}" - when: ansible_distribution_major_version is version('9', '>=') + when: + - ansible_distribution_major_version is version('9', '>=') + - php_fpm_override_default_pool - name: Custom PHP FPM values ansible.builtin.copy: From 594146bdac5dedc456ad7c7b0120fcf0a6e0840c Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Tue, 29 Aug 2023 12:06:21 +0200 Subject: [PATCH 115/182] kibana: include tasks instead of import --- kibana/tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kibana/tasks/main.yml b/kibana/tasks/main.yml index bcfb852a..ef1b37f1 100644 --- a/kibana/tasks/main.yml +++ b/kibana/tasks/main.yml @@ -1,6 +1,7 @@ --- + - name: APT sources - ansible.builtin.import_tasks: apt_sources.yml + ansible.builtin.include_tasks: apt_sources.yml args: apply: tags: From 090495e920494117468a729eeb0169c654058b21 Mon Sep 17 00:00:00 2001 From: Eric Morino Date: Tue, 29 Aug 2023 15:07:35 +0200 Subject: [PATCH 116/182] =?UTF-8?q?Fix=20r=C3=B4le=20lxc-php=20for=20php82?= =?UTF-8?q?=20in=20bookworm=20container?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lxc-php/defaults/main.yml | 2 ++ lxc-php/tasks/php82.yml | 18 ++++++++++++++++-- lxc-php/templates/bookworm_security.sources.j2 | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lxc-php/defaults/main.yml b/lxc-php/defaults/main.yml index 578cfd2b..c0612f4e 100644 --- a/lxc-php/defaults/main.yml +++ b/lxc-php/defaults/main.yml @@ -33,3 +33,5 @@ lxc_php_services: php82: 'php8.2-fpm.service' apt_keyring_dir: "{{ ansible_distribution_major_version is version('12', '<') | ternary('/etc/apt/trusted.gpg.d', '/etc/apt/keyrings') }}" +apt_basics_components: "{{ (ansible_virtualization_role == 'host') | ternary('main contrib non-free', 'main') }}" + diff --git a/lxc-php/tasks/php82.yml b/lxc-php/tasks/php82.yml index c0f623c3..f8fe2f33 100644 --- a/lxc-php/tasks/php82.yml +++ b/lxc-php/tasks/php82.yml @@ -1,9 +1,18 @@ --- -- name: "{{ lxc_php_version }} - Install PHP packages" +- name: set APT keyring + ansible.builtin.set_fact: + lxc_apt_keyring_dir: /etc/apt/trusted.gpg.d + +- name: "{{ lxc_php_version }} - Install dependency packages" community.general.lxc_container: name: "{{ lxc_php_version }}" - container_command: "DEBIAN_FRONTEND=noninteractive apt install -y php-fpm php-cli php-gd php-intl php-imap php-ldap php-mysql php-pgsql php-sqlite3 php-curl php-zip php-mbstring php-xml php-zip composer libphp-phpmailer" + container_command: "DEBIAN_FRONTEND=noninteractive apt install -y wget gnupg" + +- name: "{{ lxc_php_version }} - delete sources.list bookworm repository" + ansible.builtin.file: + path: "{{ lxc_rootfs }}/etc/apt/sources.list" + state: absent - name: "{{ lxc_php_version }} - system bookworm repository" ansible.builtin.template: @@ -40,6 +49,11 @@ name: "{{ lxc_php_version }}" container_command: "DEBIAN_FRONTEND=noninteractive apt update" +- name: "{{ lxc_php_version }} - Install PHP packages" + community.general.lxc_container: + name: "{{ lxc_php_version }}" + container_command: "DEBIAN_FRONTEND=noninteractive apt install -y php-fpm php-cli php-gd php-intl php-imap php-ldap php-mysql php-pgsql php-sqlite3 php-curl php-zip php-mbstring php-xml php-zip composer libphp-phpmailer" + - name: "{{ lxc_php_version }} - Copy evolinux PHP configuration" ansible.builtin.template: src: z-evolinux-defaults.ini.j2 diff --git a/lxc-php/templates/bookworm_security.sources.j2 b/lxc-php/templates/bookworm_security.sources.j2 index 07f1345b..c98d5671 100644 --- a/lxc-php/templates/bookworm_security.sources.j2 +++ b/lxc-php/templates/bookworm_security.sources.j2 @@ -5,4 +5,4 @@ URIs: https://security.debian.org/debian-security Suites: bookworm-security Components: {{ apt_basics_components | mandatory }} Enabled: yes -Signed-By: /usr/share/keyrings/debian-archive-bookworm-security-automatic.gpg \ No newline at end of file +Signed-By: /usr/share/keyrings/debian-archive-bookworm-security-automatic.gpg From df202197c7945cdae020f7c023992750d2686a78 Mon Sep 17 00:00:00 2001 From: Eric Morino Date: Tue, 29 Aug 2023 15:28:09 +0200 Subject: [PATCH 117/182] Change lxc container in bookworm for php82 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37331aa5..3d240785 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * postfix: new spam.sh update script that avoids reloading if files did not change. * postgresql: fix task "update apt cache" for PGDG repo * postgresql: fix file postgresql.pref.j2 for exclude package +* lxc-php: Change lxc container in bookworm for php82 ### Fixed From e2dea8054ffccbda67f0a910df749a4063503f43 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 31 Aug 2023 11:24:52 +0200 Subject: [PATCH 118/182] kvm-host: add batch-mode and ignore stdin for SSH command in migrate-vm.sh --- CHANGELOG.md | 1 + kvm-host/files/migrate-vm.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d240785..df12ef75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * fail2ban: add default variable fail2ban_dbpurgeage_default * fail2ban: add default variable fail2ban_dbpurgeage_default * fail2ban: add variable fail2ban_sshd_port to configure sshd port +* kvm-host: add batch-mode and ignore stdin for SSH command in migrate-vm.sh * nagios-nrpe: add a NRPE check-local command with completion. * php: add new variable to disable oveeriding settings of php-fpm default pool (www) * policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory diff --git a/kvm-host/files/migrate-vm.sh b/kvm-host/files/migrate-vm.sh index b2244607..96a85ec2 100644 --- a/kvm-host/files/migrate-vm.sh +++ b/kvm-host/files/migrate-vm.sh @@ -88,7 +88,7 @@ execute_remotely() { command=${*} # shellcheck disable=SC2029 - ssh "${remote}" "${command}" + ssh -n -o BatchMode=yes "${remote}" "${command}" } set_drbd_role() { From 8ca7cc469279312d522fa8dc2c8c84d11d0acb02 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 31 Aug 2023 11:25:57 +0200 Subject: [PATCH 119/182] kvm-host: release 23.08 for migrate-vm.sh --- CHANGELOG.md | 2 +- kvm-host/files/migrate-vm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df12ef75..762f4c3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * fail2ban: add default variable fail2ban_dbpurgeage_default * fail2ban: add default variable fail2ban_dbpurgeage_default * fail2ban: add variable fail2ban_sshd_port to configure sshd port -* kvm-host: add batch-mode and ignore stdin for SSH command in migrate-vm.sh +* kvm-host: release 23.08 for migrate-vm.sh * nagios-nrpe: add a NRPE check-local command with completion. * php: add new variable to disable oveeriding settings of php-fpm default pool (www) * policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory diff --git a/kvm-host/files/migrate-vm.sh b/kvm-host/files/migrate-vm.sh index 96a85ec2..29a307ce 100644 --- a/kvm-host/files/migrate-vm.sh +++ b/kvm-host/files/migrate-vm.sh @@ -11,7 +11,7 @@ # * migrate "from" # * switch to Bash to use local and readonly variables -VERSION="21.04.1" +VERSION="23.08" show_version() { cat < Date: Thu, 31 Aug 2023 14:45:21 +0200 Subject: [PATCH 120/182] ajout hook certbot pour ProFTPD --- certbot/files/hooks/deploy/proftpd.sh | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 certbot/files/hooks/deploy/proftpd.sh diff --git a/certbot/files/hooks/deploy/proftpd.sh b/certbot/files/hooks/deploy/proftpd.sh new file mode 100755 index 00000000..2a28fb07 --- /dev/null +++ b/certbot/files/hooks/deploy/proftpd.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +readonly PROGNAME=$(basename "$0") +readonly ARGS=$@ + +readonly VERBOSE=${VERBOSE:-"0"} +readonly QUIET=${QUIET:-"0"} + +error() { + >&2 echo "${PROGNAME}: $1" + exit 1 +} +debug() { + if [ "${VERBOSE}" = "1" ] && [ "${QUIET}" != "1" ]; then + >&2 echo "${PROGNAME}: $1" + fi +} + +if [ -n "$(pidof proftpd)" ]; then + if $($(command -v proftpd) -t 2> /dev/null); then + debug "ProFTPD detected... reloading" + service proftpd reload + else + error "ProFTPD config is broken, you must fix it !" + fi +else + debug "ProFTPD is not running. Skip." +fi From 73c0a0d29ad2af38dc67d0838e159f087735bee5 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Thu, 31 Aug 2023 17:09:13 +0200 Subject: [PATCH 121/182] evolinux-base: include files under sshd_config.d In case we need to add the Include directive, we add it at the beginning of the global configuration file. This way the Include directive can't be inside a Match directive. --- CHANGELOG.md | 1 + evolinux-base/tasks/root.yml | 10 ++++++++++ evolinux-base/tasks/ssh.included-files.yml | 7 +++++++ 3 files changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 762f4c3c..31b66e69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * postgresql: fix task "update apt cache" for PGDG repo * postgresql: fix file postgresql.pref.j2 for exclude package * lxc-php: Change lxc container in bookworm for php82 +* evolinux-base: include files under `sshd_config.d` ### Fixed diff --git a/evolinux-base/tasks/root.yml b/evolinux-base/tasks/root.yml index 183def7c..5db27cfb 100644 --- a/evolinux-base/tasks/root.yml +++ b/evolinux-base/tasks/root.yml @@ -101,6 +101,16 @@ - evolinux_root_disable_ssh | bool - ansible_distribution_major_version is version('11', '<=') +- name: files under /etc/ssh/sshd_config.d are included (Debian >= 12) + ansible.builtin.lineinfile: + path: /etc/ssh/sshd_config + line: "Include /etc/ssh/sshd_config.d/*.conf" + insertbefore: BOF + notify: reload ssh + when: + - evolinux_root_disable_ssh | bool + - ansible_distribution_major_version is version('12', '>=') + - name: disable SSH access for root (Debian >= 12) ansible.builtin.replace: path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf diff --git a/evolinux-base/tasks/ssh.included-files.yml b/evolinux-base/tasks/ssh.included-files.yml index 87e9de5e..bb3538d6 100644 --- a/evolinux-base/tasks/ssh.included-files.yml +++ b/evolinux-base/tasks/ssh.included-files.yml @@ -3,6 +3,13 @@ msg: "Warning: empty 'evolinux_ssh_password_auth_addresses' variable, some configuration elements won't be set!" when: evolinux_ssh_password_auth_addresses == [] +- name: files under /etc/ssh/sshd_config.d are included + ansible.builtin.lineinfile: + path: /etc/ssh/sshd_config + line: "Include /etc/ssh/sshd_config.d/*.conf" + insertbefore: BOF + notify: reload ssh + - name: add SSH server configuration template ansible.builtin.template: src: sshd/defaults.j2 From ec4fd5d27f22c0f42cfb35626b60a848dfd05e6d Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Thu, 31 Aug 2023 17:02:54 +0200 Subject: [PATCH 122/182] postfix: Move common packages installation in common.yml --- postfix/tasks/common.yml | 9 +++++++++ postfix/tasks/minimal.yml | 6 ------ postfix/tasks/packmail.yml | 4 +--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/postfix/tasks/common.yml b/postfix/tasks/common.yml index 29e6dd07..6c4d3407 100644 --- a/postfix/tasks/common.yml +++ b/postfix/tasks/common.yml @@ -1,5 +1,14 @@ --- +- name: Postfix packages are installed + ansible.builtin.apt: + name: + - postfix + - mailgraph + state: present + tags: + - postfix + - name: check if main.cf is default ansible.builtin.shell: cmd: 'grep -v -E "^(myhostname|mydestination|mailbox_command)" /etc/postfix/main.cf | md5sum -' diff --git a/postfix/tasks/minimal.yml b/postfix/tasks/minimal.yml index 36327b3e..8a782782 100644 --- a/postfix/tasks/minimal.yml +++ b/postfix/tasks/minimal.yml @@ -1,10 +1,4 @@ --- -- name: ensure packages are installed - ansible.builtin.apt: - name: postfix - state: present - tags: - - postfix - name: create minimal main.cf ansible.builtin.template: diff --git a/postfix/tasks/packmail.yml b/postfix/tasks/packmail.yml index 6562e0d3..c07c2b60 100644 --- a/postfix/tasks/packmail.yml +++ b/postfix/tasks/packmail.yml @@ -1,11 +1,9 @@ --- -- name: ensure packages are installed +- name: Complementary packmail packages are installed ansible.builtin.apt: name: - - postfix - postfix-ldap - postfix-policyd-spf-python - - mailgraph state: present tags: - postfix From bfe3bd7ef4edd65002b98d0b3623425e52e1b85f Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Thu, 31 Aug 2023 17:10:11 +0200 Subject: [PATCH 123/182] postfix: Replace ansible_fqdn by evolinux_fqdn, set postfix_slow_transport_include to false by default (only for packmails and packwebs) --- postfix/defaults/main.yml | 4 ++-- postfix/templates/packmail_main.cf.j2 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/postfix/defaults/main.yml b/postfix/defaults/main.yml index 55ab72cd..8bd15a86 100644 --- a/postfix/defaults/main.yml +++ b/postfix/defaults/main.yml @@ -1,5 +1,5 @@ --- -postfix_hostname: "{{ ansible_fqdn }}" +postfix_hostname: "{{ evolinux_fqdn }}" postfix_force_main_cf: False postfix_packmail: False -postfix_slow_transport_include: "{{ postfix_packmail }}" +postfix_slow_transport_include: False diff --git a/postfix/templates/packmail_main.cf.j2 b/postfix/templates/packmail_main.cf.j2 index 0d80cf00..30848c8c 100644 --- a/postfix/templates/packmail_main.cf.j2 +++ b/postfix/templates/packmail_main.cf.j2 @@ -66,7 +66,7 @@ smtpd_banner = $myhostname ESMTP mail server # Indique le nom d'hote pleinement qualifie ou se trouve postfix [OBLIGATOIRE] #par defaut, = [retour de la commande Unix hostname] -myhostname = {{ ansible_fqdn }} +myhostname = {{ postfix_hostname }} # Variable indiquant le domaine dans lequel se trouve la machine #par defaut, = [partie domain de la variable $myhostname] From a440110cadb437bfa98aa870e5fe545aba2829fb Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Thu, 31 Aug 2023 17:30:14 +0200 Subject: [PATCH 124/182] evolinux-base: include postfix role, move exim4 purge from evolinux-base to postfix role --- evolinux-base/defaults/main.yml | 3 +-- evolinux-base/files/cert.sh | 37 +++++++++++++++++++++++++++ evolinux-base/tasks/postfix.yml | 45 ++------------------------------- postfix/defaults/main.yml | 1 + postfix/tasks/common.yml | 13 ++++++++++ 5 files changed, 54 insertions(+), 45 deletions(-) create mode 100644 evolinux-base/files/cert.sh diff --git a/evolinux-base/defaults/main.yml b/evolinux-base/defaults/main.yml index 90ed4975..e0b6ad6b 100644 --- a/evolinux-base/defaults/main.yml +++ b/evolinux-base/defaults/main.yml @@ -162,7 +162,6 @@ evolinux_postfix_packages: True evolinux_postfix_users_alias_root: True evolinux_postfix_mailer_alias_root: True evolinux_postfix_root_alias: True -evolinux_postfix_purge_exim: True # logs @@ -232,4 +231,4 @@ evolinux_cron_checkhpraid_frequency: daily evolinux_motd_include: True # Utils -evolinux_utils_include: True \ No newline at end of file +evolinux_utils_include: True diff --git a/evolinux-base/files/cert.sh b/evolinux-base/files/cert.sh new file mode 100644 index 00000000..f43a9dad --- /dev/null +++ b/evolinux-base/files/cert.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# +# Shortcut to show certificate content or enddate. +# + +usage() { + echo "Usage : cert [date] " +} + +if [ "$#" -eq 1 ]; then + cert_path=$1 + if [ -f "${cert_path}" ]; then + openssl x509 -noout -in "${cert_path}" -text + else + >&2 echo "Error, file ${cert_path} does not exist." + fi + +elif [ "$#" -eq 2 ]; then + if [ "$1" = "date" ]; then + cert_path=$2 + if [ -f "${cert_path}" ]; then + openssl x509 -noout -in "$cert_path" -enddate + else + >&2 echo "Error, file ${cert_path} does not exist." + fi + else + >&2 echo "Error, two arguments provided but 'date' is only allowed as first." + usage + exit 1 + fi + +else + >&2 echo "Error, more than two arguments provided." + usage + exit 1 +fi + diff --git a/evolinux-base/tasks/postfix.yml b/evolinux-base/tasks/postfix.yml index d9dba3e2..c806b49f 100644 --- a/evolinux-base/tasks/postfix.yml +++ b/evolinux-base/tasks/postfix.yml @@ -1,33 +1,7 @@ --- -- name: Postfix packages are installed - ansible.builtin.apt: - name: - - postfix - - mailgraph - state: present - tags: - - packages - - postfix - when: evolinux_postfix_packages | bool - -- name: configure postfix myhostname - ansible.builtin.lineinfile: - dest: /etc/postfix/main.cf - state: present - line: "myhostname = {{ evolinux_fqdn }}" - regexp: '^myhostname' - notify: reload postfix - tags: - - postfix - -- name: configure postfix mynetworks - ansible.builtin.lineinfile: - dest: /etc/postfix/main.cf - state: present - line: "mydestination = {{ [evolinux_fqdn, evolinux_internal_fqdn] | unique | join(' ') }} localhost.localdomain localhost localhost.$mydomain" - regexp: '^mydestination' - notify: reload postfix +- ansible.builtin.include_role: + name: evolix/postfix tags: - postfix @@ -81,18 +55,3 @@ - ansible.builtin.meta: flush_handlers -- name: exim4 is absent - ansible.builtin.apt: - name: - - exim4 - - exim4-base - - exim4-config - - exim4-daemon-light - purge: yes - state: absent - tags: - - packages - - postfix - when: evolinux_postfix_purge_exim | bool - -- ansible.builtin.meta: flush_handlers diff --git a/postfix/defaults/main.yml b/postfix/defaults/main.yml index 8bd15a86..50b0185e 100644 --- a/postfix/defaults/main.yml +++ b/postfix/defaults/main.yml @@ -3,3 +3,4 @@ postfix_hostname: "{{ evolinux_fqdn }}" postfix_force_main_cf: False postfix_packmail: False postfix_slow_transport_include: False +postfix_purge_exim: True diff --git a/postfix/tasks/common.yml b/postfix/tasks/common.yml index 6c4d3407..82ea77c3 100644 --- a/postfix/tasks/common.yml +++ b/postfix/tasks/common.yml @@ -9,6 +9,19 @@ tags: - postfix +- name: exim4 is absent + ansible.builtin.apt: + name: + - exim4 + - exim4-base + - exim4-config + - exim4-daemon-light + purge: yes + state: absent + tags: + - postfix + when: postfix_purge_exim | bool + - name: check if main.cf is default ansible.builtin.shell: cmd: 'grep -v -E "^(myhostname|mydestination|mailbox_command)" /etc/postfix/main.cf | md5sum -' From e289fd71191117a57a15b36e94fdf2ab3aeef7a8 Mon Sep 17 00:00:00 2001 From: Gregory Colpart Date: Thu, 31 Aug 2023 17:38:46 +0200 Subject: [PATCH 125/182] =?UTF-8?q?j'ai=20refait=20le=20script=20par=20rap?= =?UTF-8?q?port=20aux=20autres=20mod=C3=A8les?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- certbot/files/hooks/deploy/proftpd.sh | 46 ++++++++++++++++++--------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/certbot/files/hooks/deploy/proftpd.sh b/certbot/files/hooks/deploy/proftpd.sh index 2a28fb07..1921458c 100755 --- a/certbot/files/hooks/deploy/proftpd.sh +++ b/certbot/files/hooks/deploy/proftpd.sh @@ -1,11 +1,5 @@ #!/bin/sh -readonly PROGNAME=$(basename "$0") -readonly ARGS=$@ - -readonly VERBOSE=${VERBOSE:-"0"} -readonly QUIET=${QUIET:-"0"} - error() { >&2 echo "${PROGNAME}: $1" exit 1 @@ -15,14 +9,36 @@ debug() { >&2 echo "${PROGNAME}: $1" fi } - -if [ -n "$(pidof proftpd)" ]; then - if $($(command -v proftpd) -t 2> /dev/null); then - debug "ProFTPD detected... reloading" - service proftpd reload +daemon_found_and_running() { + test -n "$(pidof proftpd)" && test -n "${proftpd_bin}" +} +config_check() { + ${proftpd_bin} configtest > /dev/null 2>&1 +} +letsencrypt_used() { + grep -q -r -E "letsencrypt" /etc/proftpd/ +} +main() { + if daemon_found_and_running; then + if letsencrypt_used; then + if config_check; then + debug "ProFTPD detected... reloading" + systemctl reload proftpd + else + error "ProFTPD config is broken, you must fix it !" + fi + else + debug "ProFTPD doesn't use Let's Encrypt certificate. Skip." + fi else - error "ProFTPD config is broken, you must fix it !" + debug "ProFTPD is not running or missing. Skip." fi -else - debug "ProFTPD is not running. Skip." -fi +} + +readonly PROGNAME=$(basename "$0") +readonly VERBOSE=${VERBOSE:-"0"} +readonly QUIET=${QUIET:-"0"} + +readonly proftpd_bin=$(command -v proftpd) + +main From 5b63ba112c1bfe8d3c10c159f9694f458fc4acb3 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Thu, 31 Aug 2023 17:47:49 +0200 Subject: [PATCH 126/182] Revert "evolinux-base: include postfix role, move exim4 purge from evolinux-base to postfix role" This reverts commit a440110cadb437bfa98aa870e5fe545aba2829fb. --- evolinux-base/defaults/main.yml | 3 ++- evolinux-base/files/cert.sh | 37 --------------------------- evolinux-base/tasks/postfix.yml | 45 +++++++++++++++++++++++++++++++-- postfix/defaults/main.yml | 1 - postfix/tasks/common.yml | 13 ---------- 5 files changed, 45 insertions(+), 54 deletions(-) delete mode 100644 evolinux-base/files/cert.sh diff --git a/evolinux-base/defaults/main.yml b/evolinux-base/defaults/main.yml index e0b6ad6b..90ed4975 100644 --- a/evolinux-base/defaults/main.yml +++ b/evolinux-base/defaults/main.yml @@ -162,6 +162,7 @@ evolinux_postfix_packages: True evolinux_postfix_users_alias_root: True evolinux_postfix_mailer_alias_root: True evolinux_postfix_root_alias: True +evolinux_postfix_purge_exim: True # logs @@ -231,4 +232,4 @@ evolinux_cron_checkhpraid_frequency: daily evolinux_motd_include: True # Utils -evolinux_utils_include: True +evolinux_utils_include: True \ No newline at end of file diff --git a/evolinux-base/files/cert.sh b/evolinux-base/files/cert.sh deleted file mode 100644 index f43a9dad..00000000 --- a/evolinux-base/files/cert.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# -# Shortcut to show certificate content or enddate. -# - -usage() { - echo "Usage : cert [date] " -} - -if [ "$#" -eq 1 ]; then - cert_path=$1 - if [ -f "${cert_path}" ]; then - openssl x509 -noout -in "${cert_path}" -text - else - >&2 echo "Error, file ${cert_path} does not exist." - fi - -elif [ "$#" -eq 2 ]; then - if [ "$1" = "date" ]; then - cert_path=$2 - if [ -f "${cert_path}" ]; then - openssl x509 -noout -in "$cert_path" -enddate - else - >&2 echo "Error, file ${cert_path} does not exist." - fi - else - >&2 echo "Error, two arguments provided but 'date' is only allowed as first." - usage - exit 1 - fi - -else - >&2 echo "Error, more than two arguments provided." - usage - exit 1 -fi - diff --git a/evolinux-base/tasks/postfix.yml b/evolinux-base/tasks/postfix.yml index c806b49f..d9dba3e2 100644 --- a/evolinux-base/tasks/postfix.yml +++ b/evolinux-base/tasks/postfix.yml @@ -1,7 +1,33 @@ --- -- ansible.builtin.include_role: - name: evolix/postfix +- name: Postfix packages are installed + ansible.builtin.apt: + name: + - postfix + - mailgraph + state: present + tags: + - packages + - postfix + when: evolinux_postfix_packages | bool + +- name: configure postfix myhostname + ansible.builtin.lineinfile: + dest: /etc/postfix/main.cf + state: present + line: "myhostname = {{ evolinux_fqdn }}" + regexp: '^myhostname' + notify: reload postfix + tags: + - postfix + +- name: configure postfix mynetworks + ansible.builtin.lineinfile: + dest: /etc/postfix/main.cf + state: present + line: "mydestination = {{ [evolinux_fqdn, evolinux_internal_fqdn] | unique | join(' ') }} localhost.localdomain localhost localhost.$mydomain" + regexp: '^mydestination' + notify: reload postfix tags: - postfix @@ -55,3 +81,18 @@ - ansible.builtin.meta: flush_handlers +- name: exim4 is absent + ansible.builtin.apt: + name: + - exim4 + - exim4-base + - exim4-config + - exim4-daemon-light + purge: yes + state: absent + tags: + - packages + - postfix + when: evolinux_postfix_purge_exim | bool + +- ansible.builtin.meta: flush_handlers diff --git a/postfix/defaults/main.yml b/postfix/defaults/main.yml index 50b0185e..8bd15a86 100644 --- a/postfix/defaults/main.yml +++ b/postfix/defaults/main.yml @@ -3,4 +3,3 @@ postfix_hostname: "{{ evolinux_fqdn }}" postfix_force_main_cf: False postfix_packmail: False postfix_slow_transport_include: False -postfix_purge_exim: True diff --git a/postfix/tasks/common.yml b/postfix/tasks/common.yml index 82ea77c3..6c4d3407 100644 --- a/postfix/tasks/common.yml +++ b/postfix/tasks/common.yml @@ -9,19 +9,6 @@ tags: - postfix -- name: exim4 is absent - ansible.builtin.apt: - name: - - exim4 - - exim4-base - - exim4-config - - exim4-daemon-light - purge: yes - state: absent - tags: - - postfix - when: postfix_purge_exim | bool - - name: check if main.cf is default ansible.builtin.shell: cmd: 'grep -v -E "^(myhostname|mydestination|mailbox_command)" /etc/postfix/main.cf | md5sum -' From 1b6700925c4690e026b6873e6e2358de86ccf706 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Thu, 31 Aug 2023 17:47:58 +0200 Subject: [PATCH 127/182] Revert "postfix: Replace ansible_fqdn by evolinux_fqdn, set postfix_slow_transport_include to false by default (only for packmails and packwebs)" This reverts commit bfe3bd7ef4edd65002b98d0b3623425e52e1b85f. --- postfix/defaults/main.yml | 4 ++-- postfix/templates/packmail_main.cf.j2 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/postfix/defaults/main.yml b/postfix/defaults/main.yml index 8bd15a86..55ab72cd 100644 --- a/postfix/defaults/main.yml +++ b/postfix/defaults/main.yml @@ -1,5 +1,5 @@ --- -postfix_hostname: "{{ evolinux_fqdn }}" +postfix_hostname: "{{ ansible_fqdn }}" postfix_force_main_cf: False postfix_packmail: False -postfix_slow_transport_include: False +postfix_slow_transport_include: "{{ postfix_packmail }}" diff --git a/postfix/templates/packmail_main.cf.j2 b/postfix/templates/packmail_main.cf.j2 index 30848c8c..0d80cf00 100644 --- a/postfix/templates/packmail_main.cf.j2 +++ b/postfix/templates/packmail_main.cf.j2 @@ -66,7 +66,7 @@ smtpd_banner = $myhostname ESMTP mail server # Indique le nom d'hote pleinement qualifie ou se trouve postfix [OBLIGATOIRE] #par defaut, = [retour de la commande Unix hostname] -myhostname = {{ postfix_hostname }} +myhostname = {{ ansible_fqdn }} # Variable indiquant le domaine dans lequel se trouve la machine #par defaut, = [partie domain de la variable $myhostname] From 7ad296e74ff8e6d7ec0d2434e30d46e41b109d03 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Thu, 31 Aug 2023 17:48:00 +0200 Subject: [PATCH 128/182] Revert "postfix: Move common packages installation in common.yml" This reverts commit ec4fd5d27f22c0f42cfb35626b60a848dfd05e6d. --- postfix/tasks/common.yml | 9 --------- postfix/tasks/minimal.yml | 6 ++++++ postfix/tasks/packmail.yml | 4 +++- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/postfix/tasks/common.yml b/postfix/tasks/common.yml index 6c4d3407..29e6dd07 100644 --- a/postfix/tasks/common.yml +++ b/postfix/tasks/common.yml @@ -1,14 +1,5 @@ --- -- name: Postfix packages are installed - ansible.builtin.apt: - name: - - postfix - - mailgraph - state: present - tags: - - postfix - - name: check if main.cf is default ansible.builtin.shell: cmd: 'grep -v -E "^(myhostname|mydestination|mailbox_command)" /etc/postfix/main.cf | md5sum -' diff --git a/postfix/tasks/minimal.yml b/postfix/tasks/minimal.yml index 8a782782..36327b3e 100644 --- a/postfix/tasks/minimal.yml +++ b/postfix/tasks/minimal.yml @@ -1,4 +1,10 @@ --- +- name: ensure packages are installed + ansible.builtin.apt: + name: postfix + state: present + tags: + - postfix - name: create minimal main.cf ansible.builtin.template: diff --git a/postfix/tasks/packmail.yml b/postfix/tasks/packmail.yml index c07c2b60..6562e0d3 100644 --- a/postfix/tasks/packmail.yml +++ b/postfix/tasks/packmail.yml @@ -1,9 +1,11 @@ --- -- name: Complementary packmail packages are installed +- name: ensure packages are installed ansible.builtin.apt: name: + - postfix - postfix-ldap - postfix-policyd-spf-python + - mailgraph state: present tags: - postfix From cfca6046705738e7706cadf1ecb12a6e87075ef4 Mon Sep 17 00:00:00 2001 From: Mathieu Trossevin Date: Tue, 5 Sep 2023 15:21:08 +0200 Subject: [PATCH 129/182] nagios-nrpe: Add proper plugin to monitor glusterfs health --- CHANGELOG.md | 1 + evolinux-users/templates/sudoers.j2 | 3 +- nagios-nrpe/files/plugins/check_gluster.rb | 370 +++++++++++++++++++++ 3 files changed, 373 insertions(+), 1 deletion(-) create mode 100755 nagios-nrpe/files/plugins/check_gluster.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 31b66e69..3007e593 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * fail2ban: add variable fail2ban_sshd_port to configure sshd port * kvm-host: release 23.08 for migrate-vm.sh * nagios-nrpe: add a NRPE check-local command with completion. +* nagios-nrpe: add a proper monitoring plugin for glusterfs (on servers, not for clients) * php: add new variable to disable oveeriding settings of php-fpm default pool (www) * policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory * userlogrotate: add a userlogpurge script disabled by default diff --git a/evolinux-users/templates/sudoers.j2 b/evolinux-users/templates/sudoers.j2 index 29a22da7..60b5b782 100644 --- a/evolinux-users/templates/sudoers.j2 +++ b/evolinux-users/templates/sudoers.j2 @@ -23,7 +23,8 @@ nagios ALL = NOPASSWD: /sbin/megacli -LdInfo -Lall -aALL -NoLog nagios ALL = NOPASSWD: /sbin/megacli -AdpBbuCmd -GetBbuStatus -aALL -NoLog nagios ALL = NOPASSWD: /sbin/ssacli controller all show status nagios ALL = NOPASSWD: /sbin/ssacli controller slot=0 logicaldrive all show - +nagios ALL = NOPASSWD: /usr/local/lib/nagios/plugins/check_gluster.rb + nagios ALL = (clamav) NOPASSWD: /usr/bin/clamscan /tmp/safe.txt %{{ evolinux_sudo_group }} ALL=(ALL:ALL) ALL diff --git a/nagios-nrpe/files/plugins/check_gluster.rb b/nagios-nrpe/files/plugins/check_gluster.rb new file mode 100755 index 00000000..35cb44ef --- /dev/null +++ b/nagios-nrpe/files/plugins/check_gluster.rb @@ -0,0 +1,370 @@ +#!/usr/bin/env ruby + +# We use old ruby 1.8.7 +# rubocop:disable Style/HashSyntax + +# We match all exceptions except SystemExit to redefine exit status for nagios +# rubocop:disable Lint/RescueException + +# Other disables +# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Metrics/MethodLength, Metrics/ClassLength + +# Nagios exit codes +module NagiosStatus + OK = 0 + WARNING = 1 + CRITICAL = 2 +end + +# Top level module +module CheckGluster + require 'optparse' + + PARAMS = { + # gluster command + :gluster_command => '/usr/sbin/gluster', + :glusterd_pid_path => '/var/run/glusterd.pid', + # Daemons to check with gluster volume status + :check_running_daemons => { + 'bitrot' => ['Bitrot Daemon', 'Scrubber Daemon'], + 'heal' => ['Self-heal Daemon'], + 'nfs' => ['NFS Server'] + }, + # Parameters to re-run failed command + :rerun => { :times => 10, :delay => 0.5 }, + # persistent state file + :state_file => '/var/run/check_gluster_state.yaml', + :state_ttl => 1200, + :self_name => '127.0.0.1' + }.freeze + + # Parse command line options + class OptionsParser + attr_reader :checks, :state_file, :state_ttl, :self_name + + def initialize + @checks = PARAMS[:check_running_daemons].keys + @state_file = PARAMS[:state_file] + @state_ttl = PARAMS[:state_ttl] + @self_name = PARAMS[:self_name] + end + + def parse! + option_parser = OptionParser.new + + option_parser.on( + '-c', + '--checks ' + @checks.join(','), + Array, + 'Checks to run. Default is ' + @checks.join(',') + ) do |list| + list.each do |check| + raise OptionParser::InvalidOption, check.to_s unless @checks.include? check + end + @checks = list + end + + option_parser.on( + '-s', + '--state-file /path/to/file', + String, + 'State storage file. Default is ' + @state_file + ) do |x| + @state_file = x.to_s + end + + option_parser.on( + '-n', + '--self-name address', + String, + 'IP of self as far as glusterd know. Default is ' + @self_name + ) do |x| + @self_name = x.to_s + end + + option_parser.on( + '-t', + '--ttl seconds', + Integer, + 'State storage TTL. Default is ' + @state_ttl.to_s + ) do |x| + @state_ttl = x.to_i + end + + begin + option_parser.parse! + @checks + rescue OptionParser::InvalidOption, OptionParser::MissingArgument, OptionParser::InvalidArgument => ex + puts "Error: #{ex.message}" + puts option_parser.help + exit(NagiosStatus::CRITICAL) + end + end + end + + # Actual check class + class Check + begin + require 'open3' + require 'rubygems' + $VERBOSE = nil + require 'crack' + $VERBOSE = true + require 'socket' + require 'yaml' + rescue Exception => ex + puts ex.message + exit(NagiosStatus::CRITICAL) + end + + def initialize(*var) + var = var.shift + @state_file = var.nil? && var[:state_file].nil? ? PARAMS[:state_file] : var[:state_file] + @state_ttl = var.nil? && var[:state_ttl].nil? ? PARAMS[:state_ttl] : var[:state_ttl] + end + + def check_glusterd + pid = File.open(PARAMS[:glusterd_pid_path], &:readline).to_i + Process.kill('CHLD', pid) + rescue Errno::ESRCH + raise 'Glusterd is not running' + end + + def get_services_from_checks(checks) + services = [] + checks.each do |check| + PARAMS[:check_running_daemons][check].each do |service| + services.concat(any_to_array(service)) + end + end + services + end + + def gluster(command, xml = true) + data = { 'stdout' => '', 'error' => '', 'status' => 1 } + command = '--xml ' + command if xml + Open3.popen3(PARAMS[:gluster_command] + ' ' + command) do |stdin, stdout, stderr, wait_thr| + stdin.close + data['stdout'] = stdout.read + data['sterr'] = stderr.read + data['status'] = wait_thr.value + end + raise data['status'].to_s + ' : ' + data['stdout'] unless data['status'].success? + return data['stdout'] unless xml + data = Crack::XML.parse(data['stdout']) + if data['cliOutput']['opRet'].to_i != 0 || data['cliOutput']['opErrno'].to_i != 0 + raise "Error on #{command} : #{data['cliOutput']['opErrstr']}" + end + data['cliOutput'] + end + + def peer_status + peers = gluster('peer status')['peerStatus']['peer'] + peers = any_to_array(peers) + peers.each do |peer| + raise "#{peer['hostname']} is disconnected" unless peer['connected'].to_i == 1 + raise "#{peer['hostname']} has wrong state #{peer['state']}" unless peer['state'].to_i == 3 + end + end + + def pool_list + peers = gluster('pool list')['peerStatus']['peer'] + peers = any_to_array(peers) + peers.each do |peer| + raise "#{peer['hostname']} is disconnected" unless peer['connected'].to_i == 1 + raise "#{peer['hostname']} has wrong state #{peer['state']}" if peer['hostname'] != 'localhost' && peer['state'].to_i != 3 + end + end + + def volume_list + volumes = gluster('volume list')['volList']['volume'] + any_to_array(volumes) + end + + def volume_info(volume) + volume = gluster("volume info #{volume}")['volInfo']['volumes']['volume'] + raise "volume #{volume['name']} is stopped" unless volume['status'].to_i == 1 + # volume info is not well formated XML + volume['bricks']['brick'].map { |s| s.gsub(/.*/, '').split(':') } + end + + def volume_status(volume, bricks, checks, self_name) + nodes = gluster("volume status #{volume}")['volStatus']['volumes']['volume']['node'] + nodes = any_to_array(nodes) + # Check that all bricks are running + bricks.each do |brick| + raise "volume #{brick[0]}:#{brick[1]} is not running" unless check_running(nodes, brick[0], brick[1]) + # Check that processes are running + get_services_from_checks(checks).each do |daemon| + brick_to_check = brick[0] + if brick[0] == self_name + brick_to_check = 'localhost' + end + raise "Daemon #{brick[0]}:\"#{daemon}\" is not started" unless check_running(nodes, daemon, brick_to_check) + end + end + end + + def check_running(nodes, hostname, path) + nodes.each do |node| + return true if node['hostname'] == hostname && node['path'] == path && node['status'].to_i == 1 + end + false + end + + def volume_heal_info(volume) + info = gluster("volume heal #{volume} info", false).split("\n") + info = parse_heal(info) + if @state_ttl > 0 + info = merge_heal(load_state(@state_file), info) + store_state(@state_file, info) + end + split_entries = [] + time = Time.now.to_i + info.each do |brick, data| + raise "Brick #{brick} is disconnected" unless data['status'] + data['content'].each do |line, saved_time| + if @state_ttl == 0 + split_entries.push(brick + line) + elsif time - saved_time >= @state_ttl + split_entries.push(brick + line + '=' + (time - saved_time).to_s + 's') + end + end + end + raise 'Files are split-brained : ' + split_entries.join(' ') unless split_entries.empty? + end + + def parse_heal(info) + bricks = {} + brick = '' + time = Time.now.to_i + info.each do |line| + if line =~ /^Brick / + brick = line.gsub(/^Brick /, '') + bricks[brick] = { 'content' => {} } + elsif line =~ /^Status: Connected/ + bricks[brick]['status'] = true + elsif line =~ /^Status.*/ + bricks[brick]['status'] = false + elsif line =~ /^Number of entries: / + bricks[brick]['entries'] = line.gsub(/^Number of entries: /, '').to_i + else + line.gsub!(/\s+$/, '') + bricks[brick]['content'][line] = time if line != '' + end + end + bricks + end + + def merge_heal(old, new) + old.each do |brick, data| + data['content'].each do |line, time| + new[brick]['content'][line] = time if new.key?(brick) && new[brick]['content'].key?(line) + end + end + new + end + + def store_state(file, data) + fh = File.open(file, File::WRONLY | File::CREAT | File::TRUNC, 0600) + fh.flock(File::LOCK_EX) + fh.write(data.to_yaml) + fh.close + end + + def load_state(file) + return {} unless File.exist?(file) + fh = File.open(file, File::RDONLY) + fh.flock(File::LOCK_EX) + data = fh.read + fh.close + begin + data = YAML.load(data) + raise LoadError if data.class.to_s != 'Hash' + rescue Psych::SyntaxError, LoadError + raise 'file ' + file.to_s + ' has incorrect format' + end + data + end + + # rubocop:disable Metrics/CyclomaticComplexity + def volume_bitrot_scrub_status(volume) + info = [] + i = 0 + # Try to run bitrot scrub status not more than 10 times + while info.empty? + i += 1 + begin + info = gluster("volume bitrot #{volume} scrub status", false).split("\n") + rescue ArgumentError => ex + raise ex if ex.message != 'invalid byte sequence in UTF-8' || i > PARAMS[:rerun][:times] + sleep PARAMS[:rerun][:delay] + end + end + status = parse_bitrot_status(info) + raise 'BitRot is not enabled' unless status['state'] + status['nodes'].each do |node, _v| + raise "BitRot error on #{node}" unless status['nodes'][node]['errors'] == 0 + end + end + # rubocop:enable Metrics/CyclomaticComplexity + + def parse_bitrot_status(info) + info.map! { |s| s.gsub(/localhost/, Socket.gethostname) } + status = { 'state' => false, 'nodes' => {} } + node = '' + info.each do |line| + if line =~ /^State of scrub: Active/ + status['state'] = true + elsif line =~ /^Node: / + node = line.gsub(/^Node: /, '') + status['nodes'][node] = {} + elsif line =~ /^Error count: / + status['nodes'][node]['errors'] = line.gsub(/^Error count: /, '').to_i + end + end + status + end + + def any_to_array(any) + return [any] if any.class.to_s != 'Array' + any + end + + private :get_services_from_checks, :gluster, :any_to_array + private :check_running, :parse_heal, :parse_bitrot_status + private :merge_heal, :store_state, :load_state + end +end + +begin + # Parse parameters + option_parser = CheckGluster::OptionsParser.new + option_parser.parse! + checks = option_parser.checks + self_name = option_parser.self_name + + # Run gluster checks + gluster_check = CheckGluster::Check.new(:state_file => option_parser.state_file, :state_ttl => option_parser.state_ttl) + gluster_check.check_glusterd + gluster_check.peer_status + gluster_check.pool_list + gluster_check.volume_list.each do |volume| + bricks = gluster_check.volume_info(volume) + gluster_check.volume_status(volume, bricks, checks, self_name) + gluster_check.volume_heal_info(volume) if checks.include? 'heal' + gluster_check.volume_bitrot_scrub_status(volume) if checks.include? 'bitrot' + end + + puts 'OK: Gluster cluster is healthy' + exit(NagiosStatus::OK) +# Normal exit +rescue SystemExit => ex + raise ex +# Anything else goes to nagios error with critial status +rescue Exception => ex + puts "Error: #{ex.message}" + exit(NagiosStatus::CRITICAL) +end + +# rubocop:enable all From 4ee7c89410c8a22be6c799c3ae011ca546babfa6 Mon Sep 17 00:00:00 2001 From: Mathieu Trossevin Date: Tue, 5 Sep 2023 15:22:49 +0200 Subject: [PATCH 130/182] fix(nagios-nrpe): Add missing dependency for new gluster.rb plugin --- nagios-nrpe/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/nagios-nrpe/tasks/main.yml b/nagios-nrpe/tasks/main.yml index aa36f9c9..5d4c01aa 100644 --- a/nagios-nrpe/tasks/main.yml +++ b/nagios-nrpe/tasks/main.yml @@ -17,6 +17,7 @@ ansible.builtin.apt: name: - libfcgi-client-perl + - ruby-crack state: present when: - ansible_distribution == "Debian" From 2a7d2d9c5813547632ffb647bf3424ac49988236 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Tue, 5 Sep 2023 14:37:55 +0200 Subject: [PATCH 131/182] postfix: disable IPv6 --- CHANGELOG.md | 1 + postfix/templates/packmail_main.cf.j2 | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3007e593..03309dc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * postgresql: fix file postgresql.pref.j2 for exclude package * lxc-php: Change lxc container in bookworm for php82 * evolinux-base: include files under `sshd_config.d` +* postfix: disable sending mails via IPv6 ### Fixed diff --git a/postfix/templates/packmail_main.cf.j2 b/postfix/templates/packmail_main.cf.j2 index 0d80cf00..65c95866 100644 --- a/postfix/templates/packmail_main.cf.j2 +++ b/postfix/templates/packmail_main.cf.j2 @@ -120,6 +120,9 @@ virtual_mailbox_base = / #par defaut, = all #inet_interfaces = all +# Envois seulement en IPv4 +inet_protocols = ipv4 + # Adresse IP externe du firewall/proxy si derriere NAT ou proxy # evite principalement les boucles si MX secondaire et MX primaire indisponible #par defaut, = From 2af2e5ee787e47099a486d7279a30883d3bc1d95 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Mon, 11 Sep 2023 09:25:21 +0200 Subject: [PATCH 132/182] nagios-nrpe: set default check_load --per-cpu for BSD --- CHANGELOG.md | 1 + nagios-nrpe/files/check-local | 24 +++++++++++++++++------- nagios-nrpe/templates/evolix_bsd.cfg.j2 | 2 +- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03309dc0..5de3729a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * lxc-php: Change lxc container in bookworm for php82 * evolinux-base: include files under `sshd_config.d` * postfix: disable sending mails via IPv6 +* nagios-nrpe: set default check_load --per-cpu for BSD ### Fixed diff --git a/nagios-nrpe/files/check-local b/nagios-nrpe/files/check-local index 8fcc3da8..dc46aacd 100755 --- a/nagios-nrpe/files/check-local +++ b/nagios-nrpe/files/check-local @@ -1,17 +1,27 @@ #!/usr/bin/env bash -if ! test -f /usr/lib/nagios/plugins/check_nrpe; then - echo '/usr/lib/nagios/plugins/check_nrpe is missing, please install nagios-nrpe-plugin package.' +CHECK_BIN=/usr/lib/nagios/plugins/check_nrpe + +if ! test -f "${CHECK_BIN}"; then + echo "${CHECK_BIN} is missing, please install nagios-nrpe-plugin package." exit 1 fi -if [ -r /etc/nagios/nrpe.d/evolix.cfg ]; then - command=$(grep "\[check_$1\]" /etc/nagios/nrpe.d/evolix.cfg | grep -v '^[[:blank:]]*#' | tail -n1 | cut -d'=' -f2-) - echo "Command:" - echo " $command" +for file in /etc/nagios/{nrpe.cfg,nrpe_local.cfg,nrpe.d/evolix.cfg}; do + if [ -r ${file} ]; then + found_command=$(grep "\[check_$1\]" "${file}" | grep -v '^[[:blank:]]*#' | tail -n1 | cut -d'=' -f2-) + fi + if [ -n "${found_command}" ]; then + command="${found_command}" + fi +done + +if [ -n "${command}" ]; then + echo "Found command in /etc/nagios (take care, in some cases, Nagios can play another command):" + echo " ${command}" fi echo "NRPE daemon output:" -/usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1 -c "check_$1" +"${CHECK_BIN}" -H 127.0.0.1 -c "check_$1" diff --git a/nagios-nrpe/templates/evolix_bsd.cfg.j2 b/nagios-nrpe/templates/evolix_bsd.cfg.j2 index 436bf125..cdeb53a1 100644 --- a/nagios-nrpe/templates/evolix_bsd.cfg.j2 +++ b/nagios-nrpe/templates/evolix_bsd.cfg.j2 @@ -7,7 +7,7 @@ allowed_hosts={{ nagios_nrpe_allowed_hosts | join(',') }} command[check_users]=/usr/local/libexec/nagios/check_users -w 5 -c 10 -command[check_load]=/usr/local/libexec/nagios/check_load -w 15,10,5 -c 30,25,20 +command[check_load]=/usr/local/libexec/nagios/check_load --percpu -w 0.7,0.6,0.5 -c 0.9,0.8,0.7 command[check_disk1]=/usr/local/libexec/nagios/check_disk -x /lib/init/rw -x /dev -x /dev/shm -w 10% -c 3% -W 10% -K 3% -C -w 5% -c 2% -W 5% -K 2% -p /home command[check_zombie_procs]=/usr/local/libexec/nagios/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/local/libexec/nagios/check_procs -w 150 -c 200 From 41004e20b4a7b19d286d9a734258acac4affbd72 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 12 Sep 2023 11:38:54 +0200 Subject: [PATCH 133/182] kvm-host: migrate-vm exits if DRBD is not up-to-date --- CHANGELOG.md | 2 +- kvm-host/files/migrate-vm.sh | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5de3729a..a584926b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * fail2ban: add default variable fail2ban_dbpurgeage_default * fail2ban: add default variable fail2ban_dbpurgeage_default * fail2ban: add variable fail2ban_sshd_port to configure sshd port -* kvm-host: release 23.08 for migrate-vm.sh +* kvm-host: release 23.09 for migrate-vm.sh * nagios-nrpe: add a NRPE check-local command with completion. * nagios-nrpe: add a proper monitoring plugin for glusterfs (on servers, not for clients) * php: add new variable to disable oveeriding settings of php-fpm default pool (www) diff --git a/kvm-host/files/migrate-vm.sh b/kvm-host/files/migrate-vm.sh index 29a307ce..6803450a 100644 --- a/kvm-host/files/migrate-vm.sh +++ b/kvm-host/files/migrate-vm.sh @@ -11,13 +11,13 @@ # * migrate "from" # * switch to Bash to use local and readonly variables -VERSION="23.08" +VERSION="23.09" show_version() { cat <, +Copyright 2018-2023 Evolix , Jérémy Lecour , Victor Laborie and others. @@ -70,6 +70,20 @@ is_drbd_resource() { test -f "$(drbd_config_file "${resource}")" && drbdadm role "${resource}" >/dev/null 2>&1 } +check_drbd_sync() { + resource=${1:-} + + set +e + dstate=$(drbdadm dstate "${resource}" | grep -vF 'UpToDate/UpToDate') + cstate=$(drbdadm cstate "${resource}" | grep -vF 'Connected') + set -e + + if [ -n "${dstate}" ] || [ -n "${cstate}" ]; then + echo "DRBD resource ${resource} is not up-to-date" >&2 + exit 1 + fi +} + drbd_peers() { drbd_config_file=$(drbd_config_file "${1:-}") @@ -227,6 +241,8 @@ migrate_to() { echo "Start migration of ${vm} to ${remote_ip} (${remote_host})" + check_drbd_sync "${resource}" + set_drbd_role primary "${resource}" "${remote_ip}" migrate_vm_to "${vm}" "${remote_ip}" set_drbd_role secondary "${resource}" From 53a0e56472c86d09b1158ec33a096134f78c3f66 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Wed, 13 Sep 2023 09:38:44 +0200 Subject: [PATCH 134/182] metricbeat/logstash: fix Ansible syntax --- CHANGELOG.md | 1 + logstash/tasks/main.yml | 2 +- metricbeat/tasks/main.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a584926b..cfdceb4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * fail2ban: add default variable fail2ban_dbpurgeage_default * fail2ban: add default variable fail2ban_dbpurgeage_default * fail2ban: add variable fail2ban_sshd_port to configure sshd port +* metricbeat/logstash: fix Ansible syntax * kvm-host: release 23.09 for migrate-vm.sh * nagios-nrpe: add a NRPE check-local command with completion. * nagios-nrpe: add a proper monitoring plugin for glusterfs (on servers, not for clients) diff --git a/logstash/tasks/main.yml b/logstash/tasks/main.yml index 4f3b8da7..c79f1858 100644 --- a/logstash/tasks/main.yml +++ b/logstash/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: APT sources - ansible.builtin.import_tasks: apt_sources.yml + ansible.builtin.include_tasks: apt_sources.yml args: apply: tags: diff --git a/metricbeat/tasks/main.yml b/metricbeat/tasks/main.yml index 16cc4865..5e7154b4 100644 --- a/metricbeat/tasks/main.yml +++ b/metricbeat/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: APT sources - ansible.builtin.import_tasks: apt_sources.yml + ansible.builtin.include_tasks: apt_sources.yml args: apply: tags: From b57a5c3b3c2fdaf7665dea3c991275c580649eb3 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Wed, 13 Sep 2023 09:42:30 +0200 Subject: [PATCH 135/182] evolinux-base: default value for evolinux_kernel_cloud_reboot (true) --- evolinux-base/defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/evolinux-base/defaults/main.yml b/evolinux-base/defaults/main.yml index 90ed4975..e8894baf 100644 --- a/evolinux-base/defaults/main.yml +++ b/evolinux-base/defaults/main.yml @@ -51,6 +51,7 @@ evolinux_internal_fqdn: "{{ evolinux_internal_hostname }}.{{ evolinux_intern evolinux_kernel_include: True evolinux_kernel_cloud_auto: True +evolinux_kernel_cloud_reboot: True evolinux_kernel_reboot_after_panic: True evolinux_kernel_disable_tcp_timestamps: True evolinux_kernel_customize_swappiness: True From ac70793ad6506ca451bd883caf804831781e532d Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Fri, 30 Jun 2023 13:50:38 +0200 Subject: [PATCH 136/182] Add pki role. --- pki/defaults/main.yml | 15 ++++++ pki/tasks/ca.yml | 28 ++++++++++ pki/tasks/main.yml | 33 ++++++++++++ pki/tasks/signed_certificate.yml | 90 ++++++++++++++++++++++++++++++++ 4 files changed, 166 insertions(+) create mode 100644 pki/defaults/main.yml create mode 100644 pki/tasks/ca.yml create mode 100644 pki/tasks/main.yml create mode 100644 pki/tasks/signed_certificate.yml diff --git a/pki/defaults/main.yml b/pki/defaults/main.yml new file mode 100644 index 00000000..30a0364b --- /dev/null +++ b/pki/defaults/main.yml @@ -0,0 +1,15 @@ +--- +pki_dir: /etc/pki # Where to store PKI files + +pki_ca_cn: Null # Certificate Authority Commmon Name +pki_ca_host: Null # Host where the CA is located +pki_ca_filename: Null # Filename used to created CA related file +pki_ca_password: Null # Password for the key of the CA + + +# Private variable, please don't customize them +pki_ca_key: "{{ pki_dir }}/private/{{ pki_ca_filename | mandatory }}.key" +# pki_ca_csr: "{{ pki_dir }}/certs/{{ pki_ca_filename | mandatory }}.crt" +pki_ca_crt: "{{ pki_dir }}/certs/{{ pki_ca_filename | mandatory }}.crt" +pki_certificate_crt: "{{ pki_dir }}/certs/{{ ansible_fqdn }}.crt" +pki_certificate_key: "{{ pki_dir }}/private/{{ ansible_fqdn }}.key" diff --git a/pki/tasks/ca.yml b/pki/tasks/ca.yml new file mode 100644 index 00000000..caae52d6 --- /dev/null +++ b/pki/tasks/ca.yml @@ -0,0 +1,28 @@ +--- +- name: Create private key with password protection + community.crypto.openssl_privatekey: + path: "{{ pki_ca_key }}" + passphrase: "{{ pki_ca_password | mandatory }}" + cipher: auto + +- name: Create certificate signing request (CSR) for CA certificate + community.crypto.openssl_csr_pipe: + privatekey_path: "{{ pki_ca_key }}" + privatekey_passphrase: "{{ pki_ca_password | mandatory }}" + common_name: "{{ pki_ca_cn | mandatory }}" + use_common_name_for_san: false + basic_constraints: + - 'CA:TRUE' + basic_constraints_critical: yes + key_usage: + - keyCertSign + key_usage_critical: true + register: ca_csr + +- name: Create self-signed CA certificate from CSR + community.crypto.x509_certificate: + path: "{{ pki_ca_crt }}" + csr_content: "{{ ca_csr.csr }}" + privatekey_path: "{{ pki_ca_key }}" + privatekey_passphrase: "{{ pki_ca_password | mandatory }}" + provider: selfsigned diff --git a/pki/tasks/main.yml b/pki/tasks/main.yml new file mode 100644 index 00000000..f4d78ceb --- /dev/null +++ b/pki/tasks/main.yml @@ -0,0 +1,33 @@ +--- + +# Prerequisites +# TODO Python packages may need to be differente based on debian version +- name: Install python 2 cryptography + apt: + name: python-cryptography + state: present + when: ansible_python['executable'] == "/usr/bin/python" + +- name: Install python 3 cryptography + apt: + name: python3-cryptography + state: present + when: ansible_python['executable'] == "/usr/bin/python3" + +- name: Creates PKI tree directories + file: + path: "{{ item }}" + mode: 0700 + state: directory + loop: + - "{{ pki_dir }}/certs" + - "{{ pki_dir }}/private" + + +# Create Certificat Authority (CA) +- include: ca.yml + when: inventory_hostname == pki_ca_host and not ansible_check_mode + + +# Create a certificate signed by the CA +- include: signed_certificate.yml diff --git a/pki/tasks/signed_certificate.yml b/pki/tasks/signed_certificate.yml new file mode 100644 index 00000000..15dbb42b --- /dev/null +++ b/pki/tasks/signed_certificate.yml @@ -0,0 +1,90 @@ +--- +# CA certificate +- name: Check whether CA certificate exists + stat: + path: "{{ pki_ca_crt }}" + delegate_to: "{{ pki_ca_host | mandatory }}" + run_once: true + register: ca_certificate_exists + +- name: Fail if CA doesn't exists + fail: + msg: "CA '{{ pki_ca_crt }}' on host '{{ pki_ca_host }}' doesn't exists! You need to create one before continuing." + when: not ca_certificate_exists.stat.exists + +- name: Read existing CA certificate if exists + slurp: + src: "{{ pki_ca_crt }}" + when: ca_certificate_exists.stat.exists + delegate_to: "{{ pki_ca_host | mandatory }}" + run_once: true + register: ca_certificate + +- name: Write CA certificate file + copy: + dest: "{{ pki_ca_crt }}" + content: "{{ ca_certificate.content | b64decode }}" + run_once: true + register: ca_certificate + + +# Create new signed certificate +- name: Create private key for new certificate + community.crypto.openssl_privatekey: + path: "{{ pki_certificate_key }}" + run_once: true + +- name: Create certificate signing request (CSR) for new certificate + community.crypto.openssl_csr_pipe: + privatekey_path: "{{ pki_certificate_key }}" + common_name: "{{ ansible_fqdn }}" + run_once: true + register: csr + +- name: Check whether certificate exists + stat: + path: "{{ pki_certificate_crt }}" + run_once: true + register: certificate_exists + +- name: Read existing certificate if exists + slurp: + src: "{{ pki_certificate_crt }}" + when: certificate_exists.stat.exists + run_once: true + register: certificate + +- name: Sign certificate with CA + community.crypto.x509_certificate_pipe: + content: "{{ (certificate.content | b64decode) if certificate_exists.stat.exists else omit }}" + csr_content: "{{ csr.csr }}" + provider: ownca + ownca_path: "{{ pki_ca_crt }}" + ownca_privatekey_path: "{{ pki_ca_key }}" + ownca_privatekey_passphrase: "{{ pki_ca_password | mandatory}}" + delegate_to: "{{ pki_ca_host | mandatory }}" + run_once: true + register: certificate + when: not ansible_check_mode + +- name: Write certificate file + copy: + dest: "{{ pki_certificate_crt }}" + content: "{{ certificate.certificate }}" + run_once: true + when: certificate is changed and not ansible_check_mode + +- name: Write certificate file on the CA host + copy: + dest: "{{ pki_certificate_crt }}" + content: "{{ certificate.certificate }}" + delegate_to: "{{ pki_ca_host | mandatory }}" + run_once: true + when: certificate is changed and not ansible_check_mode + + +# Allow other roles to know if some certifiates has changed +- name: Set fact, pki_changed + when: certificate is changed or ca_certificate is changed + set_fact: + pki_changed: True From 682fac14b2ac4be6d448c86b0943d0e7df590d38 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Tue, 5 Sep 2023 17:52:31 +0200 Subject: [PATCH 137/182] nagios-nrpe: Make check_process configurable --- nagios-nrpe/defaults/main.yml | 1 + nagios-nrpe/files/plugins/check_process | 8 +++++++- nagios-nrpe/templates/evolix.cfg.j2 | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/nagios-nrpe/defaults/main.yml b/nagios-nrpe/defaults/main.yml index ba519361..28b85d99 100644 --- a/nagios-nrpe/defaults/main.yml +++ b/nagios-nrpe/defaults/main.yml @@ -6,6 +6,7 @@ nagios_nrpe_pgsql_passwd: PGSQL_PASSWD nagios_nrpe_amavis_from: "foobar@{{ ansible_domain }}" nagios_nrpe_default_ntp_server: "pool.ntp.org" nagios_nrpe_ntp_server: Null +nagios_nrpe_process_processes: [ cron rsyslogd ntpd munin-node ] nagios_nrpe_force_update_allowed_hosts: False diff --git a/nagios-nrpe/files/plugins/check_process b/nagios-nrpe/files/plugins/check_process index 46ef34dd..59e7f6cb 100755 --- a/nagios-nrpe/files/plugins/check_process +++ b/nagios-nrpe/files/plugins/check_process @@ -1,7 +1,13 @@ #!/bin/bash rc=0 -for proc in cron rsyslogd ntpd munin-node; do +if [ $# -gt 0 ]; then + procs=$@ +else + # We keep this old list to be retro compatible + procs="cron rsyslogd ntpd munin-node" +fi +for proc in $procs ; do sudo /usr/lib/nagios//plugins/check_procs -C $proc -c 1: rc=$(($rc|$?)) done diff --git a/nagios-nrpe/templates/evolix.cfg.j2 b/nagios-nrpe/templates/evolix.cfg.j2 index c0f97ea7..a7bcab7d 100644 --- a/nagios-nrpe/templates/evolix.cfg.j2 +++ b/nagios-nrpe/templates/evolix.cfg.j2 @@ -66,7 +66,7 @@ command[check_amavis]={{ nagios_plugins_directory }}/check_amavis --server 127.0 command[check_spamd]={{ nagios_plugins_directory }}/check_spamd -H 127.0.0.1 command[check_nfsclient]=sudo -u www-data {{ nagios_plugins_directory }}/check_nfsclient command[check_evobackup]={{ nagios_plugins_directory }}/check_evobackup -command[check_process]={{ nagios_plugins_directory }}/check_process +command[check_process]={{ nagios_plugins_directory }}/check_process {{ nagios_nrpe_process_processes | join(' ') }} command[check_drbd]={{ nagios_plugins_directory }}/check_drbd -d All -c StandAlone command[check_mongodb_connect]={{ nagios_plugins_directory }}/check_mongodb -H localhost -P27017 -A connect command[check_glusterfs]={{ nagios_plugins_directory }}/check_glusterfs -v all -n 0 From 689ed21b38a4910bad5cd7e1e8a1d11c8f93df62 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Wed, 13 Sep 2023 11:36:02 +0200 Subject: [PATCH 138/182] evolinux-base: Add missing journald.conf --- evolinux-base/files/logs/journald.conf | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 evolinux-base/files/logs/journald.conf diff --git a/evolinux-base/files/logs/journald.conf b/evolinux-base/files/logs/journald.conf new file mode 100644 index 00000000..97b0bcc5 --- /dev/null +++ b/evolinux-base/files/logs/journald.conf @@ -0,0 +1,2 @@ +[Journal] +MaxRetentionSec=1day From 92788a8b93eb9ff2eae46c0a1a99fc2fce83e868 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Thu, 14 Sep 2023 17:11:46 +0200 Subject: [PATCH 139/182] lxc-php: Fix /etc/profile.d/evolinux.sh mode in containers (defauft umask -> 644) --- CHANGELOG.md | 1 + lxc-php/tasks/umask.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfdceb4a..d51a433a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,6 +78,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * evolinux-base, evolinux-users: Fix files mode under /etc/ssh/sshd_config.d * evolinux-base: Fix file extension * evocheck: Fix IS_SSHALLOWUSERS condition +* lxc-php: Fix /etc/profile.d/evolinux.sh mode in containers (defauft umask -> 644) ### Removed diff --git a/lxc-php/tasks/umask.yml b/lxc-php/tasks/umask.yml index 254fd75e..66f9f816 100644 --- a/lxc-php/tasks/umask.yml +++ b/lxc-php/tasks/umask.yml @@ -13,6 +13,7 @@ path: "{{ systemd_path.path }}/evolinux.conf" regex: "\\[Service\\]" line: "[Service]" + mode: '0644' create: yes - name: "UMask=0007 est présent dans la surchage des services PHP-FPM des conteneurs LXC." From d7d8ee63b203b21c1c8fd7df618faeee96316d3b Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 15 Sep 2023 15:20:45 +0200 Subject: [PATCH 140/182] Revert "lxc-php: Fix /etc/profile.d/evolinux.sh mode in containers (defauft umask -> 644)" This reverts commit 92788a8b93eb9ff2eae46c0a1a99fc2fce83e868. --- CHANGELOG.md | 1 - lxc-php/tasks/umask.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d51a433a..cfdceb4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,7 +78,6 @@ The **patch** part changes is incremented if multiple releases happen the same m * evolinux-base, evolinux-users: Fix files mode under /etc/ssh/sshd_config.d * evolinux-base: Fix file extension * evocheck: Fix IS_SSHALLOWUSERS condition -* lxc-php: Fix /etc/profile.d/evolinux.sh mode in containers (defauft umask -> 644) ### Removed diff --git a/lxc-php/tasks/umask.yml b/lxc-php/tasks/umask.yml index 66f9f816..254fd75e 100644 --- a/lxc-php/tasks/umask.yml +++ b/lxc-php/tasks/umask.yml @@ -13,7 +13,6 @@ path: "{{ systemd_path.path }}/evolinux.conf" regex: "\\[Service\\]" line: "[Service]" - mode: '0644' create: yes - name: "UMask=0007 est présent dans la surchage des services PHP-FPM des conteneurs LXC." From f8b9361afd66e7b69197ae2d514bd2fbb545abf4 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 15 Sep 2023 15:27:37 +0200 Subject: [PATCH 141/182] lxc-php: Fix /etc/profile.d/evolinux.sh mode in containers (defauft umask -> 644) --- lxc/tasks/create-container.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/lxc/tasks/create-container.yml b/lxc/tasks/create-container.yml index 3b70cdde..a4a17e16 100644 --- a/lxc/tasks/create-container.yml +++ b/lxc/tasks/create-container.yml @@ -69,3 +69,4 @@ src: "/etc/profile.d/evolinux.sh" remote_src: true dest: "/var/lib/lxc/{{ name }}/rootfs/etc/profile.d/evolinux.sh" + mode: '0644' From 2c98717ebc7f053bfb8f4cebf91d15d2d8f4d6e4 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 15 Sep 2023 16:36:57 +0200 Subject: [PATCH 142/182] nagios-nrpe: check-local now supports /etc/nagios/{nrpe.cfg,nrpe_local.cfg} + better completion --- nagios-nrpe/files/check-local_completion | 2 +- nagios-nrpe/tasks/check-local.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/nagios-nrpe/files/check-local_completion b/nagios-nrpe/files/check-local_completion index d638ae24..ea3ed64b 100644 --- a/nagios-nrpe/files/check-local_completion +++ b/nagios-nrpe/files/check-local_completion @@ -4,7 +4,7 @@ _check_local_dynamic_completion() { local cur; cur=${COMP_WORDS[COMP_CWORD]}; COMPREPLY=(); - COMPREPLY=( $( compgen -W '$(grep "\[check_" /etc/nagios/nrpe.d/evolix.cfg | grep -vE "^[[:blank:]]*#" | awk -F"[\\\[\\\]=]" "{print \$2}" | sed "s/check_//")' -- $cur ) ); + COMPREPLY=( $( compgen -W '$(grep "\[check_" -Rs /etc/nagios/ | grep -vE "^[[:blank:]]*#" | awk -F"[\\\[\\\]=]" "{print \$2}" | sed "s/check_//" | sort | uniq)' -- $cur ) ); } complete -F _check_local_dynamic_completion check-local diff --git a/nagios-nrpe/tasks/check-local.yml b/nagios-nrpe/tasks/check-local.yml index 1b696292..d28d9113 100644 --- a/nagios-nrpe/tasks/check-local.yml +++ b/nagios-nrpe/tasks/check-local.yml @@ -15,6 +15,10 @@ dest: /usr/local/bin/check-local mode: "0755" +- name: Package bash-completion is intalled + ansible.builtin.apt: + name: bash-completion + - name: Completion for utilitary check-local is installed ansible.builtin.copy: src: check-local_completion From 4ca17f06c1e7979731dfd3eb3fd4d5f0adf2bc93 Mon Sep 17 00:00:00 2001 From: Iliane Said Date: Mon, 18 Sep 2023 10:07:36 +0200 Subject: [PATCH 143/182] add new version of evocheck.sh --- evocheck/evocheck.sh | 1654 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1654 insertions(+) create mode 100755 evocheck/evocheck.sh diff --git a/evocheck/evocheck.sh b/evocheck/evocheck.sh new file mode 100755 index 00000000..71b7540b --- /dev/null +++ b/evocheck/evocheck.sh @@ -0,0 +1,1654 @@ +#!/bin/bash + +# EvoCheck +# Script to verify compliance of a Linux (Debian) server +# powered by Evolix + +VERSION="23.07" +readonly VERSION + +# base functions + +show_version() { + cat <, + Romain Dessort , + Benoit Série , + Gregory Colpart , + Jérémy Lecour , + Tristan Pilat , + Victor Laborie , + Alexis Ben Miloud--Josselin , + and others. + +evocheck comes with ABSOLUTELY NO WARRANTY. This is free software, +and you are welcome to redistribute it under certain conditions. +See the GNU General Public License v3.0 for details. +END +} +show_help() { + cat <&2 + echo "This version is built for Debian 9 and later." >&2 + exit + fi + + if [ -x "${LSB_RELEASE_BIN}" ]; then + DEBIAN_RELEASE=$(${LSB_RELEASE_BIN} --codename --short) + else + case ${DEBIAN_MAIN_VERSION} in + 9) DEBIAN_RELEASE="stretch";; + 10) DEBIAN_RELEASE="buster";; + 11) DEBIAN_RELEASE="bullseye";; + 12) DEBIAN_RELEASE="bookworm";; + esac + fi + fi +} + +is_debian_stretch() { + test "${DEBIAN_RELEASE}" = "stretch" +} +is_debian_buster() { + test "${DEBIAN_RELEASE}" = "buster" +} +is_debian_bullseye() { + test "${DEBIAN_RELEASE}" = "bullseye" +} +is_debian_bookworm() { + test "${DEBIAN_RELEASE}" = "bookworm" +} + +is_pack_web(){ + test -e /usr/share/scripts/web-add.sh || test -e /usr/share/scripts/evoadmin/web-add.sh +} +is_pack_samba(){ + test -e /usr/share/scripts/add.pl +} +is_installed(){ + for pkg in "$@"; do + dpkg -l "$pkg" 2> /dev/null | grep -q -E '^(i|h)i' || return 1 + done +} + +# logging + +log() { + date=$(/bin/date +"${DATE_FORMAT}") + if [ "${1}" != '' ]; then + printf "[%s] %s: %s\\n" "$date" "${PROGNAME}" "${1}" >> "${LOGFILE}" + else + while read line; do + printf "[%s] %s: %s\\n" "$date" "${PROGNAME}" "${line}" >> "${LOGFILE}" + done < /dev/stdin + fi +} + +failed() { + check_name=$1 + shift + check_comments=$* + + RC=1 + if [ "${QUIET}" != 1 ]; then + if [ -n "${check_comments}" ] && [ "${VERBOSE}" = 1 ]; then + printf "%s FAILED! %s\n" "${check_name}" "${check_comments}" >> "${main_output_file}" + else + printf "%s FAILED!\n" "${check_name}" >> "${main_output_file}" + fi + fi + + # Always log verbose + log "${check_name} FAILED! ${check_comments}" +} + +# check functions + +check_lsbrelease(){ + if [ -x "${LSB_RELEASE_BIN}" ]; then + ## only the major version matters + lhs=$(${LSB_RELEASE_BIN} --release --short | cut -d "." -f 1) + rhs=$(cut -d "." -f 1 < /etc/debian_version) + test "$lhs" = "$rhs" || failed "IS_LSBRELEASE" "release is not consistent between lsb_release (${lhs}) and /etc/debian_version (${rhs})" + else + failed "IS_LSBRELEASE" "lsb_release is missing or not executable" + fi +} +check_dpkgwarning() { + test -e /etc/apt/apt.conf.d/z-evolinux.conf \ + || failed "IS_DPKGWARNING" "/etc/apt/apt.conf.d/z-evolinux.conf is missing" +} +# Check if localhost, localhost.localdomain and localhost.$mydomain are set in Postfix mydestination option. +check_postfix_mydestination() { + # shellcheck disable=SC2016 + if ! grep mydestination /etc/postfix/main.cf | grep --quiet -E 'localhost([[:blank:]]|$)'; then + failed "IS_POSTFIX_MYDESTINATION" "'localhost' is missing in Postfix mydestination option." + fi + if ! grep mydestination /etc/postfix/main.cf | grep --quiet 'localhost\.localdomain'; then + failed "IS_POSTFIX_MYDESTINATION" "'localhost.localdomain' is missing in Postfix mydestination option." + fi + if ! grep mydestination /etc/postfix/main.cf | grep --quiet 'localhost\.\$mydomain'; then + failed "IS_POSTFIX_MYDESTINATION" "'localhost.\$mydomain' is missing in Postfix mydestination option." + fi +} +# Verifying check_mailq in Nagios NRPE config file. (Option "-M postfix" need to be set if the MTA is Postfix) +check_nrpepostfix() { + if is_installed postfix; then + { test -e /etc/nagios/nrpe.cfg \ + && grep -qr "^command.*check_mailq -M postfix" /etc/nagios/nrpe.*; + } || failed "IS_NRPEPOSTFIX" "NRPE \"check_mailq\" for postfix is missing" + fi +} +# Check if mod-security config file is present +check_customsudoers() { + grep -E -qr "umask=0077" /etc/sudoers* || failed "IS_CUSTOMSUDOERS" "missing umask=0077 in sudoers file" +} +check_vartmpfs() { + FINDMNT_BIN=$(command -v findmnt) + if [ -x "${FINDMNT_BIN}" ]; then + ${FINDMNT_BIN} /var/tmp --type tmpfs --noheadings > /dev/null || failed "IS_VARTMPFS" "/var/tmp is not a tmpfs" + else + df /var/tmp | grep -q tmpfs || failed "IS_VARTMPFS" "/var/tmp is not a tmpfs" + fi +} +check_serveurbase() { + is_installed serveur-base || failed "IS_SERVEURBASE" "serveur-base package is not installed" +} +check_logrotateconf() { + test -e /etc/logrotate.d/zsyslog || failed "IS_LOGROTATECONF" "missing zsyslog in logrotate.d" +} +check_syslogconf() { + grep -q "^# Syslog for Pack Evolix serveur" /etc/*syslog.conf \ + || failed "IS_SYSLOGCONF" "syslog evolix config file missing" +} +check_debiansecurity() { + # Look for enabled "Debian-Security" sources from the "Debian" origin + apt-cache policy | grep "\bl=Debian-Security\b" | grep "\bo=Debian\b" | grep --quiet "\bc=main\b" + test $? -eq 0 || failed "IS_DEBIANSECURITY" "missing Debian-Security repository" +} +check_oldpub() { + # Look for enabled pub.evolix.net sources (supersed by pub.evolix.org since Stretch) + apt-cache policy | grep --quiet pub.evolix.net + test $? -eq 1 || failed "IS_OLDPUB" "Old pub.evolix.net repository is still enabled" +} +check_newpub() { + # Look for enabled pub.evolix.org sources + apt-cache policy | grep --quiet pub.evolix.org + test $? -eq 0 || failed "IS_NEWPUB" "New pub.evolix.org repository is missing" +} +check_aptitude() { + test -e /usr/bin/aptitude && failed "IS_APTITUDE" "aptitude may not be installed on Debian >=8" +} +check_aptgetbak() { + test -e /usr/bin/apt-get.bak && failed "IS_APTGETBAK" "prohibit the installation of apt-get.bak with dpkg-divert(1)" +} +check_usrro() { + grep /usr /etc/fstab | grep -qE "\bro\b" || failed "IS_USRRO" "missing ro directive on fstab for /usr" +} +check_tmpnoexec() { + FINDMNT_BIN=$(command -v findmnt) + if [ -x "${FINDMNT_BIN}" ]; then + options=$(${FINDMNT_BIN} --noheadings --first-only --output OPTIONS /tmp) + echo "${options}" | grep -qE "\bnoexec\b" || failed "IS_TMPNOEXEC" "/tmp is not mounted with 'noexec'" + else + mount | grep "on /tmp" | grep -qE "\bnoexec\b" || failed "IS_TMPNOEXEC" "/tmp is not mounted with 'noexec' (WARNING: findmnt(8) is not found)" + fi +} +check_mountfstab() { + # Test if lsblk available, if not skip this test... + LSBLK_BIN=$(command -v lsblk) + if test -x "${LSBLK_BIN}"; then + for mountPoint in $(${LSBLK_BIN} -o MOUNTPOINT -l -n | grep '/'); do + grep -Eq "$mountPoint\W" /etc/fstab \ + || failed "IS_MOUNT_FSTAB" "partition(s) detected mounted but no presence in fstab" + done + fi +} +check_listchangesconf() { + if is_installed apt-listchanges; then + failed "IS_LISTCHANGESCONF" "apt-listchanges must not be installed on Debian >=9" + fi +} +check_customcrontab() { + found_lines=$(grep -c -E "^(17 \*|25 6|47 6|52 6)" /etc/crontab) + test "$found_lines" = 4 && failed "IS_CUSTOMCRONTAB" "missing custom field in crontab" +} +check_sshallowusers() { + grep -E -qir "(AllowUsers|AllowGroups)" /etc/ssh/sshd_config /etc/ssh/sshd_config.d \ + || failed "IS_SSHALLOWUSERS" "missing AllowUsers or AllowGroups directive in sshd_config" +} +check_diskperf() { + perfFile="/root/disk-perf.txt" + test -e $perfFile || failed "IS_DISKPERF" "missing ${perfFile}" +} +check_tmoutprofile() { + grep -sq "TMOUT=" /etc/profile /etc/profile.d/evolinux.sh || failed "IS_TMOUTPROFILE" "TMOUT is not set" +} +check_alert5boot() { + if is_debian_stretch; then + if [ -n "$(find /etc/rc2.d/ -name 'S*alert5')" ]; then + grep -q "^date" /etc/rc2.d/S*alert5 || failed "IS_ALERT5BOOT" "boot mail is not sent by alert5 init script" + elif [ -n "$(find /etc/init.d/ -name 'alert5')" ]; then + grep -q "^date" /etc/init.d/alert5 || failed "IS_ALERT5BOOT" "boot mail is not sent by alert5 int script" + else + failed "IS_ALERT5BOOT" "alert5 init script is missing" + fi + else + grep -qs "^date" /usr/share/scripts/alert5.sh || failed "IS_ALERT5BOOT" "boot mail is not sent by alert5 init script" + if [ -f /etc/systemd/system/alert5.service ]; then + systemctl is-enabled alert5.service -q || failed "IS_ALERT5BOOT" "alert5 unit is not enabled" + else + failed "IS_ALERT5BOOT" "alert5 unit file is missing" + fi + fi +} +check_alert5minifw() { + if is_debian_stretch; then + if [ -n "$(find /etc/rc2.d/ -name 'S*alert5')" ]; then + grep -q "^/etc/init.d/minifirewall" /etc/rc2.d/S*alert5 \ + || failed "IS_ALERT5MINIFW" "Minifirewall is not started by alert5 init script" + elif [ -n "$(find /etc/init.d/ -name 'alert5')" ]; then + grep -q "^/etc/init.d/minifirewall" /etc/init.d/alert5 \ + || failed "IS_ALERT5MINIFW" "Minifirewall is not started by alert5 init script" + else + failed "IS_ALERT5MINIFW" "alert5 init script is missing" + fi + else + grep -qs "^/etc/init.d/minifirewall" /usr/share/scripts/alert5.sh \ + || failed "IS_ALERT5MINIFW" "Minifirewall is not started by alert5 script or script is missing" + fi +} +check_minifw() { + { + if [ -f /etc/systemd/system/minifirewall.service ]; then + systemctl is-active minifirewall > /dev/null 2>&1 + else + if test -x /usr/share/scripts/minifirewall_status; then + /usr/share/scripts/minifirewall_status > /dev/null 2>&1 + else + /sbin/iptables -L -n 2> /dev/null | grep -q -E "^(DROP\s+(udp|17)|ACCEPT\s+(icmp|1))\s+--\s+0\.0\.0\.0\/0\s+0\.0\.0\.0\/0\s*$" + fi + fi + } || failed "IS_MINIFW" "minifirewall seems not started" +} +check_minifw_includes() { + if is_debian_bullseye; then + if grep -q -e '/sbin/iptables' -e '/sbin/ip6tables' "/etc/default/minifirewall"; then + failed "IS_MINIFWINCLUDES" "minifirewall has direct iptables invocations in /etc/default/minifirewall that should go in /etc/minifirewall.d/" + fi + fi +} +check_nrpeperms() { + if [ -d /etc/nagios ]; then + nagiosDir="/etc/nagios" + actual=$(stat --format "%a" $nagiosDir) + expected="750" + test "$expected" = "$actual" || failed "IS_NRPEPERMS" "${nagiosDir} must be ${expected}" + fi +} +check_minifwperms() { + if [ -f "/etc/default/minifirewall" ]; then + actual=$(stat --format "%a" "/etc/default/minifirewall") + expected="600" + test "$expected" = "$actual" || failed "IS_MINIFWPERMS" "/etc/default/minifirewall must be ${expected}" + fi +} +check_nrpedisks() { + NRPEDISKS=$(grep command.check_disk /etc/nagios/nrpe.cfg | grep "^command.check_disk[0-9]" | sed -e "s/^command.check_disk\([0-9]\+\).*/\1/" | sort -n | tail -1) + DFDISKS=$(df -Pl | grep -c -E -v "(^Filesystem|/lib/init/rw|/dev/shm|udev|rpc_pipefs)") + test "$NRPEDISKS" = "$DFDISKS" || failed "IS_NRPEDISKS" "there must be $DFDISKS check_disk in nrpe.cfg" +} +check_nrpepid() { + if { is_debian_bullseye || is_debian_bookworm ; }; then + { test -e /etc/nagios/nrpe.cfg \ + && grep -q "^pid_file=/run/nagios/nrpe.pid" /etc/nagios/nrpe.cfg; + } || failed "IS_NRPEPID" "missing or wrong pid_file directive in nrpe.cfg" + else + { test -e /etc/nagios/nrpe.cfg \ + && grep -q "^pid_file=/var/run/nagios/nrpe.pid" /etc/nagios/nrpe.cfg; + } || failed "IS_NRPEPID" "missing or wrong pid_file directive in nrpe.cfg" + fi +} +check_grsecprocs() { + if uname -a | grep -q grsec; then + { grep -q "^command.check_total_procs..sudo" /etc/nagios/nrpe.cfg \ + && grep -A1 "^\[processes\]" /etc/munin/plugin-conf.d/munin-node | grep -q "^user root"; + } || failed "IS_GRSECPROCS" "missing munin's plugin processes directive for grsec" + fi +} +check_apachemunin() { + if test -e /etc/apache2/apache2.conf; then + { test -h /etc/apache2/mods-enabled/status.load \ + && test -h /etc/munin/plugins/apache_accesses \ + && test -h /etc/munin/plugins/apache_processes \ + && test -h /etc/munin/plugins/apache_volume; + } || failed "IS_APACHEMUNIN" "missing munin plugins for Apache" + fi +} +# Verification mytop + Munin si MySQL +check_mysqlutils() { + MYSQL_ADMIN=${MYSQL_ADMIN:-mysqladmin} + if is_installed mysql-server; then + # With Debian 11 and later, root can connect to MariaDB with the socket + if is_debian_stretch || is_debian_buster; then + # You can configure MYSQL_ADMIN in evocheck.cf + if ! grep -qs "^user *= *${MYSQL_ADMIN}" /root/.my.cnf; then + failed "IS_MYSQLUTILS" "${MYSQL_ADMIN} missing in /root/.my.cnf" + fi + fi + if ! test -x /usr/bin/mytop; then + if ! test -x /usr/local/bin/mytop; then + failed "IS_MYSQLUTILS" "mytop binary missing" + fi + fi + if ! grep -qs '^user *=' /root/.mytop; then + failed "IS_MYSQLUTILS" "credentials missing in /root/.mytop" + fi + fi +} +# Verification de la configuration du raid soft (mdadm) +check_raidsoft() { + if test -e /proc/mdstat && grep -q md /proc/mdstat; then + { grep -q "^AUTOCHECK=true" /etc/default/mdadm \ + && grep -q "^START_DAEMON=true" /etc/default/mdadm \ + && grep -qv "^MAILADDR ___MAIL___" /etc/mdadm/mdadm.conf; + } || failed "IS_RAIDSOFT" "missing or wrong config for mdadm" + fi +} +# Verification du LogFormat de AWStats +check_awstatslogformat() { + if is_installed apache2 awstats; then + awstatsFile="/etc/awstats/awstats.conf.local" + grep -qE '^LogFormat=1' $awstatsFile \ + || failed "IS_AWSTATSLOGFORMAT" "missing or wrong LogFormat directive in $awstatsFile" + fi +} +# Verification de la présence de la config logrotate pour Munin +check_muninlogrotate() { + { test -e /etc/logrotate.d/munin-node \ + && test -e /etc/logrotate.d/munin; + } || failed "IS_MUNINLOGROTATE" "missing lorotate file for munin" +} +# Verification de l'activation de Squid dans le cas d'un pack mail +check_squid() { + squidconffile="/etc/squid/evolinux-custom.conf" + if is_pack_web && (is_installed squid || is_installed squid3); then + host=$(hostname -i) + # shellcheck disable=SC2086 + http_port=$(grep -E "^http_port\s+[0-9]+" $squidconffile | awk '{ print $2 }') + { grep -qE "^[^#]*iptables -t nat -A OUTPUT -p tcp --dport 80 -m owner --uid-owner proxy -j ACCEPT" "/etc/default/minifirewall" \ + && grep -qE "^[^#]*iptables -t nat -A OUTPUT -p tcp --dport 80 -d $host -j ACCEPT" "/etc/default/minifirewall" \ + && grep -qE "^[^#]*iptables -t nat -A OUTPUT -p tcp --dport 80 -d 127.0.0.(1|0/8) -j ACCEPT" "/etc/default/minifirewall" \ + && grep -qE "^[^#]*iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-port.* $http_port" "/etc/default/minifirewall"; + } || grep -qE "^PROXY='?on'?" "/etc/default/minifirewall" \ + || failed "IS_SQUID" "missing squid rules in minifirewall" + fi +} +check_evomaintenance_fw() { + if [ -f "/etc/default/minifirewall" ]; then + hook_db=$(grep -E '^\s*HOOK_DB' /etc/evomaintenance.cf | tr -d ' ' | cut -d= -f2) + rulesNumber=$(grep -c "/sbin/iptables -A INPUT -p tcp --sport 5432 --dport 1024:65535 -s .* -m state --state ESTABLISHED,RELATED -j ACCEPT" "/etc/default/minifirewall") + if [ "$hook_db" = "1" ] && [ "$rulesNumber" -lt 2 ]; then + failed "IS_EVOMAINTENANCE_FW" "HOOK_DB is enabled but missing evomaintenance rules in minifirewall" + fi + fi +} +# Verification de la conf et de l'activation de mod-deflate +check_moddeflate() { + f=/etc/apache2/mods-enabled/deflate.conf + if is_installed apache2.2; then + { test -e $f && grep -q "AddOutputFilterByType DEFLATE text/html text/plain text/xml" $f \ + && grep -q "AddOutputFilterByType DEFLATE text/css" $f \ + && grep -q "AddOutputFilterByType DEFLATE application/x-javascript application/javascript" $f; + } || failed "IS_MODDEFLATE" "missing AddOutputFilterByType directive for apache mod deflate" + fi +} +# Verification de la conf log2mail +check_log2mailrunning() { + if is_pack_web && is_installed log2mail; then + pgrep log2mail >/dev/null || failed "IS_LOG2MAILRUNNING" "log2mail is not running" + fi +} +check_log2mailapache() { + conf=/etc/log2mail/config/apache + if is_pack_web && is_installed log2mail; then + grep -s -q "^file = /var/log/apache2/error.log" $conf \ + || failed "IS_LOG2MAILAPACHE" "missing log2mail directive for apache" + fi +} +check_log2mailmysql() { + if is_pack_web && is_installed log2mail; then + grep -s -q "^file = /var/log/syslog" /etc/log2mail/config/{default,mysql,mysql.conf} \ + || failed "IS_LOG2MAILMYSQL" "missing log2mail directive for mysql" + fi +} +check_log2mailsquid() { + if is_pack_web && is_installed log2mail; then + grep -s -q "^file = /var/log/squid.*/access.log" /etc/log2mail/config/* \ + || failed "IS_LOG2MAILSQUID" "missing log2mail directive for squid" + fi +} +# Verification si bind est chroote +check_bindchroot() { + if is_installed bind9; then + if netstat -utpln | grep "/named" | grep :53 | grep -qvE "(127.0.0.1|::1)"; then + default_conf=/etc/default/named + if is_debian_buster || is_debian_stretch; then + default_conf=/etc/default/bind9 + fi + if grep -q '^OPTIONS=".*-t' "${default_conf}" && grep -q '^OPTIONS=".*-u' "${default_conf}"; then + md5_original=$(md5sum /usr/sbin/named | cut -f 1 -d ' ') + md5_chrooted=$(md5sum /var/chroot-bind/usr/sbin/named | cut -f 1 -d ' ') + if [ "$md5_original" != "$md5_chrooted" ]; then + failed "IS_BINDCHROOT" "the chrooted bind binary is different than the original binary" + fi + else + failed "IS_BINDCHROOT" "bind process is not chrooted" + fi + fi + fi +} +# /etc/network/interfaces should be present, we don't manage systemd-network yet +check_network_interfaces() { + if ! test -f /etc/network/interfaces; then + IS_AUTOIF=0 + IS_INTERFACESGW=0 + failed "IS_NETWORK_INTERFACES" "systemd network configuration is not supported yet" + fi +} +# Verify if all if are in auto +check_autoif() { + interfaces=$(/sbin/ip address show up | grep "^[0-9]*:" | grep -E -v "(lo|vnet|docker|veth|tun|tap|macvtap|vrrp|lxcbr|wg)" | cut -d " " -f 2 | tr -d : | cut -d@ -f1 | tr "\n" " ") + for interface in $interfaces; do + if grep -Rq "^iface $interface" /etc/network/interfaces* && ! grep -Rq "^auto $interface" /etc/network/interfaces*; then + failed "IS_AUTOIF" "Network interface \`${interface}' is statically defined but not set to auto" + test "${VERBOSE}" = 1 || break + fi + done +} +# Network conf verification +check_interfacesgw() { + number=$(grep -Ec "^[^#]*gateway [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" /etc/network/interfaces) + test "$number" -gt 1 && failed "IS_INTERFACESGW" "there is more than 1 IPv4 gateway" + number=$(grep -Ec "^[^#]*gateway [0-9a-fA-F]+:" /etc/network/interfaces) + test "$number" -gt 1 && failed "IS_INTERFACESGW" "there is more than 1 IPv6 gateway" +} +# Verification de l’état du service networking +check_networking_service() { + if systemctl is-enabled networking.service > /dev/null; then + if ! systemctl is-active networking.service > /dev/null; then + failed "IS_NETWORKING_SERVICE" "networking.service is not active" + fi + fi +} +# Verification de la mise en place d'evobackup +check_evobackup() { + evobackup_found=$(find /etc/cron* -name '*evobackup*' | wc -l) + test "$evobackup_found" -gt 0 || failed "IS_EVOBACKUP" "missing evobackup cron" +} +# Vérification de la mise en place d'un cron de purge de la base SQLite de Fail2ban +check_fail2ban_purge() { + if is_debian_stretch || is_debian_buster; then + if is_installed fail2ban; then + test -f /etc/cron.daily/fail2ban_dbpurge || failed "IS_FAIL2BAN_PURGE" "missing script fail2ban_dbpurge cron" + fi + fi +} +# Vérification qu'il ne reste pas des jails nommées ssh non renommées en sshd +check_ssh_fail2ban_jail_renamed() { + if is_installed fail2ban && [ -f /etc/fail2ban/jail.local ]; then + if grep --quiet --fixed-strings "[ssh]" /etc/fail2ban/jail.local; then + failed "IS_SSH_FAIL2BAN_JAIL_RENAMED" "Jail ssh must be renamed sshd in fail2ban >= 0.9." + fi + fi +} +# Vérification de l'exclusion des montages (NFS) dans les sauvegardes +check_evobackup_exclude_mount() { + excludes_file=$(mktemp --tmpdir "evocheck.evobackup_exclude_mount.XXXXX") + files_to_cleanup+=("${excludes_file}") + + # shellcheck disable=SC2044 + for evobackup_file in $(find /etc/cron* -name '*evobackup*' | grep -v -E ".disabled$"); do + # if the file seems to be a backup script, with an Rsync invocation + if grep -q "^\s*rsync" "${evobackup_file}"; then + # If rsync is not limited by "one-file-system" + # then we verify that every mount is excluded + if ! grep -q -- "^\s*--one-file-system" "${evobackup_file}"; then + # old releases of evobackups don't have version + if grep -q "^VERSION=" "${evobackup_file}"; then + evobackup_version=$(sed -E -n 's/VERSION="(.*)"/\1/p' "${evobackup_file}") + # versions over 22.12 use a new syntax to exclude rsync files + if dpkg --compare-versions "$evobackup_version" ge 22.12 ; then + sed -En '/RSYNC_EXCLUDES="/,/"/ {s/(RSYNC_EXCLUDES=|")//g;p}' > "${excludes_file}" + else + grep -- "--exclude " "${evobackup_file}" | grep -E -o "\"[^\"]+\"" | tr -d '"' > "${excludes_file}" + fi + fi + not_excluded=$(findmnt --type nfs,nfs4,fuse.sshfs, -o target --noheadings | grep -v -f "${excludes_file}") + for mount in ${not_excluded}; do + failed "IS_EVOBACKUP_EXCLUDE_MOUNT" "${mount} is not excluded from ${evobackup_file} backup script" + done + fi + fi + done +} +# Verification de la presence du userlogrotate +check_userlogrotate() { + if is_pack_web; then + test -x /etc/cron.weekly/userlogrotate || failed "IS_USERLOGROTATE" "missing userlogrotate cron" + fi +} +# Verification de la syntaxe de la conf d'Apache +check_apachectl() { + if is_installed apache2; then + /usr/sbin/apache2ctl configtest 2>&1 | grep -q "^Syntax OK$" \ + || failed "IS_APACHECTL" "apache errors detected, run a configtest" + fi +} +# Check if there is regular files in Apache sites-enabled. +check_apachesymlink() { + if is_installed apache2; then + apacheFind=$(find /etc/apache2/sites-enabled ! -type l -type f -print) + nbApacheFind=$(wc -m <<< "$apacheFind") + if [[ $nbApacheFind -gt 1 ]]; then + if [[ $VERBOSE == 1 ]]; then + while read -r line; do + failed "IS_APACHESYMLINK" "Not a symlink: $line" + done <<< "$apacheFind" + else + failed "IS_APACHESYMLINK" + fi + fi + fi +} +# Check if there is real IP addresses in Allow/Deny directives (no trailing space, inline comments or so). +check_apacheipinallow() { + # Note: Replace "exit 1" by "print" in Perl code to debug it. + if is_installed apache2; then + grep -IrE "^[^#] *(Allow|Deny) from" /etc/apache2/ \ + | grep -iv "from all" \ + | grep -iv "env=" \ + | perl -ne 'exit 1 unless (/from( [\da-f:.\/]+)+$/i)' \ + || failed "IS_APACHEIPINALLOW" "bad (Allow|Deny) directives in apache" + fi +} +# Check if default Apache configuration file for munin is absent (or empty or commented). +check_muninapacheconf() { + muninconf="/etc/apache2/conf-available/munin.conf" + if is_installed apache2; then + test -e $muninconf && grep -vEq "^( |\t)*#" "$muninconf" \ + && failed "IS_MUNINAPACHECONF" "default munin configuration may be commented or disabled" + fi +} +# Check if default Apache configuration file for phpMyAdmin is absent (or empty or commented). +check_phpmyadminapacheconf() { + phpmyadminconf0="/etc/apache2/conf-available/phpmyadmin.conf" + phpmyadminconf1="/etc/apache2/conf-enabled/phpmyadmin.conf" + if is_installed apache2; then + test -e $phpmyadminconf0 && grep -vEq "^( |\t)*#" "$phpmyadminconf0" \ + && failed "IS_PHPMYADMINAPACHECONF" "default phpmyadmin configuration ($phpmyadminconf0) may be commented or disabled" + test -e $phpmyadminconf1 && grep -vEq "^( |\t)*#" "$phpmyadminconf1" \ + && failed "IS_PHPMYADMINAPACHECONF" "default phpmyadmin configuration ($phpmyadminconf1) may be commented or disabled" + fi +} +# Verification si le système doit redémarrer suite màj kernel. +check_kerneluptodate() { + if is_installed linux-image*; then + # shellcheck disable=SC2012 + kernel_installed_at=$(date -d "$(ls --full-time -lcrt /boot | tail -n1 | awk '{print $6}')" +%s) + last_reboot_at=$(($(date +%s) - $(cut -f1 -d '.' /proc/uptime))) + if [ "$kernel_installed_at" -gt "$last_reboot_at" ]; then + failed "IS_KERNELUPTODATE" "machine is running an outdated kernel, reboot advised" + fi + fi +} +# Check if the server is running for more than a year. +check_uptime() { + if is_installed linux-image*; then + limit=$(date -d "now - 2 year" +%s) + last_reboot_at=$(($(date +%s) - $(cut -f1 -d '.' /proc/uptime))) + if [ "$limit" -gt "$last_reboot_at" ]; then + failed "IS_UPTIME" "machine has an uptime of more than 2 years, reboot on new kernel advised" + fi + fi +} +# Check if munin-node running and RRD files are up to date. +check_muninrunning() { + if ! pgrep munin-node >/dev/null; then + failed "IS_MUNINRUNNING" "Munin is not running" + elif [ -d "/var/lib/munin/" ] && [ -d "/var/cache/munin/" ]; then + limit=$(date +"%s" -d "now - 10 minutes") + + if [ -n "$(find /var/lib/munin/ -name '*load-g.rrd')" ]; then + updated_at=$(stat -c "%Y" /var/lib/munin/*/*load-g.rrd |sort |tail -1) + [ "$limit" -gt "$updated_at" ] && failed "IS_MUNINRUNNING" "Munin load RRD has not been updated in the last 10 minutes" + else + failed "IS_MUNINRUNNING" "Munin is not installed properly (load RRD not found)" + fi + + if [ -n "$(find /var/cache/munin/www/ -name 'load-day.png')" ]; then + updated_at=$(stat -c "%Y" /var/cache/munin/www/*/*/load-day.png |sort |tail -1) + grep -sq "^graph_strategy cron" /etc/munin/munin.conf && [ "$limit" -gt "$updated_at" ] && failed "IS_MUNINRUNNING" "Munin load PNG has not been updated in the last 10 minutes" + else + failed "IS_MUNINRUNNING" "Munin is not installed properly (load PNG not found)" + fi + else + failed "IS_MUNINRUNNING" "Munin is not installed properly (main directories are missing)" + fi +} +# Check if files in /home/backup/ are up-to-date +check_backupuptodate() { + backup_dir="/home/backup" + if [ -d "${backup_dir}" ]; then + if [ -n "$(ls -A ${backup_dir})" ]; then + find "${backup_dir}" -maxdepth 1 -type f | while read -r file; do + limit=$(date +"%s" -d "now - 2 day") + updated_at=$(stat -c "%Y" "$file") + + if [ "$limit" -gt "$updated_at" ]; then + failed "IS_BACKUPUPTODATE" "$file has not been backed up" + test "${VERBOSE}" = 1 || break; + fi + done + else + failed "IS_BACKUPUPTODATE" "${backup_dir}/ is empty" + fi + else + failed "IS_BACKUPUPTODATE" "${backup_dir}/ is missing" + fi +} +check_etcgit() { + export GIT_DIR="/etc/.git" GIT_WORK_TREE="/etc" + git rev-parse --is-inside-work-tree > /dev/null 2>&1 \ + || failed "IS_ETCGIT" "/etc is not a git repository" +} +# Check if /etc/.git/ has read/write permissions for root only. +check_gitperms() { + GIT_DIR="/etc/.git" + if test -d $GIT_DIR; then + expected="700" + actual=$(stat -c "%a" $GIT_DIR) + [ "$expected" = "$actual" ] || failed "IS_GITPERMS" "$GIT_DIR must be $expected" + fi +} +# Check if no package has been upgraded since $limit. +check_notupgraded() { + last_upgrade=0 + upgraded=false + for log in /var/log/dpkg.log*; do + if zgrep -qsm1 upgrade "$log"; then + # There is at least one upgrade + upgraded=true + break + fi + done + if $upgraded; then + last_upgrade=$(date +%s -d "$(zgrep --no-filename --no-messages upgrade /var/log/dpkg.log* | sort -n | tail -1 | cut -f1 -d ' ')") + fi + if grep -qs '^mailto="listupgrade-todo@' /etc/evolinux/listupgrade.cnf \ + || grep -qs -E '^[[:digit:]]+[[:space:]]+[[:digit:]]+[[:space:]]+[^\*]' /etc/cron.d/listupgrade; then + # Manual upgrade process + limit=$(date +%s -d "now - 180 days") + else + # Regular process + limit=$(date +%s -d "now - 90 days") + fi + install_date=0 + if [ -d /var/log/installer ]; then + install_date=$(stat -c %Z /var/log/installer) + fi + # Check install_date if the system never received an upgrade + if [ "$last_upgrade" -eq 0 ]; then + [ "$install_date" -lt "$limit" ] && failed "IS_NOTUPGRADED" "The system has never been updated" + else + [ "$last_upgrade" -lt "$limit" ] && failed "IS_NOTUPGRADED" "The system hasn't been updated for too long" + fi +} +# Check if reserved blocks for root is at least 5% on every mounted partitions. +check_tune2fs_m5() { + min=5 + parts=$(grep -E "ext(3|4)" /proc/mounts | cut -d ' ' -f1 | tr -s '\n' ' ') + FINDMNT_BIN=$(command -v findmnt) + for part in $parts; do + blockCount=$(dumpe2fs -h "$part" 2>/dev/null | grep -e "Block count:" | grep -Eo "[0-9]+") + # If buggy partition, skip it. + if [ -z "$blockCount" ]; then + continue + fi + reservedBlockCount=$(dumpe2fs -h "$part" 2>/dev/null | grep -e "Reserved block count:" | grep -Eo "[0-9]+") + # Use awk to have a rounded percentage + # python is slow, bash is unable and bc rounds weirdly + percentage=$(awk "BEGIN { pc=100*${reservedBlockCount}/${blockCount}; i=int(pc); print (pc-i<0.5)?i:i+1 }") + + if [ "$percentage" -lt "${min}" ]; then + if [ -x "${FINDMNT_BIN}" ]; then + mount=$(${FINDMNT_BIN} --noheadings --first-only --output TARGET "${part}") + else + mount="unknown mount point" + fi + failed "IS_TUNE2FS_M5" "Partition ${part} (${mount}) has less than ${min}% reserved blocks (${percentage}%)" + fi + done +} +check_evolinuxsudogroup() { + if grep -q "^evolinux-sudo:" /etc/group; then + if [ -f /etc/sudoers.d/evolinux ]; then + grep -qE '^%evolinux-sudo +ALL ?= ?\(ALL:ALL\) ALL' /etc/sudoers.d/evolinux \ + || failed "IS_EVOLINUXSUDOGROUP" "missing evolinux-sudo directive in sudoers file" + fi + fi +} +check_userinadmgroup() { + users=$(grep "^evolinux-sudo:" /etc/group | awk -F: '{print $4}' | tr ',' ' ') + for user in $users; do + if ! groups "$user" | grep -q adm; then + failed "IS_USERINADMGROUP" "User $user doesn't belong to \`adm' group" + test "${VERBOSE}" = 1 || break + fi + done +} +check_apache2evolinuxconf() { + if is_installed apache2; then + { test -L /etc/apache2/conf-enabled/z-evolinux-defaults.conf \ + && test -L /etc/apache2/conf-enabled/zzz-evolinux-custom.conf \ + && test -f /etc/apache2/ipaddr_whitelist.conf; + } || failed "IS_APACHE2EVOLINUXCONF" "missing custom evolinux apache config" + fi +} +check_backportsconf() { + grep -qsE "^[^#].*backports" /etc/apt/sources.list \ + && failed "IS_BACKPORTSCONF" "backports can't be in main sources list" + if grep -qsE "^[^#].*backports" /etc/apt/sources.list.d/*.list; then + grep -qsE "^[^#].*backports" /etc/apt/preferences.d/* \ + || failed "IS_BACKPORTSCONF" "backports must have preferences" + fi +} +check_bind9munin() { + if is_installed bind9; then + { test -L /etc/munin/plugins/bind9 \ + && test -e /etc/munin/plugin-conf.d/bind9; + } || failed "IS_BIND9MUNIN" "missing bind plugin for munin" + fi +} +check_bind9logrotate() { + if is_installed bind9; then + test -e /etc/logrotate.d/bind9 || failed "IS_BIND9LOGROTATE" "missing bind logrotate file" + fi +} +check_broadcomfirmware() { + LSPCI_BIN=$(command -v lspci) + if [ -x "${LSPCI_BIN}" ]; then + if ${LSPCI_BIN} | grep -q 'NetXtreme II'; then + { is_installed firmware-bnx2 \ + && grep -q "^deb http://mirror.evolix.org/debian.* non-free" /etc/apt/sources.list; + } || failed "IS_BROADCOMFIRMWARE" "missing non-free repository" + fi + else + failed "IS_BROADCOMFIRMWARE" "lspci not found in ${PATH}" + fi +} +check_hardwareraidtool() { + LSPCI_BIN=$(command -v lspci) + if [ -x "${LSPCI_BIN}" ]; then + if ${LSPCI_BIN} | grep -q 'MegaRAID'; then + # shellcheck disable=SC2015 + is_installed megacli && { is_installed megaclisas-status || is_installed megaraidsas-status; } \ + || failed "IS_HARDWARERAIDTOOL" "Mega tools not found" + fi + if ${LSPCI_BIN} | grep -q 'Hewlett-Packard Company Smart Array'; then + is_installed cciss-vol-status || failed "IS_HARDWARERAIDTOOL" "cciss-vol-status not installed" + fi + else + failed "IS_HARDWARERAIDTOOL" "lspci not found in ${PATH}" + fi +} +check_log2mailsystemdunit() { + systemctl -q is-active log2mail.service \ + || failed "IS_LOG2MAILSYSTEMDUNIT" "log2mail unit not running" + test -f /etc/systemd/system/log2mail.service \ + || failed "IS_LOG2MAILSYSTEMDUNIT" "missing log2mail unit file" + test -f /etc/init.d/log2mail \ + && failed "IS_LOG2MAILSYSTEMDUNIT" "/etc/init.d/log2mail may be deleted (use systemd unit)" +} +check_listupgrade() { + test -f /etc/cron.d/listupgrade \ + || failed "IS_LISTUPGRADE" "missing listupgrade cron" + test -x /usr/share/scripts/listupgrade.sh \ + || failed "IS_LISTUPGRADE" "missing listupgrade script or not executable" +} +check_mariadbevolinuxconf() { + if is_installed mariadb-server; then + { test -f /etc/mysql/mariadb.conf.d/z-evolinux-defaults.cnf \ + && test -f /etc/mysql/mariadb.conf.d/zzz-evolinux-custom.cnf; + } || failed "IS_MARIADBEVOLINUXCONF" "missing mariadb custom config" + fi +} +check_sql_backup() { + if (is_installed "mysql-server" || is_installed "mariadb-server"); then + # You could change the default path in /etc/evocheck.cf + SQL_BACKUP_PATH=${SQL_BACKUP_PATH:-"/home/backup/mysql.bak.gz"} + for backup_path in ${SQL_BACKUP_PATH}; do + if [ ! -f "${backup_path}" ]; then + failed "IS_SQL_BACKUP" "MySQL dump is missing (${backup_path})" + test "${VERBOSE}" = 1 || break + fi + done + fi +} +check_postgres_backup() { + if is_installed "postgresql-9*" || is_installed "postgresql-1*"; then + # If you use something like barman, you should disable this check + # You could change the default path in /etc/evocheck.cf + POSTGRES_BACKUP_PATH=${POSTGRES_BACKUP_PATH:-"/home/backup/pg.dump.bak*"} + for backup_path in ${POSTGRES_BACKUP_PATH}; do + if [ ! -f "${backup_path}" ]; then + failed "IS_POSTGRES_BACKUP" "PostgreSQL dump is missing (${backup_path})" + test "${VERBOSE}" = 1 || break + fi + done + fi +} +check_mongo_backup() { + if is_installed "mongodb-org-server"; then + # You could change the default path in /etc/evocheck.cf + MONGO_BACKUP_PATH=${MONGO_BACKUP_PATH:-"/home/backup/mongodump"} + if [ -d "$MONGO_BACKUP_PATH" ]; then + for file in "${MONGO_BACKUP_PATH}"/*/*.{json,bson}*; do + # Skip indexes file. + if ! [[ "$file" =~ indexes ]]; then + limit=$(date +"%s" -d "now - 2 day") + updated_at=$(stat -c "%Y" "$file") + if [ -f "$file" ] && [ "$limit" -gt "$updated_at" ]; then + failed "IS_MONGO_BACKUP" "MongoDB hasn't been dumped for more than 2 days" + break + fi + fi + done + else + failed "IS_MONGO_BACKUP" "MongoDB dump directory is missing (${MONGO_BACKUP_PATH})" + fi + fi +} +check_ldap_backup() { + if is_installed slapd; then + # You could change the default path in /etc/evocheck.cf + LDAP_BACKUP_PATH=${LDAP_BACKUP_PATH:-"/home/backup/ldap.bak"} + test -f "$LDAP_BACKUP_PATH" || failed "IS_LDAP_BACKUP" "LDAP dump is missing (${LDAP_BACKUP_PATH})" + fi +} +check_redis_backup() { + if is_installed redis-server; then + # You could change the default path in /etc/evocheck.cf + # REDIS_BACKUP_PATH may contain space-separated paths, for example: + # REDIS_BACKUP_PATH='/home/backup/redis-instance1/dump.rdb /home/backup/redis-instance2/dump.rdb' + # Warning : this script doesn't handle spaces in file paths ! + + REDIS_BACKUP_PATH="${REDIS_BACKUP_PATH:-$(find /home/backup/ -iname "*.rdb*")}" + + # Check number of dumps + n_instances=$(pgrep 'redis-server' | wc -l) + n_dumps=$(echo $REDIS_BACKUP_PATH | wc -w) + if [ ${n_dumps} -lt ${n_instances} ]; then + failed "IS_REDIS_BACKUP" "Missing Redis dump : ${n_instances} instance(s) found versus ${n_dumps} dump(s) found." + fi + + # Check last dump date + age_threshold=$(date +"%s" -d "now - 2 days") + for dump in ${REDIS_BACKUP_PATH}; do + last_update=$(stat -c "%Z" $dump) + if [ "${last_update}" -lt "${age_threshold}" ]; then + failed "IS_REDIS_BACKUP" "Redis dump ${dump} is older than 2 days." + fi + done + fi +} +check_elastic_backup() { + if is_installed elasticsearch; then + # You could change the default path in /etc/evocheck.cf + ELASTIC_BACKUP_PATH=${ELASTIC_BACKUP_PATH:-"/home/backup-elasticsearch"} + test -d "$ELASTIC_BACKUP_PATH" || failed "IS_ELASTIC_BACKUP" "Elastic snapshot is missing (${ELASTIC_BACKUP_PATH})" + fi +} +check_mariadbsystemdunit() { + # TODO: check if it is still needed for bullseye + if is_debian_stretch || is_debian_buster; then + if is_installed mariadb-server; then + if systemctl -q is-active mariadb.service; then + test -f /etc/systemd/system/mariadb.service.d/evolinux.conf \ + || failed "IS_MARIADBSYSTEMDUNIT" "missing systemd override for mariadb unit" + fi + fi + fi +} +check_mysqlmunin() { + if is_installed mariadb-server; then + for file in mysql_bytes mysql_queries mysql_slowqueries \ + mysql_threads mysql_connections mysql_files_tables \ + mysql_innodb_bpool mysql_innodb_bpool_act mysql_innodb_io \ + mysql_innodb_log mysql_innodb_rows mysql_innodb_semaphores \ + mysql_myisam_indexes mysql_qcache mysql_qcache_mem \ + mysql_sorts mysql_tmp_tables; do + + if [[ ! -L /etc/munin/plugins/$file ]]; then + failed "IS_MYSQLMUNIN" "missing munin plugin '$file'" + test "${VERBOSE}" = 1 || break + fi + done + munin-run mysql_commands 2> /dev/null > /dev/null + test $? -eq 0 || failed "IS_MYSQLMUNIN" "Munin plugin mysql_commands returned an error" + fi +} +check_mysqlnrpe() { + if is_installed mariadb-server; then + nagios_file=~nagios/.my.cnf + if ! test -f ${nagios_file}; then + failed "IS_MYSQLNRPE" "${nagios_file} is missing" + elif [ "$(stat -c %U ${nagios_file})" != "nagios" ] \ + || [ "$(stat -c %a ${nagios_file})" != "600" ]; then + failed "IS_MYSQLNRPE" "${nagios_file} has wrong permissions" + else + grep -q -F "command[check_mysql]=/usr/lib/nagios/plugins/check_mysql" /etc/nagios/nrpe.d/evolix.cfg \ + || failed "IS_MYSQLNRPE" "check_mysql is missing" + fi + fi +} +check_phpevolinuxconf() { + is_debian_stretch && phpVersion="7.0" + is_debian_buster && phpVersion="7.3" + is_debian_bullseye && phpVersion="7.4" + if is_installed php; then + { test -f "/etc/php/${phpVersion}/cli/conf.d/z-evolinux-defaults.ini" \ + && test -f "/etc/php/${phpVersion}/cli/conf.d/zzz-evolinux-custom.ini" + } || failed "IS_PHPEVOLINUXCONF" "missing php evolinux config" + fi +} +check_squidlogrotate() { + if is_installed squid; then + grep -q -e monthly -e daily /etc/logrotate.d/squid \ + || failed "IS_SQUIDLOGROTATE" "missing squid logrotate file" + fi +} +check_squidevolinuxconf() { + if is_installed squid; then + { grep -qs "^CONFIG=/etc/squid/evolinux-defaults.conf$" /etc/default/squid \ + && test -f /etc/squid/evolinux-defaults.conf \ + && test -f /etc/squid/evolinux-whitelist-defaults.conf \ + && test -f /etc/squid/evolinux-whitelist-custom.conf \ + && test -f /etc/squid/evolinux-acl.conf \ + && test -f /etc/squid/evolinux-httpaccess.conf \ + && test -f /etc/squid/evolinux-custom.conf; + } || failed "IS_SQUIDEVOLINUXCONF" "missing squid evolinux config" + fi +} +check_duplicate_fs_label() { + # Do it only if thereis blkid binary + BLKID_BIN=$(command -v blkid) + if [ -n "$BLKID_BIN" ]; then + tmpFile=$(mktemp --tmpdir "evocheck.duplicate_fs_label.XXXXX") + files_to_cleanup+=("${tmpFile}") + + parts=$($BLKID_BIN -c /dev/null | grep -ve raid_member -e EFI_SYSPART | grep -Eo ' LABEL=".*"' | cut -d'"' -f2) + for part in $parts; do + echo "$part" >> "$tmpFile" + done + tmpOutput=$(sort < "$tmpFile" | uniq -d) + # If there is no duplicate, uniq will have no output + # So, if $tmpOutput is not null, there is a duplicate + if [ -n "$tmpOutput" ]; then + # shellcheck disable=SC2086 + labels=$(echo -n $tmpOutput | tr '\n' ' ') + failed "IS_DUPLICATE_FS_LABEL" "Duplicate labels: $labels" + fi + else + failed "IS_DUPLICATE_FS_LABEL" "blkid not found in ${PATH}" + fi +} +check_evolix_user() { + grep -q -E "^evolix:" /etc/passwd \ + && failed "IS_EVOLIX_USER" "evolix user should be deleted, used only for install" +} +check_evoacme_cron() { + if [ -f "/usr/local/sbin/evoacme" ]; then + # Old cron file, should be deleted + test -f /etc/cron.daily/certbot && failed "IS_EVOACME_CRON" "certbot cron is incompatible with evoacme" + # evoacme cron file should be present + test -f /etc/cron.daily/evoacme || failed "IS_EVOACME_CRON" "evoacme cron is missing" + fi +} +check_evoacme_livelinks() { + EVOACME_BIN=$(command -v evoacme) + if [ -x "$EVOACME_BIN" ]; then + # Sometimes evoacme is installed but no certificates has been generated + numberOfLinks=$(find /etc/letsencrypt/ -type l | wc -l) + if [ "$numberOfLinks" -gt 0 ]; then + for live in /etc/letsencrypt/*/live; do + actualLink=$(readlink -f "$live") + actualVersion=$(basename "$actualLink") + + certDir=$(dirname "$live") + certName=$(basename "$certDir") + # shellcheck disable=SC2012 + lastCertDir=$(ls -ds "${certDir}"/[0-9]* | tail -1) + lastVersion=$(basename "$lastCertDir") + + if [[ "$lastVersion" != "$actualVersion" ]]; then + failed "IS_EVOACME_LIVELINKS" "Certificate \`$certName' hasn't been updated" + test "${VERBOSE}" = 1 || break + fi + done + fi + fi +} +check_apache_confenabled() { + # Starting from Jessie and Apache 2.4, /etc/apache2/conf.d/ + # must be replaced by conf-available/ and config files symlinked + # to conf-enabled/ + if [ -f /etc/apache2/apache2.conf ]; then + test -d /etc/apache2/conf.d/ \ + && failed "IS_APACHE_CONFENABLED" "apache's conf.d directory must not exists" + grep -q 'Include conf.d' /etc/apache2/apache2.conf \ + && failed "IS_APACHE_CONFENABLED" "apache2.conf must not Include conf.d" + fi +} +check_meltdown_spectre() { + # /sys/devices/system/cpu/vulnerabilities/ + for vuln in meltdown spectre_v1 spectre_v2; do + test -f "/sys/devices/system/cpu/vulnerabilities/$vuln" \ + || failed "IS_MELTDOWN_SPECTRE" "vulnerable to $vuln" + test "${VERBOSE}" = 1 || break + done +} +check_old_home_dir() { + homeDir=${homeDir:-/home} + for dir in "$homeDir"/*; do + statResult=$(stat -c "%n has owner %u resolved as %U" "$dir" \ + | grep -Eve '.bak' -e '\.[0-9]{2}-[0-9]{2}-[0-9]{4}' \ + | grep "UNKNOWN") + # There is at least one dir matching + if [[ -n "$statResult" ]]; then + failed "IS_OLD_HOME_DIR" "$statResult" + test "${VERBOSE}" = 1 || break + fi + done +} +check_tmp_1777() { + actual=$(stat --format "%a" /tmp) + expected="1777" + test "$expected" = "$actual" || failed "IS_TMP_1777" "/tmp must be $expected" +} +check_root_0700() { + actual=$(stat --format "%a" /root) + expected="700" + test "$expected" = "$actual" || failed "IS_ROOT_0700" "/root must be $expected" +} +check_usrsharescripts() { + actual=$(stat --format "%a" /usr/share/scripts) + expected="700" + test "$expected" = "$actual" || failed "IS_USRSHARESCRIPTS" "/usr/share/scripts must be $expected" +} +check_sshpermitrootno() { + sshd_args="-C addr=,user=,host=,laddr=,lport=0" + if is_debian_stretch; then + # Noop, we'll use the default $sshd_args + : + elif is_debian_buster; then + sshd_args="${sshd_args},rdomain=" + else + # NOTE: From Debian Bullseye 11 onward, with OpenSSH 8.1, the argument + # -T doesn't require the additional -C. + sshd_args= + fi + # shellcheck disable=SC2086 + if ! (sshd -T ${sshd_args} 2> /dev/null | grep -qi 'permitrootlogin no'); then + failed "IS_SSHPERMITROOTNO" "PermitRoot should be set to no" + fi +} +check_evomaintenanceusers() { + users=$(getent group evolinux-sudo | cut -d':' -f4 | tr ',' ' ') + for user in $users; do + user_home=$(getent passwd "$user" | cut -d: -f6) + if [ -n "$user_home" ] && [ -d "$user_home" ]; then + if ! grep -qs "^trap.*sudo.*evomaintenance.sh" "${user_home}"/.*profile; then + failed "IS_EVOMAINTENANCEUSERS" "${user} doesn't have an evomaintenance trap" + test "${VERBOSE}" = 1 || break + fi + fi + done +} +check_evomaintenanceconf() { + f=/etc/evomaintenance.cf + if [ -e "$f" ]; then + perms=$(stat -c "%a" $f) + test "$perms" = "600" || failed "IS_EVOMAINTENANCECONF" "Wrong permissions on \`$f' ($perms instead of 600)" + + { grep "^export PGPASSWORD" $f | grep -qv "your-passwd" \ + && grep "^PGDB" $f | grep -qv "your-db" \ + && grep "^PGTABLE" $f | grep -qv "your-table" \ + && grep "^PGHOST" $f | grep -qv "your-pg-host" \ + && grep "^FROM" $f | grep -qv "jdoe@example.com" \ + && grep "^FULLFROM" $f | grep -qv "John Doe " \ + && grep "^URGENCYFROM" $f | grep -qv "mama.doe@example.com" \ + && grep "^URGENCYTEL" $f | grep -qv "06.00.00.00.00" \ + && grep "^REALM" $f | grep -qv "example.com" + } || failed "IS_EVOMAINTENANCECONF" "evomaintenance is not correctly configured" + else + failed "IS_EVOMAINTENANCECONF" "Configuration file \`$f' is missing" + fi +} +check_privatekeyworldreadable() { + # a simple globbing fails if directory is empty + if [ -n "$(ls -A /etc/ssl/private/)" ]; then + for f in /etc/ssl/private/*; do + perms=$(stat -L -c "%a" "$f") + if [ "${perms: -1}" != 0 ]; then + failed "IS_PRIVKEYWOLRDREADABLE" "$f is world-readable" + test "${VERBOSE}" = 1 || break + fi + done + fi +} +check_evobackup_incs() { + if is_installed bkctld; then + bkctld_cron_file=${bkctld_cron_file:-/etc/cron.d/bkctld} + if [ -f "${bkctld_cron_file}" ]; then + root_crontab=$(grep -v "^#" "${bkctld_cron_file}") + echo "${root_crontab}" | grep -q "bkctld inc" || failed "IS_EVOBACKUP_INCS" "'bkctld inc' is missing in ${bkctld_cron_file}" + echo "${root_crontab}" | grep -qE "(check-incs.sh|bkctld check-incs)" || failed "IS_EVOBACKUP_INCS" "'check-incs.sh' is missing in ${bkctld_cron_file}" + else + failed "IS_EVOBACKUP_INCS" "Crontab \`${bkctld_cron_file}' is missing" + fi + fi +} + +check_osprober() { + if is_installed os-prober qemu-kvm; then + failed "IS_OSPROBER" \ + "Removal of os-prober package is recommended as it can cause serious issue on KVM server" + fi +} + +check_apt_valid_until() { + aptvalidFile="/etc/apt/apt.conf.d/99no-check-valid-until" + aptvalidText="Acquire::Check-Valid-Until no;" + if grep -qs "archive.debian.org" /etc/apt/sources.list /etc/apt/sources.list.d/*; then + if ! grep -qs "$aptvalidText" /etc/apt/apt.conf.d/*; then + failed "IS_APT_VALID_UNTIL" \ + "As you use archive.mirror.org you need ${aptvalidFile}: ${aptvalidText}" + fi + fi +} + +check_chrooted_binary_uptodate() { + # list of processes to check + process_list="sshd" + for process_name in ${process_list}; do + # what is the binary path? + original_bin=$(command -v "${process_name}") + for pid in $(pgrep "${process_name}"); do + process_bin=$(realpath "/proc/${pid}/exe") + # Is the process chrooted? + real_root=$(realpath "/proc/${pid}/root") + if [ "${real_root}" != "/" ]; then + chrooted_md5=$(md5sum "${process_bin}" | cut -f 1 -d ' ') + original_md5=$(md5sum "${original_bin}" | cut -f 1 -d ' ') + # compare md5 checksums + if [ "$original_md5" != "$chrooted_md5" ]; then + failed "IS_CHROOTED_BINARY_UPTODATE" "${process_bin} (${pid}) is different than ${original_bin}." + test "${VERBOSE}" = 1 || break + fi + fi + done + done +} +check_nginx_letsencrypt_uptodate() { + if [ -d /etc/nginx ]; then + snippets=$(find /etc/nginx -type f -name "letsencrypt.conf") + if [ -n "${snippets}" ]; then + while read -r snippet; do + if grep -qE "^\s*alias\s+/.+/\.well-known/acme-challenge" "${snippet}"; then + failed "IS_NGINX_LETSENCRYPT_UPTODATE" "Nginx snippet ${snippet} is not compatible with Nginx on Debian 9+." + fi + done <<< "${snippets}" + fi + fi +} +check_lxc_container_resolv_conf() { + if is_installed lxc; then + container_list=$(lxc-ls) + current_resolvers=$(grep nameserver /etc/resolv.conf | sed 's/nameserver//g' ) + + for container in $container_list; do + if [ -f "/var/lib/lxc/${container}/rootfs/etc/resolv.conf" ]; then + + while read -r resolver; do + if ! grep -qE "^nameserver\s+${resolver}" "/var/lib/lxc/${container}/rootfs/etc/resolv.conf"; then + failed "IS_LXC_CONTAINER_RESOLV_CONF" "resolv.conf miss-match beween host and container : missing nameserver ${resolver} in container ${container} resolv.conf" + fi + done <<< "${current_resolvers}" + + else + failed "IS_LXC_CONTAINER_RESOLV_CONF" "resolv.conf missing in container ${container}" + fi + done + fi +} +# Check that there are containers if lxc is installed. +check_no_lxc_container() { + if is_installed lxc; then + containers_count=$(lxc-ls | wc -l) + if [ "$containers_count" -eq 0 ]; then + failed "IS_NO_LXC_CONTAINER" "LXC is installed but have no container. Consider removing it." + fi + fi +} +# Check that in LXC containers, phpXX-fpm services have UMask set to 0007. +check_lxc_php_fpm_service_umask_set() { + if is_installed lxc; then + php_containers_list=$(lxc-ls --filter php) + missing_umask="" + for container in $php_containers_list; do + # Translate container name in service name + if [ "$container" = "php56" ]; then + service="php5-fpm" + else + service="${container:0:4}.${container:4}-fpm" + fi + umask=$(lxc-attach --name "${container}" -- systemctl show -p UMask "$service" | cut -d "=" -f2) + if [ "$umask" != "0007" ]; then + missing_umask="${missing_umask} ${container}" + fi + done + if [ -n "${missing_umask}" ]; then + failed "IS_LXC_PHP_FPM_SERVICE_UMASK_SET" "UMask is not set to 0007 in PHP-FPM services of theses containers : ${missing_umask}." + fi + fi +} + +download_versions() { + local file + file=${1:-} + + ## The file is supposed to list programs : each on a line, then its latest version number + ## Examples: + # evoacme 21.06 + # evomaintenance 0.6.4 + + versions_url="https://upgrades.evolix.org/versions-${DEBIAN_RELEASE}" + + # fetch timeout, in seconds + timeout=10 + + if command -v curl > /dev/null; then + curl --max-time ${timeout} --fail --silent --output "${versions_file}" "${versions_url}" + elif command -v wget > /dev/null; then + wget --timeout=${timeout} --quiet "${versions_url}" -O "${versions_file}" + elif command -v GET; then + GET -t ${timeout}s "${versions_url}" > "${versions_file}" + else + failed "IS_CHECK_VERSIONS" "failed to find curl, wget or GET" + fi + test "$?" -eq 0 || failed "IS_CHECK_VERSIONS" "failed to download ${versions_url} to ${versions_file}" +} +get_command() { + local program + program=${1:-} + + case "${program}" in + ## Special cases where the program name is different than the command name + evocheck) echo "${0}" ;; + evomaintenance) command -v "evomaintenance.sh" ;; + listupgrade) command -v "evolistupgrade.sh" ;; + old-kernel-autoremoval) command -v "old-kernel-autoremoval.sh" ;; + mysql-queries-killer) command -v "mysql-queries-killer.sh" ;; + minifirewall) echo "/etc/init.d/minifirewall" ;; + + ## General case, where the program name is the same as the command name + *) command -v "${program}" ;; + esac +} +get_version() { + local program + local command + program=${1:-} + command=${2:-} + + case "${program}" in + ## Special case if `command --version => 'command` is not the standard way to get the version + # my_command) + # /path/to/my_command --get-version + # ;; + + add-vm) + grep '^VERSION=' "${command}" | head -1 | cut -d '=' -f 2 + ;; + minifirewall) + ${command} version | head -1 | cut -d ' ' -f 3 + ;; + ## Let's try the --version flag before falling back to grep for the constant + kvmstats) + if ${command} --version > /dev/null 2> /dev/null; then + ${command} --version 2> /dev/null | head -1 | cut -d ' ' -f 3 + else + grep '^VERSION=' "${command}" | head -1 | cut -d '=' -f 2 + fi + ;; + + ## General case to get the version + *) ${command} --version 2> /dev/null | head -1 | cut -d ' ' -f 3 ;; + esac +} +check_version() { + local program + local expected_version + program=${1:-} + expected_version=${2:-} + + command=$(get_command "${program}") + if [ -n "${command}" ]; then + # shellcheck disable=SC2086 + actual_version=$(get_version "${program}" "${command}") + # printf "program:%s expected:%s actual:%s\n" "${program}" "${expected_version}" "${actual_version}" + if [ -z "${actual_version}" ]; then + failed "IS_CHECK_VERSIONS" "failed to lookup actual version of ${program}" + elif dpkg --compare-versions "${actual_version}" lt "${expected_version}"; then + failed "IS_CHECK_VERSIONS" "${program} version ${actual_version} is older than expected version ${expected_version}" + elif dpkg --compare-versions "${actual_version}" gt "${expected_version}"; then + failed "IS_CHECK_VERSIONS" "${program} version ${actual_version} is newer than expected version ${expected_version}, you should update your index." + else + : # Version check OK + fi + fi +} +add_to_path() { + local new_path + new_path=${1:-} + + echo "$PATH" | grep -qF "${new_path}" || export PATH="${PATH}:${new_path}" +} +check_versions() { + versions_file=$(mktemp --tmpdir "evocheck.versions.XXXXX") + files_to_cleanup+=("${versions_file}") + + download_versions "${versions_file}" + add_to_path "/usr/share/scripts" + + grep -v '^ *#' < "${versions_file}" | while IFS= read -r line; do + local program + local version + program=$(echo "${line}" | cut -d ' ' -f 1) + version=$(echo "${line}" | cut -d ' ' -f 2) + + if [ -n "${program}" ]; then + if [ -n "${version}" ]; then + check_version "${program}" "${version}" + else + failed "IS_CHECK_VERSIONS" "failed to lookup expected version for ${program}" + fi + fi + done +} + +main() { + # Default return code : 0 = no error + RC=0 + # Detect operating system name, version and release + detect_os + + main_output_file=$(mktemp --tmpdir "evocheck.main.XXXXX") + files_to_cleanup+=("${main_output_file}") + + test "${IS_TMP_1777:=1}" = 1 && check_tmp_1777 + test "${IS_ROOT_0700:=1}" = 1 && check_root_0700 + test "${IS_USRSHARESCRIPTS:=1}" = 1 && check_usrsharescripts + test "${IS_SSHPERMITROOTNO:=1}" = 1 && check_sshpermitrootno + test "${IS_EVOMAINTENANCEUSERS:=1}" = 1 && check_evomaintenanceusers + # Verification de la configuration d'evomaintenance + test "${IS_EVOMAINTENANCECONF:=1}" = 1 && check_evomaintenanceconf + test "${IS_PRIVKEYWOLRDREADABLE:=1}" = 1 && check_privatekeyworldreadable + + test "${IS_LSBRELEASE:=1}" = 1 && check_lsbrelease + test "${IS_DPKGWARNING:=1}" = 1 && check_dpkgwarning + test "${IS_POSTFIX_MYDESTINATION:=1}" = 1 && check_postfix_mydestination + test "${IS_NRPEPOSTFIX:=1}" = 1 && check_nrpepostfix + test "${IS_CUSTOMSUDOERS:=1}" = 1 && check_customsudoers + test "${IS_VARTMPFS:=1}" = 1 && check_vartmpfs + test "${IS_SERVEURBASE:=1}" = 1 && check_serveurbase + test "${IS_LOGROTATECONF:=1}" = 1 && check_logrotateconf + test "${IS_SYSLOGCONF:=1}" = 1 && check_syslogconf + test "${IS_DEBIANSECURITY:=1}" = 1 && check_debiansecurity + test "${IS_OLDPUB:=1}" = 1 && check_oldpub + test "${IS_NEWPUB:=1}" = 1 && check_newpub + test "${IS_APTITUDE:=1}" = 1 && check_aptitude + test "${IS_APTGETBAK:=1}" = 1 && check_aptgetbak + test "${IS_USRRO:=1}" = 1 && check_usrro + test "${IS_TMPNOEXEC:=1}" = 1 && check_tmpnoexec + test "${IS_MOUNT_FSTAB:=1}" = 1 && check_mountfstab + test "${IS_LISTCHANGESCONF:=1}" = 1 && check_listchangesconf + test "${IS_CUSTOMCRONTAB:=1}" = 1 && check_customcrontab + test "${IS_SSHALLOWUSERS:=1}" = 1 && check_sshallowusers + test "${IS_DISKPERF:=0}" = 1 && check_diskperf + test "${IS_TMOUTPROFILE:=1}" = 1 && check_tmoutprofile + test "${IS_ALERT5BOOT:=1}" = 1 && check_alert5boot + test "${IS_ALERT5MINIFW:=1}" = 1 && check_alert5minifw + test "${IS_ALERT5MINIFW:=1}" = 1 && test "${IS_MINIFW:=1}" = 1 && check_minifw + test "${IS_NRPEPERMS:=1}" = 1 && check_nrpeperms + test "${IS_MINIFWPERMS:=1}" = 1 && check_minifwperms + # Enable when minifirewall is released + test "${IS_MINIFWINCLUDES:=0}" = 1 && check_minifw_includes + test "${IS_NRPEDISKS:=0}" = 1 && check_nrpedisks + test "${IS_NRPEPID:=1}" = 1 && check_nrpepid + test "${IS_GRSECPROCS:=1}" = 1 && check_grsecprocs + test "${IS_APACHEMUNIN:=1}" = 1 && check_apachemunin + test "${IS_MYSQLUTILS:=1}" = 1 && check_mysqlutils + test "${IS_RAIDSOFT:=1}" = 1 && check_raidsoft + test "${IS_AWSTATSLOGFORMAT:=1}" = 1 && check_awstatslogformat + test "${IS_MUNINLOGROTATE:=1}" = 1 && check_muninlogrotate + test "${IS_SQUID:=1}" = 1 && check_squid + test "${IS_EVOMAINTENANCE_FW:=1}" = 1 && check_evomaintenance_fw + test "${IS_MODDEFLATE:=1}" = 1 && check_moddeflate + test "${IS_LOG2MAILRUNNING:=1}" = 1 && check_log2mailrunning + test "${IS_LOG2MAILAPACHE:=1}" = 1 && check_log2mailapache + test "${IS_LOG2MAILMYSQL:=1}" = 1 && check_log2mailmysql + test "${IS_LOG2MAILSQUID:=1}" = 1 && check_log2mailsquid + test "${IS_BINDCHROOT:=1}" = 1 && check_bindchroot + test "${IS_NETWORK_INTERFACES:=1}" = 1 && check_network_interfaces + test "${IS_AUTOIF:=1}" = 1 && check_autoif + test "${IS_INTERFACESGW:=1}" = 1 && check_interfacesgw + test "${IS_NETWORKING_SERVICE:=1}" = 1 && check_networking_service + test "${IS_EVOBACKUP:=1}" = 1 && check_evobackup + test "${IS_PURGE_FAIL2BAN:=1}" = 1 && check_fail2ban_purge + test "${IS_SSH_FAIL2BAN_JAIL_RENAMED:=1}" = 1 && check_ssh_fail2ban_jail_renamed + test "${IS_EVOBACKUP_EXCLUDE_MOUNT:=1}" = 1 && check_evobackup_exclude_mount + test "${IS_USERLOGROTATE:=1}" = 1 && check_userlogrotate + test "${IS_APACHECTL:=1}" = 1 && check_apachectl + test "${IS_APACHESYMLINK:=1}" = 1 && check_apachesymlink + test "${IS_APACHEIPINALLOW:=1}" = 1 && check_apacheipinallow + test "${IS_MUNINAPACHECONF:=1}" = 1 && check_muninapacheconf + test "${IS_PHPMYADMINAPACHECONF:=1}" = 1 && check_phpmyadminapacheconf + test "${IS_KERNELUPTODATE:=1}" = 1 && check_kerneluptodate + test "${IS_UPTIME:=1}" = 1 && check_uptime + test "${IS_MUNINRUNNING:=1}" = 1 && check_muninrunning + test "${IS_BACKUPUPTODATE:=1}" = 1 && check_backupuptodate + test "${IS_ETCGIT:=1}" = 1 && check_etcgit + test "${IS_GITPERMS:=1}" = 1 && check_gitperms + test "${IS_NOTUPGRADED:=1}" = 1 && check_notupgraded + test "${IS_TUNE2FS_M5:=1}" = 1 && check_tune2fs_m5 + test "${IS_EVOLINUXSUDOGROUP:=1}" = 1 && check_evolinuxsudogroup + test "${IS_USERINADMGROUP:=1}" = 1 && check_userinadmgroup + test "${IS_APACHE2EVOLINUXCONF:=1}" = 1 && check_apache2evolinuxconf + test "${IS_BACKPORTSCONF:=1}" = 1 && check_backportsconf + test "${IS_BIND9MUNIN:=1}" = 1 && check_bind9munin + test "${IS_BIND9LOGROTATE:=1}" = 1 && check_bind9logrotate + test "${IS_BROADCOMFIRMWARE:=1}" = 1 && check_broadcomfirmware + test "${IS_HARDWARERAIDTOOL:=1}" = 1 && check_hardwareraidtool + test "${IS_LOG2MAILSYSTEMDUNIT:=1}" = 1 && check_log2mailsystemdunit + test "${IS_LISTUPGRADE:=1}" = 1 && check_listupgrade + test "${IS_MARIADBEVOLINUXCONF:=0}" = 1 && check_mariadbevolinuxconf + test "${IS_SQL_BACKUP:=1}" = 1 && check_sql_backup + test "${IS_POSTGRES_BACKUP:=1}" = 1 && check_postgres_backup + test "${IS_MONGO_BACKUP:=1}" = 1 && check_mongo_backup + test "${IS_LDAP_BACKUP:=1}" = 1 && check_ldap_backup + test "${IS_REDIS_BACKUP:=1}" = 1 && check_redis_backup + test "${IS_ELASTIC_BACKUP:=1}" = 1 && check_elastic_backup + test "${IS_MARIADBSYSTEMDUNIT:=1}" = 1 && check_mariadbsystemdunit + test "${IS_MYSQLMUNIN:=1}" = 1 && check_mysqlmunin + test "${IS_MYSQLNRPE:=1}" = 1 && check_mysqlnrpe + test "${IS_PHPEVOLINUXCONF:=0}" = 1 && check_phpevolinuxconf + test "${IS_SQUIDLOGROTATE:=1}" = 1 && check_squidlogrotate + test "${IS_SQUIDEVOLINUXCONF:=1}" = 1 && check_squidevolinuxconf + test "${IS_DUPLICATE_FS_LABEL:=1}" = 1 && check_duplicate_fs_label + test "${IS_EVOLIX_USER:=1}" = 1 && check_evolix_user + test "${IS_EVOACME_CRON:=1}" = 1 && check_evoacme_cron + test "${IS_EVOACME_LIVELINKS:=1}" = 1 && check_evoacme_livelinks + test "${IS_APACHE_CONFENABLED:=1}" = 1 && check_apache_confenabled + test "${IS_MELTDOWN_SPECTRE:=1}" = 1 && check_meltdown_spectre + test "${IS_OLD_HOME_DIR:=0}" = 1 && check_old_home_dir + test "${IS_EVOBACKUP_INCS:=1}" = 1 && check_evobackup_incs + test "${IS_OSPROBER:=1}" = 1 && check_osprober + test "${IS_APT_VALID_UNTIL:=1}" = 1 && check_apt_valid_until + test "${IS_CHROOTED_BINARY_UPTODATE:=1}" = 1 && check_chrooted_binary_uptodate + test "${IS_NGINX_LETSENCRYPT_UPTODATE:=1}" = 1 && check_nginx_letsencrypt_uptodate + test "${IS_LXC_CONTAINER_RESOLV_CONF:=1}" = 1 && check_lxc_container_resolv_conf + test "${IS_NO_LXC_CONTAINER:=1}" = 1 && check_no_lxc_container + test "${IS_LXC_PHP_FPM_SERVICE_UMASK_SET:=1}" = 1 && check_lxc_php_fpm_service_umask_set + test "${IS_CHECK_VERSIONS:=1}" = 1 && check_versions + + if [ -f "${main_output_file}" ]; then + lines_found=$(wc -l < "${main_output_file}") + # shellcheck disable=SC2086 + if [ ${lines_found} -gt 0 ]; then + + cat "${main_output_file}" 2>&1 + fi + fi + + exit ${RC} +} +cleanup() { + # Cleanup tmp files + # shellcheck disable=SC2086,SC2317 + rm -f ${files_to_cleanup[@]} + + log "$PROGNAME exit." +} + +PROGNAME=$(basename "$0") +# shellcheck disable=SC2034 +readonly PROGNAME + +# shellcheck disable=SC2124 +ARGS=$@ +readonly ARGS + +LOGFILE="/var/log/evocheck.log" +readonly LOGFILE + +CONFIGFILE="/etc/evocheck.cf" +readonly CONFIGFILE + +DATE_FORMAT="%Y-%m-%d %H:%M:%S" +# shellcheck disable=SC2034 +readonly DATEFORMAT + +# Disable LANG* +export LANG=C +export LANGUAGE=C + +# Source configuration file +# shellcheck disable=SC1091 +test -f "${CONFIGFILE}" && . "${CONFIGFILE}" + +# Parse options +# based on https://gist.github.com/deshion/10d3cb5f88a21671e17a +while :; do + case $1 in + -h|-\?|--help) + show_help + exit 0 + ;; + --version) + show_version + exit 0 + ;; + --cron) + IS_KERNELUPTODATE=0 + IS_UPTIME=0 + IS_MELTDOWN_SPECTRE=0 + IS_CHECK_VERSIONS=0 + IS_NETWORKING_SERVICE=0 + ;; + -v|--verbose) + VERBOSE=1 + ;; + -q|--quiet) + QUIET=1 + VERBOSE=0 + ;; + --) + # End of all options. + shift + break + ;; + -?*|[[:alnum:]]*) + # ignore unknown options + if [ "${QUIET}" != 1 ]; then + printf 'WARN: Unknown option (ignored): %s\n' "$1" >&2 + fi + ;; + *) + # Default case: If no more options then break out of the loop. + break + ;; + esac + + shift +done + +# Keep this after "show_version(); exit 0" which is called by check_versions +# to avoid logging exit twice. +declare -a files_to_cleanup +files_to_cleanup="" +# shellcheck disable=SC2064 +trap cleanup EXIT INT TERM + +log '-----------------------------------------------' +log "Running $PROGNAME $VERSION..." + +# Log config file content +if [ -f "${CONFIGFILE}" ]; then + log "Runtime configuration (${CONFIGFILE}):" + sed -e '/^[[:blank:]]*#/d; s/#.*//; /^[[:blank:]]*$/d' "${CONFIGFILE}" | log +fi + +# shellcheck disable=SC2086 +main ${ARGS} + +log "End of $PROGNAME execution." + From 1848a6162a8899d23bd0fd6c88346728042ef7a9 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Mon, 18 Sep 2023 10:53:22 +0200 Subject: [PATCH 144/182] nagios-nrpe: check-local can now detect anwqd connect to local IPs other than 127.0.0.1 --- nagios-nrpe/files/check-local | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/nagios-nrpe/files/check-local b/nagios-nrpe/files/check-local index dc46aacd..5d38d7a5 100755 --- a/nagios-nrpe/files/check-local +++ b/nagios-nrpe/files/check-local @@ -2,6 +2,8 @@ CHECK_BIN=/usr/lib/nagios/plugins/check_nrpe +server_address="127.0.0.1" + if ! test -f "${CHECK_BIN}"; then echo "${CHECK_BIN} is missing, please install nagios-nrpe-plugin package." exit 1 @@ -9,10 +11,17 @@ fi for file in /etc/nagios/{nrpe.cfg,nrpe_local.cfg,nrpe.d/evolix.cfg}; do if [ -r ${file} ]; then - found_command=$(grep "\[check_$1\]" "${file}" | grep -v '^[[:blank:]]*#' | tail -n1 | cut -d'=' -f2-) + command_search=$(grep "\[check_$1\]" "${file}" | grep -v '^[[:blank:]]*#' | tail -n1 | cut -d'=' -f2-) fi - if [ -n "${found_command}" ]; then - command="${found_command}" + if [ -n "${command_search}" ]; then + command="${command_search}" + fi + + if [ -r ${file} ]; then + server_address_search=$(grep "server_address" "${file}" | grep -v '^[[:blank:]]*#' | cut -d'=' -f2) + fi + if [ -n "${server_address_search}" ]; then + server_address="${server_address_search}" fi done @@ -22,6 +31,6 @@ if [ -n "${command}" ]; then fi echo "NRPE daemon output:" -"${CHECK_BIN}" -H 127.0.0.1 -c "check_$1" +"${CHECK_BIN}" -H "${server_address}" -c "check_$1" From 45fc4b3371b562652b073ba49dba6b4e02edb962 Mon Sep 17 00:00:00 2001 From: Bruno TATU Date: Wed, 20 Sep 2023 09:47:22 +0200 Subject: [PATCH 145/182] whitelist domains used by nextcloud --- squid/files/evolinux-whitelist-defaults.conf | 7 ++++++- squid/files/whitelist-evolinux.conf | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/squid/files/evolinux-whitelist-defaults.conf b/squid/files/evolinux-whitelist-defaults.conf index 433b9ef8..a264406c 100644 --- a/squid/files/evolinux-whitelist-defaults.conf +++ b/squid/files/evolinux-whitelist-defaults.conf @@ -140,6 +140,11 @@ ^www\.parismatch\.com$ ^www\.liberation\.fr$ +# Nextcloud +^www\.nextcloud\.com$ +^www\.edri\.org$ +^www\.eff\.org$ + # Others #.+\.amazon.com$ .+\.twitter\.com$ @@ -170,4 +175,4 @@ ^www\.dailymotion\.com$ .+\.123rf\.com$ .+\.gouv\.fr$ -^ifconfig\.me$ \ No newline at end of file +^ifconfig\.me$ diff --git a/squid/files/whitelist-evolinux.conf b/squid/files/whitelist-evolinux.conf index c445e835..9378808f 100644 --- a/squid/files/whitelist-evolinux.conf +++ b/squid/files/whitelist-evolinux.conf @@ -134,6 +134,11 @@ http://www.leparisien.fr/.* http://www.parismatch.com/.* http://www.liberation.fr/.* +# Nextcloud +http://www.nextcloud.com/.* +http://www.edri.org/.* +http://www.eff.org/.* + # Others #http://.*.amazon.com/.* http://.*.twitter.com/.* From 050b2ae419528936c55499ef3f8f0dc3b08d1a85 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Sun, 17 Sep 2023 10:18:37 +0200 Subject: [PATCH 146/182] kvm-host: migrate-vm sets the migration speed automatically --- CHANGELOG.md | 2 +- kvm-host/files/migrate-vm.sh | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfdceb4a..3e6e8469 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * fail2ban: add default variable fail2ban_dbpurgeage_default * fail2ban: add variable fail2ban_sshd_port to configure sshd port * metricbeat/logstash: fix Ansible syntax -* kvm-host: release 23.09 for migrate-vm.sh +* kvm-host: release 23.09.1 for migrate-vm.sh * nagios-nrpe: add a NRPE check-local command with completion. * nagios-nrpe: add a proper monitoring plugin for glusterfs (on servers, not for clients) * php: add new variable to disable oveeriding settings of php-fpm default pool (www) diff --git a/kvm-host/files/migrate-vm.sh b/kvm-host/files/migrate-vm.sh index 6803450a..09b7f6f3 100644 --- a/kvm-host/files/migrate-vm.sh +++ b/kvm-host/files/migrate-vm.sh @@ -11,7 +11,7 @@ # * migrate "from" # * switch to Bash to use local and readonly variables -VERSION="23.09" +VERSION="23.09.1" show_version() { cat < Date: Wed, 20 Sep 2023 13:32:38 +0200 Subject: [PATCH 147/182] Revert "add new version of evocheck.sh" This reverts commit 4ca17f06c1e7979731dfd3eb3fd4d5f0adf2bc93. --- evocheck/evocheck.sh | 1654 ------------------------------------------ 1 file changed, 1654 deletions(-) delete mode 100755 evocheck/evocheck.sh diff --git a/evocheck/evocheck.sh b/evocheck/evocheck.sh deleted file mode 100755 index 71b7540b..00000000 --- a/evocheck/evocheck.sh +++ /dev/null @@ -1,1654 +0,0 @@ -#!/bin/bash - -# EvoCheck -# Script to verify compliance of a Linux (Debian) server -# powered by Evolix - -VERSION="23.07" -readonly VERSION - -# base functions - -show_version() { - cat <, - Romain Dessort , - Benoit Série , - Gregory Colpart , - Jérémy Lecour , - Tristan Pilat , - Victor Laborie , - Alexis Ben Miloud--Josselin , - and others. - -evocheck comes with ABSOLUTELY NO WARRANTY. This is free software, -and you are welcome to redistribute it under certain conditions. -See the GNU General Public License v3.0 for details. -END -} -show_help() { - cat <&2 - echo "This version is built for Debian 9 and later." >&2 - exit - fi - - if [ -x "${LSB_RELEASE_BIN}" ]; then - DEBIAN_RELEASE=$(${LSB_RELEASE_BIN} --codename --short) - else - case ${DEBIAN_MAIN_VERSION} in - 9) DEBIAN_RELEASE="stretch";; - 10) DEBIAN_RELEASE="buster";; - 11) DEBIAN_RELEASE="bullseye";; - 12) DEBIAN_RELEASE="bookworm";; - esac - fi - fi -} - -is_debian_stretch() { - test "${DEBIAN_RELEASE}" = "stretch" -} -is_debian_buster() { - test "${DEBIAN_RELEASE}" = "buster" -} -is_debian_bullseye() { - test "${DEBIAN_RELEASE}" = "bullseye" -} -is_debian_bookworm() { - test "${DEBIAN_RELEASE}" = "bookworm" -} - -is_pack_web(){ - test -e /usr/share/scripts/web-add.sh || test -e /usr/share/scripts/evoadmin/web-add.sh -} -is_pack_samba(){ - test -e /usr/share/scripts/add.pl -} -is_installed(){ - for pkg in "$@"; do - dpkg -l "$pkg" 2> /dev/null | grep -q -E '^(i|h)i' || return 1 - done -} - -# logging - -log() { - date=$(/bin/date +"${DATE_FORMAT}") - if [ "${1}" != '' ]; then - printf "[%s] %s: %s\\n" "$date" "${PROGNAME}" "${1}" >> "${LOGFILE}" - else - while read line; do - printf "[%s] %s: %s\\n" "$date" "${PROGNAME}" "${line}" >> "${LOGFILE}" - done < /dev/stdin - fi -} - -failed() { - check_name=$1 - shift - check_comments=$* - - RC=1 - if [ "${QUIET}" != 1 ]; then - if [ -n "${check_comments}" ] && [ "${VERBOSE}" = 1 ]; then - printf "%s FAILED! %s\n" "${check_name}" "${check_comments}" >> "${main_output_file}" - else - printf "%s FAILED!\n" "${check_name}" >> "${main_output_file}" - fi - fi - - # Always log verbose - log "${check_name} FAILED! ${check_comments}" -} - -# check functions - -check_lsbrelease(){ - if [ -x "${LSB_RELEASE_BIN}" ]; then - ## only the major version matters - lhs=$(${LSB_RELEASE_BIN} --release --short | cut -d "." -f 1) - rhs=$(cut -d "." -f 1 < /etc/debian_version) - test "$lhs" = "$rhs" || failed "IS_LSBRELEASE" "release is not consistent between lsb_release (${lhs}) and /etc/debian_version (${rhs})" - else - failed "IS_LSBRELEASE" "lsb_release is missing or not executable" - fi -} -check_dpkgwarning() { - test -e /etc/apt/apt.conf.d/z-evolinux.conf \ - || failed "IS_DPKGWARNING" "/etc/apt/apt.conf.d/z-evolinux.conf is missing" -} -# Check if localhost, localhost.localdomain and localhost.$mydomain are set in Postfix mydestination option. -check_postfix_mydestination() { - # shellcheck disable=SC2016 - if ! grep mydestination /etc/postfix/main.cf | grep --quiet -E 'localhost([[:blank:]]|$)'; then - failed "IS_POSTFIX_MYDESTINATION" "'localhost' is missing in Postfix mydestination option." - fi - if ! grep mydestination /etc/postfix/main.cf | grep --quiet 'localhost\.localdomain'; then - failed "IS_POSTFIX_MYDESTINATION" "'localhost.localdomain' is missing in Postfix mydestination option." - fi - if ! grep mydestination /etc/postfix/main.cf | grep --quiet 'localhost\.\$mydomain'; then - failed "IS_POSTFIX_MYDESTINATION" "'localhost.\$mydomain' is missing in Postfix mydestination option." - fi -} -# Verifying check_mailq in Nagios NRPE config file. (Option "-M postfix" need to be set if the MTA is Postfix) -check_nrpepostfix() { - if is_installed postfix; then - { test -e /etc/nagios/nrpe.cfg \ - && grep -qr "^command.*check_mailq -M postfix" /etc/nagios/nrpe.*; - } || failed "IS_NRPEPOSTFIX" "NRPE \"check_mailq\" for postfix is missing" - fi -} -# Check if mod-security config file is present -check_customsudoers() { - grep -E -qr "umask=0077" /etc/sudoers* || failed "IS_CUSTOMSUDOERS" "missing umask=0077 in sudoers file" -} -check_vartmpfs() { - FINDMNT_BIN=$(command -v findmnt) - if [ -x "${FINDMNT_BIN}" ]; then - ${FINDMNT_BIN} /var/tmp --type tmpfs --noheadings > /dev/null || failed "IS_VARTMPFS" "/var/tmp is not a tmpfs" - else - df /var/tmp | grep -q tmpfs || failed "IS_VARTMPFS" "/var/tmp is not a tmpfs" - fi -} -check_serveurbase() { - is_installed serveur-base || failed "IS_SERVEURBASE" "serveur-base package is not installed" -} -check_logrotateconf() { - test -e /etc/logrotate.d/zsyslog || failed "IS_LOGROTATECONF" "missing zsyslog in logrotate.d" -} -check_syslogconf() { - grep -q "^# Syslog for Pack Evolix serveur" /etc/*syslog.conf \ - || failed "IS_SYSLOGCONF" "syslog evolix config file missing" -} -check_debiansecurity() { - # Look for enabled "Debian-Security" sources from the "Debian" origin - apt-cache policy | grep "\bl=Debian-Security\b" | grep "\bo=Debian\b" | grep --quiet "\bc=main\b" - test $? -eq 0 || failed "IS_DEBIANSECURITY" "missing Debian-Security repository" -} -check_oldpub() { - # Look for enabled pub.evolix.net sources (supersed by pub.evolix.org since Stretch) - apt-cache policy | grep --quiet pub.evolix.net - test $? -eq 1 || failed "IS_OLDPUB" "Old pub.evolix.net repository is still enabled" -} -check_newpub() { - # Look for enabled pub.evolix.org sources - apt-cache policy | grep --quiet pub.evolix.org - test $? -eq 0 || failed "IS_NEWPUB" "New pub.evolix.org repository is missing" -} -check_aptitude() { - test -e /usr/bin/aptitude && failed "IS_APTITUDE" "aptitude may not be installed on Debian >=8" -} -check_aptgetbak() { - test -e /usr/bin/apt-get.bak && failed "IS_APTGETBAK" "prohibit the installation of apt-get.bak with dpkg-divert(1)" -} -check_usrro() { - grep /usr /etc/fstab | grep -qE "\bro\b" || failed "IS_USRRO" "missing ro directive on fstab for /usr" -} -check_tmpnoexec() { - FINDMNT_BIN=$(command -v findmnt) - if [ -x "${FINDMNT_BIN}" ]; then - options=$(${FINDMNT_BIN} --noheadings --first-only --output OPTIONS /tmp) - echo "${options}" | grep -qE "\bnoexec\b" || failed "IS_TMPNOEXEC" "/tmp is not mounted with 'noexec'" - else - mount | grep "on /tmp" | grep -qE "\bnoexec\b" || failed "IS_TMPNOEXEC" "/tmp is not mounted with 'noexec' (WARNING: findmnt(8) is not found)" - fi -} -check_mountfstab() { - # Test if lsblk available, if not skip this test... - LSBLK_BIN=$(command -v lsblk) - if test -x "${LSBLK_BIN}"; then - for mountPoint in $(${LSBLK_BIN} -o MOUNTPOINT -l -n | grep '/'); do - grep -Eq "$mountPoint\W" /etc/fstab \ - || failed "IS_MOUNT_FSTAB" "partition(s) detected mounted but no presence in fstab" - done - fi -} -check_listchangesconf() { - if is_installed apt-listchanges; then - failed "IS_LISTCHANGESCONF" "apt-listchanges must not be installed on Debian >=9" - fi -} -check_customcrontab() { - found_lines=$(grep -c -E "^(17 \*|25 6|47 6|52 6)" /etc/crontab) - test "$found_lines" = 4 && failed "IS_CUSTOMCRONTAB" "missing custom field in crontab" -} -check_sshallowusers() { - grep -E -qir "(AllowUsers|AllowGroups)" /etc/ssh/sshd_config /etc/ssh/sshd_config.d \ - || failed "IS_SSHALLOWUSERS" "missing AllowUsers or AllowGroups directive in sshd_config" -} -check_diskperf() { - perfFile="/root/disk-perf.txt" - test -e $perfFile || failed "IS_DISKPERF" "missing ${perfFile}" -} -check_tmoutprofile() { - grep -sq "TMOUT=" /etc/profile /etc/profile.d/evolinux.sh || failed "IS_TMOUTPROFILE" "TMOUT is not set" -} -check_alert5boot() { - if is_debian_stretch; then - if [ -n "$(find /etc/rc2.d/ -name 'S*alert5')" ]; then - grep -q "^date" /etc/rc2.d/S*alert5 || failed "IS_ALERT5BOOT" "boot mail is not sent by alert5 init script" - elif [ -n "$(find /etc/init.d/ -name 'alert5')" ]; then - grep -q "^date" /etc/init.d/alert5 || failed "IS_ALERT5BOOT" "boot mail is not sent by alert5 int script" - else - failed "IS_ALERT5BOOT" "alert5 init script is missing" - fi - else - grep -qs "^date" /usr/share/scripts/alert5.sh || failed "IS_ALERT5BOOT" "boot mail is not sent by alert5 init script" - if [ -f /etc/systemd/system/alert5.service ]; then - systemctl is-enabled alert5.service -q || failed "IS_ALERT5BOOT" "alert5 unit is not enabled" - else - failed "IS_ALERT5BOOT" "alert5 unit file is missing" - fi - fi -} -check_alert5minifw() { - if is_debian_stretch; then - if [ -n "$(find /etc/rc2.d/ -name 'S*alert5')" ]; then - grep -q "^/etc/init.d/minifirewall" /etc/rc2.d/S*alert5 \ - || failed "IS_ALERT5MINIFW" "Minifirewall is not started by alert5 init script" - elif [ -n "$(find /etc/init.d/ -name 'alert5')" ]; then - grep -q "^/etc/init.d/minifirewall" /etc/init.d/alert5 \ - || failed "IS_ALERT5MINIFW" "Minifirewall is not started by alert5 init script" - else - failed "IS_ALERT5MINIFW" "alert5 init script is missing" - fi - else - grep -qs "^/etc/init.d/minifirewall" /usr/share/scripts/alert5.sh \ - || failed "IS_ALERT5MINIFW" "Minifirewall is not started by alert5 script or script is missing" - fi -} -check_minifw() { - { - if [ -f /etc/systemd/system/minifirewall.service ]; then - systemctl is-active minifirewall > /dev/null 2>&1 - else - if test -x /usr/share/scripts/minifirewall_status; then - /usr/share/scripts/minifirewall_status > /dev/null 2>&1 - else - /sbin/iptables -L -n 2> /dev/null | grep -q -E "^(DROP\s+(udp|17)|ACCEPT\s+(icmp|1))\s+--\s+0\.0\.0\.0\/0\s+0\.0\.0\.0\/0\s*$" - fi - fi - } || failed "IS_MINIFW" "minifirewall seems not started" -} -check_minifw_includes() { - if is_debian_bullseye; then - if grep -q -e '/sbin/iptables' -e '/sbin/ip6tables' "/etc/default/minifirewall"; then - failed "IS_MINIFWINCLUDES" "minifirewall has direct iptables invocations in /etc/default/minifirewall that should go in /etc/minifirewall.d/" - fi - fi -} -check_nrpeperms() { - if [ -d /etc/nagios ]; then - nagiosDir="/etc/nagios" - actual=$(stat --format "%a" $nagiosDir) - expected="750" - test "$expected" = "$actual" || failed "IS_NRPEPERMS" "${nagiosDir} must be ${expected}" - fi -} -check_minifwperms() { - if [ -f "/etc/default/minifirewall" ]; then - actual=$(stat --format "%a" "/etc/default/minifirewall") - expected="600" - test "$expected" = "$actual" || failed "IS_MINIFWPERMS" "/etc/default/minifirewall must be ${expected}" - fi -} -check_nrpedisks() { - NRPEDISKS=$(grep command.check_disk /etc/nagios/nrpe.cfg | grep "^command.check_disk[0-9]" | sed -e "s/^command.check_disk\([0-9]\+\).*/\1/" | sort -n | tail -1) - DFDISKS=$(df -Pl | grep -c -E -v "(^Filesystem|/lib/init/rw|/dev/shm|udev|rpc_pipefs)") - test "$NRPEDISKS" = "$DFDISKS" || failed "IS_NRPEDISKS" "there must be $DFDISKS check_disk in nrpe.cfg" -} -check_nrpepid() { - if { is_debian_bullseye || is_debian_bookworm ; }; then - { test -e /etc/nagios/nrpe.cfg \ - && grep -q "^pid_file=/run/nagios/nrpe.pid" /etc/nagios/nrpe.cfg; - } || failed "IS_NRPEPID" "missing or wrong pid_file directive in nrpe.cfg" - else - { test -e /etc/nagios/nrpe.cfg \ - && grep -q "^pid_file=/var/run/nagios/nrpe.pid" /etc/nagios/nrpe.cfg; - } || failed "IS_NRPEPID" "missing or wrong pid_file directive in nrpe.cfg" - fi -} -check_grsecprocs() { - if uname -a | grep -q grsec; then - { grep -q "^command.check_total_procs..sudo" /etc/nagios/nrpe.cfg \ - && grep -A1 "^\[processes\]" /etc/munin/plugin-conf.d/munin-node | grep -q "^user root"; - } || failed "IS_GRSECPROCS" "missing munin's plugin processes directive for grsec" - fi -} -check_apachemunin() { - if test -e /etc/apache2/apache2.conf; then - { test -h /etc/apache2/mods-enabled/status.load \ - && test -h /etc/munin/plugins/apache_accesses \ - && test -h /etc/munin/plugins/apache_processes \ - && test -h /etc/munin/plugins/apache_volume; - } || failed "IS_APACHEMUNIN" "missing munin plugins for Apache" - fi -} -# Verification mytop + Munin si MySQL -check_mysqlutils() { - MYSQL_ADMIN=${MYSQL_ADMIN:-mysqladmin} - if is_installed mysql-server; then - # With Debian 11 and later, root can connect to MariaDB with the socket - if is_debian_stretch || is_debian_buster; then - # You can configure MYSQL_ADMIN in evocheck.cf - if ! grep -qs "^user *= *${MYSQL_ADMIN}" /root/.my.cnf; then - failed "IS_MYSQLUTILS" "${MYSQL_ADMIN} missing in /root/.my.cnf" - fi - fi - if ! test -x /usr/bin/mytop; then - if ! test -x /usr/local/bin/mytop; then - failed "IS_MYSQLUTILS" "mytop binary missing" - fi - fi - if ! grep -qs '^user *=' /root/.mytop; then - failed "IS_MYSQLUTILS" "credentials missing in /root/.mytop" - fi - fi -} -# Verification de la configuration du raid soft (mdadm) -check_raidsoft() { - if test -e /proc/mdstat && grep -q md /proc/mdstat; then - { grep -q "^AUTOCHECK=true" /etc/default/mdadm \ - && grep -q "^START_DAEMON=true" /etc/default/mdadm \ - && grep -qv "^MAILADDR ___MAIL___" /etc/mdadm/mdadm.conf; - } || failed "IS_RAIDSOFT" "missing or wrong config for mdadm" - fi -} -# Verification du LogFormat de AWStats -check_awstatslogformat() { - if is_installed apache2 awstats; then - awstatsFile="/etc/awstats/awstats.conf.local" - grep -qE '^LogFormat=1' $awstatsFile \ - || failed "IS_AWSTATSLOGFORMAT" "missing or wrong LogFormat directive in $awstatsFile" - fi -} -# Verification de la présence de la config logrotate pour Munin -check_muninlogrotate() { - { test -e /etc/logrotate.d/munin-node \ - && test -e /etc/logrotate.d/munin; - } || failed "IS_MUNINLOGROTATE" "missing lorotate file for munin" -} -# Verification de l'activation de Squid dans le cas d'un pack mail -check_squid() { - squidconffile="/etc/squid/evolinux-custom.conf" - if is_pack_web && (is_installed squid || is_installed squid3); then - host=$(hostname -i) - # shellcheck disable=SC2086 - http_port=$(grep -E "^http_port\s+[0-9]+" $squidconffile | awk '{ print $2 }') - { grep -qE "^[^#]*iptables -t nat -A OUTPUT -p tcp --dport 80 -m owner --uid-owner proxy -j ACCEPT" "/etc/default/minifirewall" \ - && grep -qE "^[^#]*iptables -t nat -A OUTPUT -p tcp --dport 80 -d $host -j ACCEPT" "/etc/default/minifirewall" \ - && grep -qE "^[^#]*iptables -t nat -A OUTPUT -p tcp --dport 80 -d 127.0.0.(1|0/8) -j ACCEPT" "/etc/default/minifirewall" \ - && grep -qE "^[^#]*iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-port.* $http_port" "/etc/default/minifirewall"; - } || grep -qE "^PROXY='?on'?" "/etc/default/minifirewall" \ - || failed "IS_SQUID" "missing squid rules in minifirewall" - fi -} -check_evomaintenance_fw() { - if [ -f "/etc/default/minifirewall" ]; then - hook_db=$(grep -E '^\s*HOOK_DB' /etc/evomaintenance.cf | tr -d ' ' | cut -d= -f2) - rulesNumber=$(grep -c "/sbin/iptables -A INPUT -p tcp --sport 5432 --dport 1024:65535 -s .* -m state --state ESTABLISHED,RELATED -j ACCEPT" "/etc/default/minifirewall") - if [ "$hook_db" = "1" ] && [ "$rulesNumber" -lt 2 ]; then - failed "IS_EVOMAINTENANCE_FW" "HOOK_DB is enabled but missing evomaintenance rules in minifirewall" - fi - fi -} -# Verification de la conf et de l'activation de mod-deflate -check_moddeflate() { - f=/etc/apache2/mods-enabled/deflate.conf - if is_installed apache2.2; then - { test -e $f && grep -q "AddOutputFilterByType DEFLATE text/html text/plain text/xml" $f \ - && grep -q "AddOutputFilterByType DEFLATE text/css" $f \ - && grep -q "AddOutputFilterByType DEFLATE application/x-javascript application/javascript" $f; - } || failed "IS_MODDEFLATE" "missing AddOutputFilterByType directive for apache mod deflate" - fi -} -# Verification de la conf log2mail -check_log2mailrunning() { - if is_pack_web && is_installed log2mail; then - pgrep log2mail >/dev/null || failed "IS_LOG2MAILRUNNING" "log2mail is not running" - fi -} -check_log2mailapache() { - conf=/etc/log2mail/config/apache - if is_pack_web && is_installed log2mail; then - grep -s -q "^file = /var/log/apache2/error.log" $conf \ - || failed "IS_LOG2MAILAPACHE" "missing log2mail directive for apache" - fi -} -check_log2mailmysql() { - if is_pack_web && is_installed log2mail; then - grep -s -q "^file = /var/log/syslog" /etc/log2mail/config/{default,mysql,mysql.conf} \ - || failed "IS_LOG2MAILMYSQL" "missing log2mail directive for mysql" - fi -} -check_log2mailsquid() { - if is_pack_web && is_installed log2mail; then - grep -s -q "^file = /var/log/squid.*/access.log" /etc/log2mail/config/* \ - || failed "IS_LOG2MAILSQUID" "missing log2mail directive for squid" - fi -} -# Verification si bind est chroote -check_bindchroot() { - if is_installed bind9; then - if netstat -utpln | grep "/named" | grep :53 | grep -qvE "(127.0.0.1|::1)"; then - default_conf=/etc/default/named - if is_debian_buster || is_debian_stretch; then - default_conf=/etc/default/bind9 - fi - if grep -q '^OPTIONS=".*-t' "${default_conf}" && grep -q '^OPTIONS=".*-u' "${default_conf}"; then - md5_original=$(md5sum /usr/sbin/named | cut -f 1 -d ' ') - md5_chrooted=$(md5sum /var/chroot-bind/usr/sbin/named | cut -f 1 -d ' ') - if [ "$md5_original" != "$md5_chrooted" ]; then - failed "IS_BINDCHROOT" "the chrooted bind binary is different than the original binary" - fi - else - failed "IS_BINDCHROOT" "bind process is not chrooted" - fi - fi - fi -} -# /etc/network/interfaces should be present, we don't manage systemd-network yet -check_network_interfaces() { - if ! test -f /etc/network/interfaces; then - IS_AUTOIF=0 - IS_INTERFACESGW=0 - failed "IS_NETWORK_INTERFACES" "systemd network configuration is not supported yet" - fi -} -# Verify if all if are in auto -check_autoif() { - interfaces=$(/sbin/ip address show up | grep "^[0-9]*:" | grep -E -v "(lo|vnet|docker|veth|tun|tap|macvtap|vrrp|lxcbr|wg)" | cut -d " " -f 2 | tr -d : | cut -d@ -f1 | tr "\n" " ") - for interface in $interfaces; do - if grep -Rq "^iface $interface" /etc/network/interfaces* && ! grep -Rq "^auto $interface" /etc/network/interfaces*; then - failed "IS_AUTOIF" "Network interface \`${interface}' is statically defined but not set to auto" - test "${VERBOSE}" = 1 || break - fi - done -} -# Network conf verification -check_interfacesgw() { - number=$(grep -Ec "^[^#]*gateway [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" /etc/network/interfaces) - test "$number" -gt 1 && failed "IS_INTERFACESGW" "there is more than 1 IPv4 gateway" - number=$(grep -Ec "^[^#]*gateway [0-9a-fA-F]+:" /etc/network/interfaces) - test "$number" -gt 1 && failed "IS_INTERFACESGW" "there is more than 1 IPv6 gateway" -} -# Verification de l’état du service networking -check_networking_service() { - if systemctl is-enabled networking.service > /dev/null; then - if ! systemctl is-active networking.service > /dev/null; then - failed "IS_NETWORKING_SERVICE" "networking.service is not active" - fi - fi -} -# Verification de la mise en place d'evobackup -check_evobackup() { - evobackup_found=$(find /etc/cron* -name '*evobackup*' | wc -l) - test "$evobackup_found" -gt 0 || failed "IS_EVOBACKUP" "missing evobackup cron" -} -# Vérification de la mise en place d'un cron de purge de la base SQLite de Fail2ban -check_fail2ban_purge() { - if is_debian_stretch || is_debian_buster; then - if is_installed fail2ban; then - test -f /etc/cron.daily/fail2ban_dbpurge || failed "IS_FAIL2BAN_PURGE" "missing script fail2ban_dbpurge cron" - fi - fi -} -# Vérification qu'il ne reste pas des jails nommées ssh non renommées en sshd -check_ssh_fail2ban_jail_renamed() { - if is_installed fail2ban && [ -f /etc/fail2ban/jail.local ]; then - if grep --quiet --fixed-strings "[ssh]" /etc/fail2ban/jail.local; then - failed "IS_SSH_FAIL2BAN_JAIL_RENAMED" "Jail ssh must be renamed sshd in fail2ban >= 0.9." - fi - fi -} -# Vérification de l'exclusion des montages (NFS) dans les sauvegardes -check_evobackup_exclude_mount() { - excludes_file=$(mktemp --tmpdir "evocheck.evobackup_exclude_mount.XXXXX") - files_to_cleanup+=("${excludes_file}") - - # shellcheck disable=SC2044 - for evobackup_file in $(find /etc/cron* -name '*evobackup*' | grep -v -E ".disabled$"); do - # if the file seems to be a backup script, with an Rsync invocation - if grep -q "^\s*rsync" "${evobackup_file}"; then - # If rsync is not limited by "one-file-system" - # then we verify that every mount is excluded - if ! grep -q -- "^\s*--one-file-system" "${evobackup_file}"; then - # old releases of evobackups don't have version - if grep -q "^VERSION=" "${evobackup_file}"; then - evobackup_version=$(sed -E -n 's/VERSION="(.*)"/\1/p' "${evobackup_file}") - # versions over 22.12 use a new syntax to exclude rsync files - if dpkg --compare-versions "$evobackup_version" ge 22.12 ; then - sed -En '/RSYNC_EXCLUDES="/,/"/ {s/(RSYNC_EXCLUDES=|")//g;p}' > "${excludes_file}" - else - grep -- "--exclude " "${evobackup_file}" | grep -E -o "\"[^\"]+\"" | tr -d '"' > "${excludes_file}" - fi - fi - not_excluded=$(findmnt --type nfs,nfs4,fuse.sshfs, -o target --noheadings | grep -v -f "${excludes_file}") - for mount in ${not_excluded}; do - failed "IS_EVOBACKUP_EXCLUDE_MOUNT" "${mount} is not excluded from ${evobackup_file} backup script" - done - fi - fi - done -} -# Verification de la presence du userlogrotate -check_userlogrotate() { - if is_pack_web; then - test -x /etc/cron.weekly/userlogrotate || failed "IS_USERLOGROTATE" "missing userlogrotate cron" - fi -} -# Verification de la syntaxe de la conf d'Apache -check_apachectl() { - if is_installed apache2; then - /usr/sbin/apache2ctl configtest 2>&1 | grep -q "^Syntax OK$" \ - || failed "IS_APACHECTL" "apache errors detected, run a configtest" - fi -} -# Check if there is regular files in Apache sites-enabled. -check_apachesymlink() { - if is_installed apache2; then - apacheFind=$(find /etc/apache2/sites-enabled ! -type l -type f -print) - nbApacheFind=$(wc -m <<< "$apacheFind") - if [[ $nbApacheFind -gt 1 ]]; then - if [[ $VERBOSE == 1 ]]; then - while read -r line; do - failed "IS_APACHESYMLINK" "Not a symlink: $line" - done <<< "$apacheFind" - else - failed "IS_APACHESYMLINK" - fi - fi - fi -} -# Check if there is real IP addresses in Allow/Deny directives (no trailing space, inline comments or so). -check_apacheipinallow() { - # Note: Replace "exit 1" by "print" in Perl code to debug it. - if is_installed apache2; then - grep -IrE "^[^#] *(Allow|Deny) from" /etc/apache2/ \ - | grep -iv "from all" \ - | grep -iv "env=" \ - | perl -ne 'exit 1 unless (/from( [\da-f:.\/]+)+$/i)' \ - || failed "IS_APACHEIPINALLOW" "bad (Allow|Deny) directives in apache" - fi -} -# Check if default Apache configuration file for munin is absent (or empty or commented). -check_muninapacheconf() { - muninconf="/etc/apache2/conf-available/munin.conf" - if is_installed apache2; then - test -e $muninconf && grep -vEq "^( |\t)*#" "$muninconf" \ - && failed "IS_MUNINAPACHECONF" "default munin configuration may be commented or disabled" - fi -} -# Check if default Apache configuration file for phpMyAdmin is absent (or empty or commented). -check_phpmyadminapacheconf() { - phpmyadminconf0="/etc/apache2/conf-available/phpmyadmin.conf" - phpmyadminconf1="/etc/apache2/conf-enabled/phpmyadmin.conf" - if is_installed apache2; then - test -e $phpmyadminconf0 && grep -vEq "^( |\t)*#" "$phpmyadminconf0" \ - && failed "IS_PHPMYADMINAPACHECONF" "default phpmyadmin configuration ($phpmyadminconf0) may be commented or disabled" - test -e $phpmyadminconf1 && grep -vEq "^( |\t)*#" "$phpmyadminconf1" \ - && failed "IS_PHPMYADMINAPACHECONF" "default phpmyadmin configuration ($phpmyadminconf1) may be commented or disabled" - fi -} -# Verification si le système doit redémarrer suite màj kernel. -check_kerneluptodate() { - if is_installed linux-image*; then - # shellcheck disable=SC2012 - kernel_installed_at=$(date -d "$(ls --full-time -lcrt /boot | tail -n1 | awk '{print $6}')" +%s) - last_reboot_at=$(($(date +%s) - $(cut -f1 -d '.' /proc/uptime))) - if [ "$kernel_installed_at" -gt "$last_reboot_at" ]; then - failed "IS_KERNELUPTODATE" "machine is running an outdated kernel, reboot advised" - fi - fi -} -# Check if the server is running for more than a year. -check_uptime() { - if is_installed linux-image*; then - limit=$(date -d "now - 2 year" +%s) - last_reboot_at=$(($(date +%s) - $(cut -f1 -d '.' /proc/uptime))) - if [ "$limit" -gt "$last_reboot_at" ]; then - failed "IS_UPTIME" "machine has an uptime of more than 2 years, reboot on new kernel advised" - fi - fi -} -# Check if munin-node running and RRD files are up to date. -check_muninrunning() { - if ! pgrep munin-node >/dev/null; then - failed "IS_MUNINRUNNING" "Munin is not running" - elif [ -d "/var/lib/munin/" ] && [ -d "/var/cache/munin/" ]; then - limit=$(date +"%s" -d "now - 10 minutes") - - if [ -n "$(find /var/lib/munin/ -name '*load-g.rrd')" ]; then - updated_at=$(stat -c "%Y" /var/lib/munin/*/*load-g.rrd |sort |tail -1) - [ "$limit" -gt "$updated_at" ] && failed "IS_MUNINRUNNING" "Munin load RRD has not been updated in the last 10 minutes" - else - failed "IS_MUNINRUNNING" "Munin is not installed properly (load RRD not found)" - fi - - if [ -n "$(find /var/cache/munin/www/ -name 'load-day.png')" ]; then - updated_at=$(stat -c "%Y" /var/cache/munin/www/*/*/load-day.png |sort |tail -1) - grep -sq "^graph_strategy cron" /etc/munin/munin.conf && [ "$limit" -gt "$updated_at" ] && failed "IS_MUNINRUNNING" "Munin load PNG has not been updated in the last 10 minutes" - else - failed "IS_MUNINRUNNING" "Munin is not installed properly (load PNG not found)" - fi - else - failed "IS_MUNINRUNNING" "Munin is not installed properly (main directories are missing)" - fi -} -# Check if files in /home/backup/ are up-to-date -check_backupuptodate() { - backup_dir="/home/backup" - if [ -d "${backup_dir}" ]; then - if [ -n "$(ls -A ${backup_dir})" ]; then - find "${backup_dir}" -maxdepth 1 -type f | while read -r file; do - limit=$(date +"%s" -d "now - 2 day") - updated_at=$(stat -c "%Y" "$file") - - if [ "$limit" -gt "$updated_at" ]; then - failed "IS_BACKUPUPTODATE" "$file has not been backed up" - test "${VERBOSE}" = 1 || break; - fi - done - else - failed "IS_BACKUPUPTODATE" "${backup_dir}/ is empty" - fi - else - failed "IS_BACKUPUPTODATE" "${backup_dir}/ is missing" - fi -} -check_etcgit() { - export GIT_DIR="/etc/.git" GIT_WORK_TREE="/etc" - git rev-parse --is-inside-work-tree > /dev/null 2>&1 \ - || failed "IS_ETCGIT" "/etc is not a git repository" -} -# Check if /etc/.git/ has read/write permissions for root only. -check_gitperms() { - GIT_DIR="/etc/.git" - if test -d $GIT_DIR; then - expected="700" - actual=$(stat -c "%a" $GIT_DIR) - [ "$expected" = "$actual" ] || failed "IS_GITPERMS" "$GIT_DIR must be $expected" - fi -} -# Check if no package has been upgraded since $limit. -check_notupgraded() { - last_upgrade=0 - upgraded=false - for log in /var/log/dpkg.log*; do - if zgrep -qsm1 upgrade "$log"; then - # There is at least one upgrade - upgraded=true - break - fi - done - if $upgraded; then - last_upgrade=$(date +%s -d "$(zgrep --no-filename --no-messages upgrade /var/log/dpkg.log* | sort -n | tail -1 | cut -f1 -d ' ')") - fi - if grep -qs '^mailto="listupgrade-todo@' /etc/evolinux/listupgrade.cnf \ - || grep -qs -E '^[[:digit:]]+[[:space:]]+[[:digit:]]+[[:space:]]+[^\*]' /etc/cron.d/listupgrade; then - # Manual upgrade process - limit=$(date +%s -d "now - 180 days") - else - # Regular process - limit=$(date +%s -d "now - 90 days") - fi - install_date=0 - if [ -d /var/log/installer ]; then - install_date=$(stat -c %Z /var/log/installer) - fi - # Check install_date if the system never received an upgrade - if [ "$last_upgrade" -eq 0 ]; then - [ "$install_date" -lt "$limit" ] && failed "IS_NOTUPGRADED" "The system has never been updated" - else - [ "$last_upgrade" -lt "$limit" ] && failed "IS_NOTUPGRADED" "The system hasn't been updated for too long" - fi -} -# Check if reserved blocks for root is at least 5% on every mounted partitions. -check_tune2fs_m5() { - min=5 - parts=$(grep -E "ext(3|4)" /proc/mounts | cut -d ' ' -f1 | tr -s '\n' ' ') - FINDMNT_BIN=$(command -v findmnt) - for part in $parts; do - blockCount=$(dumpe2fs -h "$part" 2>/dev/null | grep -e "Block count:" | grep -Eo "[0-9]+") - # If buggy partition, skip it. - if [ -z "$blockCount" ]; then - continue - fi - reservedBlockCount=$(dumpe2fs -h "$part" 2>/dev/null | grep -e "Reserved block count:" | grep -Eo "[0-9]+") - # Use awk to have a rounded percentage - # python is slow, bash is unable and bc rounds weirdly - percentage=$(awk "BEGIN { pc=100*${reservedBlockCount}/${blockCount}; i=int(pc); print (pc-i<0.5)?i:i+1 }") - - if [ "$percentage" -lt "${min}" ]; then - if [ -x "${FINDMNT_BIN}" ]; then - mount=$(${FINDMNT_BIN} --noheadings --first-only --output TARGET "${part}") - else - mount="unknown mount point" - fi - failed "IS_TUNE2FS_M5" "Partition ${part} (${mount}) has less than ${min}% reserved blocks (${percentage}%)" - fi - done -} -check_evolinuxsudogroup() { - if grep -q "^evolinux-sudo:" /etc/group; then - if [ -f /etc/sudoers.d/evolinux ]; then - grep -qE '^%evolinux-sudo +ALL ?= ?\(ALL:ALL\) ALL' /etc/sudoers.d/evolinux \ - || failed "IS_EVOLINUXSUDOGROUP" "missing evolinux-sudo directive in sudoers file" - fi - fi -} -check_userinadmgroup() { - users=$(grep "^evolinux-sudo:" /etc/group | awk -F: '{print $4}' | tr ',' ' ') - for user in $users; do - if ! groups "$user" | grep -q adm; then - failed "IS_USERINADMGROUP" "User $user doesn't belong to \`adm' group" - test "${VERBOSE}" = 1 || break - fi - done -} -check_apache2evolinuxconf() { - if is_installed apache2; then - { test -L /etc/apache2/conf-enabled/z-evolinux-defaults.conf \ - && test -L /etc/apache2/conf-enabled/zzz-evolinux-custom.conf \ - && test -f /etc/apache2/ipaddr_whitelist.conf; - } || failed "IS_APACHE2EVOLINUXCONF" "missing custom evolinux apache config" - fi -} -check_backportsconf() { - grep -qsE "^[^#].*backports" /etc/apt/sources.list \ - && failed "IS_BACKPORTSCONF" "backports can't be in main sources list" - if grep -qsE "^[^#].*backports" /etc/apt/sources.list.d/*.list; then - grep -qsE "^[^#].*backports" /etc/apt/preferences.d/* \ - || failed "IS_BACKPORTSCONF" "backports must have preferences" - fi -} -check_bind9munin() { - if is_installed bind9; then - { test -L /etc/munin/plugins/bind9 \ - && test -e /etc/munin/plugin-conf.d/bind9; - } || failed "IS_BIND9MUNIN" "missing bind plugin for munin" - fi -} -check_bind9logrotate() { - if is_installed bind9; then - test -e /etc/logrotate.d/bind9 || failed "IS_BIND9LOGROTATE" "missing bind logrotate file" - fi -} -check_broadcomfirmware() { - LSPCI_BIN=$(command -v lspci) - if [ -x "${LSPCI_BIN}" ]; then - if ${LSPCI_BIN} | grep -q 'NetXtreme II'; then - { is_installed firmware-bnx2 \ - && grep -q "^deb http://mirror.evolix.org/debian.* non-free" /etc/apt/sources.list; - } || failed "IS_BROADCOMFIRMWARE" "missing non-free repository" - fi - else - failed "IS_BROADCOMFIRMWARE" "lspci not found in ${PATH}" - fi -} -check_hardwareraidtool() { - LSPCI_BIN=$(command -v lspci) - if [ -x "${LSPCI_BIN}" ]; then - if ${LSPCI_BIN} | grep -q 'MegaRAID'; then - # shellcheck disable=SC2015 - is_installed megacli && { is_installed megaclisas-status || is_installed megaraidsas-status; } \ - || failed "IS_HARDWARERAIDTOOL" "Mega tools not found" - fi - if ${LSPCI_BIN} | grep -q 'Hewlett-Packard Company Smart Array'; then - is_installed cciss-vol-status || failed "IS_HARDWARERAIDTOOL" "cciss-vol-status not installed" - fi - else - failed "IS_HARDWARERAIDTOOL" "lspci not found in ${PATH}" - fi -} -check_log2mailsystemdunit() { - systemctl -q is-active log2mail.service \ - || failed "IS_LOG2MAILSYSTEMDUNIT" "log2mail unit not running" - test -f /etc/systemd/system/log2mail.service \ - || failed "IS_LOG2MAILSYSTEMDUNIT" "missing log2mail unit file" - test -f /etc/init.d/log2mail \ - && failed "IS_LOG2MAILSYSTEMDUNIT" "/etc/init.d/log2mail may be deleted (use systemd unit)" -} -check_listupgrade() { - test -f /etc/cron.d/listupgrade \ - || failed "IS_LISTUPGRADE" "missing listupgrade cron" - test -x /usr/share/scripts/listupgrade.sh \ - || failed "IS_LISTUPGRADE" "missing listupgrade script or not executable" -} -check_mariadbevolinuxconf() { - if is_installed mariadb-server; then - { test -f /etc/mysql/mariadb.conf.d/z-evolinux-defaults.cnf \ - && test -f /etc/mysql/mariadb.conf.d/zzz-evolinux-custom.cnf; - } || failed "IS_MARIADBEVOLINUXCONF" "missing mariadb custom config" - fi -} -check_sql_backup() { - if (is_installed "mysql-server" || is_installed "mariadb-server"); then - # You could change the default path in /etc/evocheck.cf - SQL_BACKUP_PATH=${SQL_BACKUP_PATH:-"/home/backup/mysql.bak.gz"} - for backup_path in ${SQL_BACKUP_PATH}; do - if [ ! -f "${backup_path}" ]; then - failed "IS_SQL_BACKUP" "MySQL dump is missing (${backup_path})" - test "${VERBOSE}" = 1 || break - fi - done - fi -} -check_postgres_backup() { - if is_installed "postgresql-9*" || is_installed "postgresql-1*"; then - # If you use something like barman, you should disable this check - # You could change the default path in /etc/evocheck.cf - POSTGRES_BACKUP_PATH=${POSTGRES_BACKUP_PATH:-"/home/backup/pg.dump.bak*"} - for backup_path in ${POSTGRES_BACKUP_PATH}; do - if [ ! -f "${backup_path}" ]; then - failed "IS_POSTGRES_BACKUP" "PostgreSQL dump is missing (${backup_path})" - test "${VERBOSE}" = 1 || break - fi - done - fi -} -check_mongo_backup() { - if is_installed "mongodb-org-server"; then - # You could change the default path in /etc/evocheck.cf - MONGO_BACKUP_PATH=${MONGO_BACKUP_PATH:-"/home/backup/mongodump"} - if [ -d "$MONGO_BACKUP_PATH" ]; then - for file in "${MONGO_BACKUP_PATH}"/*/*.{json,bson}*; do - # Skip indexes file. - if ! [[ "$file" =~ indexes ]]; then - limit=$(date +"%s" -d "now - 2 day") - updated_at=$(stat -c "%Y" "$file") - if [ -f "$file" ] && [ "$limit" -gt "$updated_at" ]; then - failed "IS_MONGO_BACKUP" "MongoDB hasn't been dumped for more than 2 days" - break - fi - fi - done - else - failed "IS_MONGO_BACKUP" "MongoDB dump directory is missing (${MONGO_BACKUP_PATH})" - fi - fi -} -check_ldap_backup() { - if is_installed slapd; then - # You could change the default path in /etc/evocheck.cf - LDAP_BACKUP_PATH=${LDAP_BACKUP_PATH:-"/home/backup/ldap.bak"} - test -f "$LDAP_BACKUP_PATH" || failed "IS_LDAP_BACKUP" "LDAP dump is missing (${LDAP_BACKUP_PATH})" - fi -} -check_redis_backup() { - if is_installed redis-server; then - # You could change the default path in /etc/evocheck.cf - # REDIS_BACKUP_PATH may contain space-separated paths, for example: - # REDIS_BACKUP_PATH='/home/backup/redis-instance1/dump.rdb /home/backup/redis-instance2/dump.rdb' - # Warning : this script doesn't handle spaces in file paths ! - - REDIS_BACKUP_PATH="${REDIS_BACKUP_PATH:-$(find /home/backup/ -iname "*.rdb*")}" - - # Check number of dumps - n_instances=$(pgrep 'redis-server' | wc -l) - n_dumps=$(echo $REDIS_BACKUP_PATH | wc -w) - if [ ${n_dumps} -lt ${n_instances} ]; then - failed "IS_REDIS_BACKUP" "Missing Redis dump : ${n_instances} instance(s) found versus ${n_dumps} dump(s) found." - fi - - # Check last dump date - age_threshold=$(date +"%s" -d "now - 2 days") - for dump in ${REDIS_BACKUP_PATH}; do - last_update=$(stat -c "%Z" $dump) - if [ "${last_update}" -lt "${age_threshold}" ]; then - failed "IS_REDIS_BACKUP" "Redis dump ${dump} is older than 2 days." - fi - done - fi -} -check_elastic_backup() { - if is_installed elasticsearch; then - # You could change the default path in /etc/evocheck.cf - ELASTIC_BACKUP_PATH=${ELASTIC_BACKUP_PATH:-"/home/backup-elasticsearch"} - test -d "$ELASTIC_BACKUP_PATH" || failed "IS_ELASTIC_BACKUP" "Elastic snapshot is missing (${ELASTIC_BACKUP_PATH})" - fi -} -check_mariadbsystemdunit() { - # TODO: check if it is still needed for bullseye - if is_debian_stretch || is_debian_buster; then - if is_installed mariadb-server; then - if systemctl -q is-active mariadb.service; then - test -f /etc/systemd/system/mariadb.service.d/evolinux.conf \ - || failed "IS_MARIADBSYSTEMDUNIT" "missing systemd override for mariadb unit" - fi - fi - fi -} -check_mysqlmunin() { - if is_installed mariadb-server; then - for file in mysql_bytes mysql_queries mysql_slowqueries \ - mysql_threads mysql_connections mysql_files_tables \ - mysql_innodb_bpool mysql_innodb_bpool_act mysql_innodb_io \ - mysql_innodb_log mysql_innodb_rows mysql_innodb_semaphores \ - mysql_myisam_indexes mysql_qcache mysql_qcache_mem \ - mysql_sorts mysql_tmp_tables; do - - if [[ ! -L /etc/munin/plugins/$file ]]; then - failed "IS_MYSQLMUNIN" "missing munin plugin '$file'" - test "${VERBOSE}" = 1 || break - fi - done - munin-run mysql_commands 2> /dev/null > /dev/null - test $? -eq 0 || failed "IS_MYSQLMUNIN" "Munin plugin mysql_commands returned an error" - fi -} -check_mysqlnrpe() { - if is_installed mariadb-server; then - nagios_file=~nagios/.my.cnf - if ! test -f ${nagios_file}; then - failed "IS_MYSQLNRPE" "${nagios_file} is missing" - elif [ "$(stat -c %U ${nagios_file})" != "nagios" ] \ - || [ "$(stat -c %a ${nagios_file})" != "600" ]; then - failed "IS_MYSQLNRPE" "${nagios_file} has wrong permissions" - else - grep -q -F "command[check_mysql]=/usr/lib/nagios/plugins/check_mysql" /etc/nagios/nrpe.d/evolix.cfg \ - || failed "IS_MYSQLNRPE" "check_mysql is missing" - fi - fi -} -check_phpevolinuxconf() { - is_debian_stretch && phpVersion="7.0" - is_debian_buster && phpVersion="7.3" - is_debian_bullseye && phpVersion="7.4" - if is_installed php; then - { test -f "/etc/php/${phpVersion}/cli/conf.d/z-evolinux-defaults.ini" \ - && test -f "/etc/php/${phpVersion}/cli/conf.d/zzz-evolinux-custom.ini" - } || failed "IS_PHPEVOLINUXCONF" "missing php evolinux config" - fi -} -check_squidlogrotate() { - if is_installed squid; then - grep -q -e monthly -e daily /etc/logrotate.d/squid \ - || failed "IS_SQUIDLOGROTATE" "missing squid logrotate file" - fi -} -check_squidevolinuxconf() { - if is_installed squid; then - { grep -qs "^CONFIG=/etc/squid/evolinux-defaults.conf$" /etc/default/squid \ - && test -f /etc/squid/evolinux-defaults.conf \ - && test -f /etc/squid/evolinux-whitelist-defaults.conf \ - && test -f /etc/squid/evolinux-whitelist-custom.conf \ - && test -f /etc/squid/evolinux-acl.conf \ - && test -f /etc/squid/evolinux-httpaccess.conf \ - && test -f /etc/squid/evolinux-custom.conf; - } || failed "IS_SQUIDEVOLINUXCONF" "missing squid evolinux config" - fi -} -check_duplicate_fs_label() { - # Do it only if thereis blkid binary - BLKID_BIN=$(command -v blkid) - if [ -n "$BLKID_BIN" ]; then - tmpFile=$(mktemp --tmpdir "evocheck.duplicate_fs_label.XXXXX") - files_to_cleanup+=("${tmpFile}") - - parts=$($BLKID_BIN -c /dev/null | grep -ve raid_member -e EFI_SYSPART | grep -Eo ' LABEL=".*"' | cut -d'"' -f2) - for part in $parts; do - echo "$part" >> "$tmpFile" - done - tmpOutput=$(sort < "$tmpFile" | uniq -d) - # If there is no duplicate, uniq will have no output - # So, if $tmpOutput is not null, there is a duplicate - if [ -n "$tmpOutput" ]; then - # shellcheck disable=SC2086 - labels=$(echo -n $tmpOutput | tr '\n' ' ') - failed "IS_DUPLICATE_FS_LABEL" "Duplicate labels: $labels" - fi - else - failed "IS_DUPLICATE_FS_LABEL" "blkid not found in ${PATH}" - fi -} -check_evolix_user() { - grep -q -E "^evolix:" /etc/passwd \ - && failed "IS_EVOLIX_USER" "evolix user should be deleted, used only for install" -} -check_evoacme_cron() { - if [ -f "/usr/local/sbin/evoacme" ]; then - # Old cron file, should be deleted - test -f /etc/cron.daily/certbot && failed "IS_EVOACME_CRON" "certbot cron is incompatible with evoacme" - # evoacme cron file should be present - test -f /etc/cron.daily/evoacme || failed "IS_EVOACME_CRON" "evoacme cron is missing" - fi -} -check_evoacme_livelinks() { - EVOACME_BIN=$(command -v evoacme) - if [ -x "$EVOACME_BIN" ]; then - # Sometimes evoacme is installed but no certificates has been generated - numberOfLinks=$(find /etc/letsencrypt/ -type l | wc -l) - if [ "$numberOfLinks" -gt 0 ]; then - for live in /etc/letsencrypt/*/live; do - actualLink=$(readlink -f "$live") - actualVersion=$(basename "$actualLink") - - certDir=$(dirname "$live") - certName=$(basename "$certDir") - # shellcheck disable=SC2012 - lastCertDir=$(ls -ds "${certDir}"/[0-9]* | tail -1) - lastVersion=$(basename "$lastCertDir") - - if [[ "$lastVersion" != "$actualVersion" ]]; then - failed "IS_EVOACME_LIVELINKS" "Certificate \`$certName' hasn't been updated" - test "${VERBOSE}" = 1 || break - fi - done - fi - fi -} -check_apache_confenabled() { - # Starting from Jessie and Apache 2.4, /etc/apache2/conf.d/ - # must be replaced by conf-available/ and config files symlinked - # to conf-enabled/ - if [ -f /etc/apache2/apache2.conf ]; then - test -d /etc/apache2/conf.d/ \ - && failed "IS_APACHE_CONFENABLED" "apache's conf.d directory must not exists" - grep -q 'Include conf.d' /etc/apache2/apache2.conf \ - && failed "IS_APACHE_CONFENABLED" "apache2.conf must not Include conf.d" - fi -} -check_meltdown_spectre() { - # /sys/devices/system/cpu/vulnerabilities/ - for vuln in meltdown spectre_v1 spectre_v2; do - test -f "/sys/devices/system/cpu/vulnerabilities/$vuln" \ - || failed "IS_MELTDOWN_SPECTRE" "vulnerable to $vuln" - test "${VERBOSE}" = 1 || break - done -} -check_old_home_dir() { - homeDir=${homeDir:-/home} - for dir in "$homeDir"/*; do - statResult=$(stat -c "%n has owner %u resolved as %U" "$dir" \ - | grep -Eve '.bak' -e '\.[0-9]{2}-[0-9]{2}-[0-9]{4}' \ - | grep "UNKNOWN") - # There is at least one dir matching - if [[ -n "$statResult" ]]; then - failed "IS_OLD_HOME_DIR" "$statResult" - test "${VERBOSE}" = 1 || break - fi - done -} -check_tmp_1777() { - actual=$(stat --format "%a" /tmp) - expected="1777" - test "$expected" = "$actual" || failed "IS_TMP_1777" "/tmp must be $expected" -} -check_root_0700() { - actual=$(stat --format "%a" /root) - expected="700" - test "$expected" = "$actual" || failed "IS_ROOT_0700" "/root must be $expected" -} -check_usrsharescripts() { - actual=$(stat --format "%a" /usr/share/scripts) - expected="700" - test "$expected" = "$actual" || failed "IS_USRSHARESCRIPTS" "/usr/share/scripts must be $expected" -} -check_sshpermitrootno() { - sshd_args="-C addr=,user=,host=,laddr=,lport=0" - if is_debian_stretch; then - # Noop, we'll use the default $sshd_args - : - elif is_debian_buster; then - sshd_args="${sshd_args},rdomain=" - else - # NOTE: From Debian Bullseye 11 onward, with OpenSSH 8.1, the argument - # -T doesn't require the additional -C. - sshd_args= - fi - # shellcheck disable=SC2086 - if ! (sshd -T ${sshd_args} 2> /dev/null | grep -qi 'permitrootlogin no'); then - failed "IS_SSHPERMITROOTNO" "PermitRoot should be set to no" - fi -} -check_evomaintenanceusers() { - users=$(getent group evolinux-sudo | cut -d':' -f4 | tr ',' ' ') - for user in $users; do - user_home=$(getent passwd "$user" | cut -d: -f6) - if [ -n "$user_home" ] && [ -d "$user_home" ]; then - if ! grep -qs "^trap.*sudo.*evomaintenance.sh" "${user_home}"/.*profile; then - failed "IS_EVOMAINTENANCEUSERS" "${user} doesn't have an evomaintenance trap" - test "${VERBOSE}" = 1 || break - fi - fi - done -} -check_evomaintenanceconf() { - f=/etc/evomaintenance.cf - if [ -e "$f" ]; then - perms=$(stat -c "%a" $f) - test "$perms" = "600" || failed "IS_EVOMAINTENANCECONF" "Wrong permissions on \`$f' ($perms instead of 600)" - - { grep "^export PGPASSWORD" $f | grep -qv "your-passwd" \ - && grep "^PGDB" $f | grep -qv "your-db" \ - && grep "^PGTABLE" $f | grep -qv "your-table" \ - && grep "^PGHOST" $f | grep -qv "your-pg-host" \ - && grep "^FROM" $f | grep -qv "jdoe@example.com" \ - && grep "^FULLFROM" $f | grep -qv "John Doe " \ - && grep "^URGENCYFROM" $f | grep -qv "mama.doe@example.com" \ - && grep "^URGENCYTEL" $f | grep -qv "06.00.00.00.00" \ - && grep "^REALM" $f | grep -qv "example.com" - } || failed "IS_EVOMAINTENANCECONF" "evomaintenance is not correctly configured" - else - failed "IS_EVOMAINTENANCECONF" "Configuration file \`$f' is missing" - fi -} -check_privatekeyworldreadable() { - # a simple globbing fails if directory is empty - if [ -n "$(ls -A /etc/ssl/private/)" ]; then - for f in /etc/ssl/private/*; do - perms=$(stat -L -c "%a" "$f") - if [ "${perms: -1}" != 0 ]; then - failed "IS_PRIVKEYWOLRDREADABLE" "$f is world-readable" - test "${VERBOSE}" = 1 || break - fi - done - fi -} -check_evobackup_incs() { - if is_installed bkctld; then - bkctld_cron_file=${bkctld_cron_file:-/etc/cron.d/bkctld} - if [ -f "${bkctld_cron_file}" ]; then - root_crontab=$(grep -v "^#" "${bkctld_cron_file}") - echo "${root_crontab}" | grep -q "bkctld inc" || failed "IS_EVOBACKUP_INCS" "'bkctld inc' is missing in ${bkctld_cron_file}" - echo "${root_crontab}" | grep -qE "(check-incs.sh|bkctld check-incs)" || failed "IS_EVOBACKUP_INCS" "'check-incs.sh' is missing in ${bkctld_cron_file}" - else - failed "IS_EVOBACKUP_INCS" "Crontab \`${bkctld_cron_file}' is missing" - fi - fi -} - -check_osprober() { - if is_installed os-prober qemu-kvm; then - failed "IS_OSPROBER" \ - "Removal of os-prober package is recommended as it can cause serious issue on KVM server" - fi -} - -check_apt_valid_until() { - aptvalidFile="/etc/apt/apt.conf.d/99no-check-valid-until" - aptvalidText="Acquire::Check-Valid-Until no;" - if grep -qs "archive.debian.org" /etc/apt/sources.list /etc/apt/sources.list.d/*; then - if ! grep -qs "$aptvalidText" /etc/apt/apt.conf.d/*; then - failed "IS_APT_VALID_UNTIL" \ - "As you use archive.mirror.org you need ${aptvalidFile}: ${aptvalidText}" - fi - fi -} - -check_chrooted_binary_uptodate() { - # list of processes to check - process_list="sshd" - for process_name in ${process_list}; do - # what is the binary path? - original_bin=$(command -v "${process_name}") - for pid in $(pgrep "${process_name}"); do - process_bin=$(realpath "/proc/${pid}/exe") - # Is the process chrooted? - real_root=$(realpath "/proc/${pid}/root") - if [ "${real_root}" != "/" ]; then - chrooted_md5=$(md5sum "${process_bin}" | cut -f 1 -d ' ') - original_md5=$(md5sum "${original_bin}" | cut -f 1 -d ' ') - # compare md5 checksums - if [ "$original_md5" != "$chrooted_md5" ]; then - failed "IS_CHROOTED_BINARY_UPTODATE" "${process_bin} (${pid}) is different than ${original_bin}." - test "${VERBOSE}" = 1 || break - fi - fi - done - done -} -check_nginx_letsencrypt_uptodate() { - if [ -d /etc/nginx ]; then - snippets=$(find /etc/nginx -type f -name "letsencrypt.conf") - if [ -n "${snippets}" ]; then - while read -r snippet; do - if grep -qE "^\s*alias\s+/.+/\.well-known/acme-challenge" "${snippet}"; then - failed "IS_NGINX_LETSENCRYPT_UPTODATE" "Nginx snippet ${snippet} is not compatible with Nginx on Debian 9+." - fi - done <<< "${snippets}" - fi - fi -} -check_lxc_container_resolv_conf() { - if is_installed lxc; then - container_list=$(lxc-ls) - current_resolvers=$(grep nameserver /etc/resolv.conf | sed 's/nameserver//g' ) - - for container in $container_list; do - if [ -f "/var/lib/lxc/${container}/rootfs/etc/resolv.conf" ]; then - - while read -r resolver; do - if ! grep -qE "^nameserver\s+${resolver}" "/var/lib/lxc/${container}/rootfs/etc/resolv.conf"; then - failed "IS_LXC_CONTAINER_RESOLV_CONF" "resolv.conf miss-match beween host and container : missing nameserver ${resolver} in container ${container} resolv.conf" - fi - done <<< "${current_resolvers}" - - else - failed "IS_LXC_CONTAINER_RESOLV_CONF" "resolv.conf missing in container ${container}" - fi - done - fi -} -# Check that there are containers if lxc is installed. -check_no_lxc_container() { - if is_installed lxc; then - containers_count=$(lxc-ls | wc -l) - if [ "$containers_count" -eq 0 ]; then - failed "IS_NO_LXC_CONTAINER" "LXC is installed but have no container. Consider removing it." - fi - fi -} -# Check that in LXC containers, phpXX-fpm services have UMask set to 0007. -check_lxc_php_fpm_service_umask_set() { - if is_installed lxc; then - php_containers_list=$(lxc-ls --filter php) - missing_umask="" - for container in $php_containers_list; do - # Translate container name in service name - if [ "$container" = "php56" ]; then - service="php5-fpm" - else - service="${container:0:4}.${container:4}-fpm" - fi - umask=$(lxc-attach --name "${container}" -- systemctl show -p UMask "$service" | cut -d "=" -f2) - if [ "$umask" != "0007" ]; then - missing_umask="${missing_umask} ${container}" - fi - done - if [ -n "${missing_umask}" ]; then - failed "IS_LXC_PHP_FPM_SERVICE_UMASK_SET" "UMask is not set to 0007 in PHP-FPM services of theses containers : ${missing_umask}." - fi - fi -} - -download_versions() { - local file - file=${1:-} - - ## The file is supposed to list programs : each on a line, then its latest version number - ## Examples: - # evoacme 21.06 - # evomaintenance 0.6.4 - - versions_url="https://upgrades.evolix.org/versions-${DEBIAN_RELEASE}" - - # fetch timeout, in seconds - timeout=10 - - if command -v curl > /dev/null; then - curl --max-time ${timeout} --fail --silent --output "${versions_file}" "${versions_url}" - elif command -v wget > /dev/null; then - wget --timeout=${timeout} --quiet "${versions_url}" -O "${versions_file}" - elif command -v GET; then - GET -t ${timeout}s "${versions_url}" > "${versions_file}" - else - failed "IS_CHECK_VERSIONS" "failed to find curl, wget or GET" - fi - test "$?" -eq 0 || failed "IS_CHECK_VERSIONS" "failed to download ${versions_url} to ${versions_file}" -} -get_command() { - local program - program=${1:-} - - case "${program}" in - ## Special cases where the program name is different than the command name - evocheck) echo "${0}" ;; - evomaintenance) command -v "evomaintenance.sh" ;; - listupgrade) command -v "evolistupgrade.sh" ;; - old-kernel-autoremoval) command -v "old-kernel-autoremoval.sh" ;; - mysql-queries-killer) command -v "mysql-queries-killer.sh" ;; - minifirewall) echo "/etc/init.d/minifirewall" ;; - - ## General case, where the program name is the same as the command name - *) command -v "${program}" ;; - esac -} -get_version() { - local program - local command - program=${1:-} - command=${2:-} - - case "${program}" in - ## Special case if `command --version => 'command` is not the standard way to get the version - # my_command) - # /path/to/my_command --get-version - # ;; - - add-vm) - grep '^VERSION=' "${command}" | head -1 | cut -d '=' -f 2 - ;; - minifirewall) - ${command} version | head -1 | cut -d ' ' -f 3 - ;; - ## Let's try the --version flag before falling back to grep for the constant - kvmstats) - if ${command} --version > /dev/null 2> /dev/null; then - ${command} --version 2> /dev/null | head -1 | cut -d ' ' -f 3 - else - grep '^VERSION=' "${command}" | head -1 | cut -d '=' -f 2 - fi - ;; - - ## General case to get the version - *) ${command} --version 2> /dev/null | head -1 | cut -d ' ' -f 3 ;; - esac -} -check_version() { - local program - local expected_version - program=${1:-} - expected_version=${2:-} - - command=$(get_command "${program}") - if [ -n "${command}" ]; then - # shellcheck disable=SC2086 - actual_version=$(get_version "${program}" "${command}") - # printf "program:%s expected:%s actual:%s\n" "${program}" "${expected_version}" "${actual_version}" - if [ -z "${actual_version}" ]; then - failed "IS_CHECK_VERSIONS" "failed to lookup actual version of ${program}" - elif dpkg --compare-versions "${actual_version}" lt "${expected_version}"; then - failed "IS_CHECK_VERSIONS" "${program} version ${actual_version} is older than expected version ${expected_version}" - elif dpkg --compare-versions "${actual_version}" gt "${expected_version}"; then - failed "IS_CHECK_VERSIONS" "${program} version ${actual_version} is newer than expected version ${expected_version}, you should update your index." - else - : # Version check OK - fi - fi -} -add_to_path() { - local new_path - new_path=${1:-} - - echo "$PATH" | grep -qF "${new_path}" || export PATH="${PATH}:${new_path}" -} -check_versions() { - versions_file=$(mktemp --tmpdir "evocheck.versions.XXXXX") - files_to_cleanup+=("${versions_file}") - - download_versions "${versions_file}" - add_to_path "/usr/share/scripts" - - grep -v '^ *#' < "${versions_file}" | while IFS= read -r line; do - local program - local version - program=$(echo "${line}" | cut -d ' ' -f 1) - version=$(echo "${line}" | cut -d ' ' -f 2) - - if [ -n "${program}" ]; then - if [ -n "${version}" ]; then - check_version "${program}" "${version}" - else - failed "IS_CHECK_VERSIONS" "failed to lookup expected version for ${program}" - fi - fi - done -} - -main() { - # Default return code : 0 = no error - RC=0 - # Detect operating system name, version and release - detect_os - - main_output_file=$(mktemp --tmpdir "evocheck.main.XXXXX") - files_to_cleanup+=("${main_output_file}") - - test "${IS_TMP_1777:=1}" = 1 && check_tmp_1777 - test "${IS_ROOT_0700:=1}" = 1 && check_root_0700 - test "${IS_USRSHARESCRIPTS:=1}" = 1 && check_usrsharescripts - test "${IS_SSHPERMITROOTNO:=1}" = 1 && check_sshpermitrootno - test "${IS_EVOMAINTENANCEUSERS:=1}" = 1 && check_evomaintenanceusers - # Verification de la configuration d'evomaintenance - test "${IS_EVOMAINTENANCECONF:=1}" = 1 && check_evomaintenanceconf - test "${IS_PRIVKEYWOLRDREADABLE:=1}" = 1 && check_privatekeyworldreadable - - test "${IS_LSBRELEASE:=1}" = 1 && check_lsbrelease - test "${IS_DPKGWARNING:=1}" = 1 && check_dpkgwarning - test "${IS_POSTFIX_MYDESTINATION:=1}" = 1 && check_postfix_mydestination - test "${IS_NRPEPOSTFIX:=1}" = 1 && check_nrpepostfix - test "${IS_CUSTOMSUDOERS:=1}" = 1 && check_customsudoers - test "${IS_VARTMPFS:=1}" = 1 && check_vartmpfs - test "${IS_SERVEURBASE:=1}" = 1 && check_serveurbase - test "${IS_LOGROTATECONF:=1}" = 1 && check_logrotateconf - test "${IS_SYSLOGCONF:=1}" = 1 && check_syslogconf - test "${IS_DEBIANSECURITY:=1}" = 1 && check_debiansecurity - test "${IS_OLDPUB:=1}" = 1 && check_oldpub - test "${IS_NEWPUB:=1}" = 1 && check_newpub - test "${IS_APTITUDE:=1}" = 1 && check_aptitude - test "${IS_APTGETBAK:=1}" = 1 && check_aptgetbak - test "${IS_USRRO:=1}" = 1 && check_usrro - test "${IS_TMPNOEXEC:=1}" = 1 && check_tmpnoexec - test "${IS_MOUNT_FSTAB:=1}" = 1 && check_mountfstab - test "${IS_LISTCHANGESCONF:=1}" = 1 && check_listchangesconf - test "${IS_CUSTOMCRONTAB:=1}" = 1 && check_customcrontab - test "${IS_SSHALLOWUSERS:=1}" = 1 && check_sshallowusers - test "${IS_DISKPERF:=0}" = 1 && check_diskperf - test "${IS_TMOUTPROFILE:=1}" = 1 && check_tmoutprofile - test "${IS_ALERT5BOOT:=1}" = 1 && check_alert5boot - test "${IS_ALERT5MINIFW:=1}" = 1 && check_alert5minifw - test "${IS_ALERT5MINIFW:=1}" = 1 && test "${IS_MINIFW:=1}" = 1 && check_minifw - test "${IS_NRPEPERMS:=1}" = 1 && check_nrpeperms - test "${IS_MINIFWPERMS:=1}" = 1 && check_minifwperms - # Enable when minifirewall is released - test "${IS_MINIFWINCLUDES:=0}" = 1 && check_minifw_includes - test "${IS_NRPEDISKS:=0}" = 1 && check_nrpedisks - test "${IS_NRPEPID:=1}" = 1 && check_nrpepid - test "${IS_GRSECPROCS:=1}" = 1 && check_grsecprocs - test "${IS_APACHEMUNIN:=1}" = 1 && check_apachemunin - test "${IS_MYSQLUTILS:=1}" = 1 && check_mysqlutils - test "${IS_RAIDSOFT:=1}" = 1 && check_raidsoft - test "${IS_AWSTATSLOGFORMAT:=1}" = 1 && check_awstatslogformat - test "${IS_MUNINLOGROTATE:=1}" = 1 && check_muninlogrotate - test "${IS_SQUID:=1}" = 1 && check_squid - test "${IS_EVOMAINTENANCE_FW:=1}" = 1 && check_evomaintenance_fw - test "${IS_MODDEFLATE:=1}" = 1 && check_moddeflate - test "${IS_LOG2MAILRUNNING:=1}" = 1 && check_log2mailrunning - test "${IS_LOG2MAILAPACHE:=1}" = 1 && check_log2mailapache - test "${IS_LOG2MAILMYSQL:=1}" = 1 && check_log2mailmysql - test "${IS_LOG2MAILSQUID:=1}" = 1 && check_log2mailsquid - test "${IS_BINDCHROOT:=1}" = 1 && check_bindchroot - test "${IS_NETWORK_INTERFACES:=1}" = 1 && check_network_interfaces - test "${IS_AUTOIF:=1}" = 1 && check_autoif - test "${IS_INTERFACESGW:=1}" = 1 && check_interfacesgw - test "${IS_NETWORKING_SERVICE:=1}" = 1 && check_networking_service - test "${IS_EVOBACKUP:=1}" = 1 && check_evobackup - test "${IS_PURGE_FAIL2BAN:=1}" = 1 && check_fail2ban_purge - test "${IS_SSH_FAIL2BAN_JAIL_RENAMED:=1}" = 1 && check_ssh_fail2ban_jail_renamed - test "${IS_EVOBACKUP_EXCLUDE_MOUNT:=1}" = 1 && check_evobackup_exclude_mount - test "${IS_USERLOGROTATE:=1}" = 1 && check_userlogrotate - test "${IS_APACHECTL:=1}" = 1 && check_apachectl - test "${IS_APACHESYMLINK:=1}" = 1 && check_apachesymlink - test "${IS_APACHEIPINALLOW:=1}" = 1 && check_apacheipinallow - test "${IS_MUNINAPACHECONF:=1}" = 1 && check_muninapacheconf - test "${IS_PHPMYADMINAPACHECONF:=1}" = 1 && check_phpmyadminapacheconf - test "${IS_KERNELUPTODATE:=1}" = 1 && check_kerneluptodate - test "${IS_UPTIME:=1}" = 1 && check_uptime - test "${IS_MUNINRUNNING:=1}" = 1 && check_muninrunning - test "${IS_BACKUPUPTODATE:=1}" = 1 && check_backupuptodate - test "${IS_ETCGIT:=1}" = 1 && check_etcgit - test "${IS_GITPERMS:=1}" = 1 && check_gitperms - test "${IS_NOTUPGRADED:=1}" = 1 && check_notupgraded - test "${IS_TUNE2FS_M5:=1}" = 1 && check_tune2fs_m5 - test "${IS_EVOLINUXSUDOGROUP:=1}" = 1 && check_evolinuxsudogroup - test "${IS_USERINADMGROUP:=1}" = 1 && check_userinadmgroup - test "${IS_APACHE2EVOLINUXCONF:=1}" = 1 && check_apache2evolinuxconf - test "${IS_BACKPORTSCONF:=1}" = 1 && check_backportsconf - test "${IS_BIND9MUNIN:=1}" = 1 && check_bind9munin - test "${IS_BIND9LOGROTATE:=1}" = 1 && check_bind9logrotate - test "${IS_BROADCOMFIRMWARE:=1}" = 1 && check_broadcomfirmware - test "${IS_HARDWARERAIDTOOL:=1}" = 1 && check_hardwareraidtool - test "${IS_LOG2MAILSYSTEMDUNIT:=1}" = 1 && check_log2mailsystemdunit - test "${IS_LISTUPGRADE:=1}" = 1 && check_listupgrade - test "${IS_MARIADBEVOLINUXCONF:=0}" = 1 && check_mariadbevolinuxconf - test "${IS_SQL_BACKUP:=1}" = 1 && check_sql_backup - test "${IS_POSTGRES_BACKUP:=1}" = 1 && check_postgres_backup - test "${IS_MONGO_BACKUP:=1}" = 1 && check_mongo_backup - test "${IS_LDAP_BACKUP:=1}" = 1 && check_ldap_backup - test "${IS_REDIS_BACKUP:=1}" = 1 && check_redis_backup - test "${IS_ELASTIC_BACKUP:=1}" = 1 && check_elastic_backup - test "${IS_MARIADBSYSTEMDUNIT:=1}" = 1 && check_mariadbsystemdunit - test "${IS_MYSQLMUNIN:=1}" = 1 && check_mysqlmunin - test "${IS_MYSQLNRPE:=1}" = 1 && check_mysqlnrpe - test "${IS_PHPEVOLINUXCONF:=0}" = 1 && check_phpevolinuxconf - test "${IS_SQUIDLOGROTATE:=1}" = 1 && check_squidlogrotate - test "${IS_SQUIDEVOLINUXCONF:=1}" = 1 && check_squidevolinuxconf - test "${IS_DUPLICATE_FS_LABEL:=1}" = 1 && check_duplicate_fs_label - test "${IS_EVOLIX_USER:=1}" = 1 && check_evolix_user - test "${IS_EVOACME_CRON:=1}" = 1 && check_evoacme_cron - test "${IS_EVOACME_LIVELINKS:=1}" = 1 && check_evoacme_livelinks - test "${IS_APACHE_CONFENABLED:=1}" = 1 && check_apache_confenabled - test "${IS_MELTDOWN_SPECTRE:=1}" = 1 && check_meltdown_spectre - test "${IS_OLD_HOME_DIR:=0}" = 1 && check_old_home_dir - test "${IS_EVOBACKUP_INCS:=1}" = 1 && check_evobackup_incs - test "${IS_OSPROBER:=1}" = 1 && check_osprober - test "${IS_APT_VALID_UNTIL:=1}" = 1 && check_apt_valid_until - test "${IS_CHROOTED_BINARY_UPTODATE:=1}" = 1 && check_chrooted_binary_uptodate - test "${IS_NGINX_LETSENCRYPT_UPTODATE:=1}" = 1 && check_nginx_letsencrypt_uptodate - test "${IS_LXC_CONTAINER_RESOLV_CONF:=1}" = 1 && check_lxc_container_resolv_conf - test "${IS_NO_LXC_CONTAINER:=1}" = 1 && check_no_lxc_container - test "${IS_LXC_PHP_FPM_SERVICE_UMASK_SET:=1}" = 1 && check_lxc_php_fpm_service_umask_set - test "${IS_CHECK_VERSIONS:=1}" = 1 && check_versions - - if [ -f "${main_output_file}" ]; then - lines_found=$(wc -l < "${main_output_file}") - # shellcheck disable=SC2086 - if [ ${lines_found} -gt 0 ]; then - - cat "${main_output_file}" 2>&1 - fi - fi - - exit ${RC} -} -cleanup() { - # Cleanup tmp files - # shellcheck disable=SC2086,SC2317 - rm -f ${files_to_cleanup[@]} - - log "$PROGNAME exit." -} - -PROGNAME=$(basename "$0") -# shellcheck disable=SC2034 -readonly PROGNAME - -# shellcheck disable=SC2124 -ARGS=$@ -readonly ARGS - -LOGFILE="/var/log/evocheck.log" -readonly LOGFILE - -CONFIGFILE="/etc/evocheck.cf" -readonly CONFIGFILE - -DATE_FORMAT="%Y-%m-%d %H:%M:%S" -# shellcheck disable=SC2034 -readonly DATEFORMAT - -# Disable LANG* -export LANG=C -export LANGUAGE=C - -# Source configuration file -# shellcheck disable=SC1091 -test -f "${CONFIGFILE}" && . "${CONFIGFILE}" - -# Parse options -# based on https://gist.github.com/deshion/10d3cb5f88a21671e17a -while :; do - case $1 in - -h|-\?|--help) - show_help - exit 0 - ;; - --version) - show_version - exit 0 - ;; - --cron) - IS_KERNELUPTODATE=0 - IS_UPTIME=0 - IS_MELTDOWN_SPECTRE=0 - IS_CHECK_VERSIONS=0 - IS_NETWORKING_SERVICE=0 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -q|--quiet) - QUIET=1 - VERBOSE=0 - ;; - --) - # End of all options. - shift - break - ;; - -?*|[[:alnum:]]*) - # ignore unknown options - if [ "${QUIET}" != 1 ]; then - printf 'WARN: Unknown option (ignored): %s\n' "$1" >&2 - fi - ;; - *) - # Default case: If no more options then break out of the loop. - break - ;; - esac - - shift -done - -# Keep this after "show_version(); exit 0" which is called by check_versions -# to avoid logging exit twice. -declare -a files_to_cleanup -files_to_cleanup="" -# shellcheck disable=SC2064 -trap cleanup EXIT INT TERM - -log '-----------------------------------------------' -log "Running $PROGNAME $VERSION..." - -# Log config file content -if [ -f "${CONFIGFILE}" ]; then - log "Runtime configuration (${CONFIGFILE}):" - sed -e '/^[[:blank:]]*#/d; s/#.*//; /^[[:blank:]]*$/d' "${CONFIGFILE}" | log -fi - -# shellcheck disable=SC2086 -main ${ARGS} - -log "End of $PROGNAME execution." - From 6cd4048a0cd82da75cf02f59cbdae30f35c71129 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Wed, 20 Sep 2023 14:28:52 +0200 Subject: [PATCH 148/182] bind: add todo to reload-zone script --- bind/files/reload-zone | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bind/files/reload-zone b/bind/files/reload-zone index 47514907..b9acc449 100755 --- a/bind/files/reload-zone +++ b/bind/files/reload-zone @@ -4,8 +4,10 @@ # Usage : reload-zone # # TODO: +# - renommer le script (par ex bind-safe-reload) # - vérifier le serial -# - prendre en charge plusieurs +# - ajouter un -h --help +# - prendre en charge plusieurs zones (ou aucune) # - ajouter le script dans le role bind named-checkzone "$1" /etc/bind/db."$1" && rndc reload "$1" From cc9d0c59d340a7dd62b5afd402b08c81c346f21c Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Wed, 20 Sep 2023 14:33:45 +0200 Subject: [PATCH 149/182] CHANGELOG cleanup --- CHANGELOG.md | 80 +++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e6e8469..2b19f4d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,71 +13,67 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Added -* apt: Explicit "signed-by" directives for official sources -* apt: Disable NonFreeFirmware warning for VM on Debian 12+ -* bind: Add reload-zone helper -* docker-host: added var for user namespace setting +* apt: disable `NonFreeFirmware` warning for VM on Debian 12+ +* apt: explicit `signed-by` directives for official sources +* bind: add reload-zone helper * docker-host: added var for user namespace setting * dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) -* dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) -* dovecot: fix old_stats plugin for Dovecot 2.3. -* dovecot: fix old_stats plugin for Dovecot 2.3. -* evocheck: add support for Debian >= 12 splitted SSH configuration -* evolinux-base: add splitted SSH configuration for Debian >= 12 -* evolinux-base: configure bashrc for all users -* evolinux-base: New variable "evolinux_system_include_ntpd" to chose wether or not to include ntpd role +* dovecot: fix old_stats plugin for Dovecot 2.3 +* evocheck: add support for Debian >= 12 split SSH configuration +* evolinux-base: add split SSH configuration for Debian >= 12 +* evolinux-base: configure `.bashrc` for all users +* evolinux-base: New variable `evolinux_system_include_ntpd` to chose wether or not to include `ntpd` role * evolinux-base: reboot the server if the Cloud kernel has been installed -* evolinux-users: add splitted SSH configuration for Debian >= 12 -* evolinux: Install HPE Agentless Management Service (amsd) +* evolinux-users: add split SSH configuration for Debian >= 12 +* evolinux: install HPE Agentless Management Service (amsd) * fail2ban: add default variable fail2ban_dbpurgeage_default -* fail2ban: add default variable fail2ban_dbpurgeage_default -* fail2ban: add variable fail2ban_sshd_port to configure sshd port -* metricbeat/logstash: fix Ansible syntax +* fail2ban: add `fail2ban_sshd_port` variable to configure sshd port * kvm-host: release 23.09.1 for migrate-vm.sh +* metricbeat/logstash: fix Ansible syntax * nagios-nrpe: add a NRPE check-local command with completion. -* nagios-nrpe: add a proper monitoring plugin for glusterfs (on servers, not for clients) -* php: add new variable to disable oveeriding settings of php-fpm default pool (www) -* policy_pam: New role allowing to manage password policy with pam_pwquality & pam_pwhistory -* userlogrotate: add a userlogpurge script disabled by default +* nagios-nrpe: add a proper monitoring plugin for GlusterFS (on servers, not for clients) +* php: add new variable to disable overriding settings of php-fpm default pool (www) +* policy_pam: New role to manage password policy with `pam_pwquality` & `pam_pwhistory` +* userlogrotate: add a `userlogpurge` script disabled by default * userlogrotate: new version, with separate conf file -* userlogrotate: rotate also php.log. +* userlogrotate: rotate also php.log ### Changed -* all: change syntax "force: [yes,no]" → "force: [true,false]" * all: change syntax "become: [yes,no]" → "become: [true,false]" +* all: change syntax "force: [yes,no]" → "force: [true,false]" * elasticsearch: improve networking configuration +* evolinux-base: include files under `sshd_config.d` * evolinux-users: remove Stretch references in tasks that also apply to next Debian versions -* minifirewall: upstream release 23.07 +* lxc-php: change LXC container in bookworm for php82 * minifirewall: update nrpe script to check active configuration +* minifirewall: upstream release 23.07 * mysql: improve shell syntax for mysql_skip script -* pbbouncer: minor fixes -* varnish: Allow the systemd template to be overriden with a template outside of the role +* nagios-nrpe: set default check_load --per-cpu for BSD +* pgbouncer: minor fixes * postfix (packmail or when postfix_slow_transport_include is True): change `minimal_backoff_time` from 2h to 15m (see HowtoPostfix) * postfix (packmail) : optimize Amavis integration -* redis: standardize plugins path from /usr/local/share/munin/ to /usr/local/lib/munin/plugins/ -* postfix: new spam.sh update script that avoids reloading if files did not change. -* postgresql: fix task "update apt cache" for PGDG repo -* postgresql: fix file postgresql.pref.j2 for exclude package -* lxc-php: Change lxc container in bookworm for php82 -* evolinux-base: include files under `sshd_config.d` * postfix: disable sending mails via IPv6 -* nagios-nrpe: set default check_load --per-cpu for BSD +* postfix: new spam.sh update script that avoids reloading if files did not change. +* postgresql: fix file `postgresql.pref.j2` for exclude package +* postgresql: fix task `update apt cache` for PGDG repo +* redis: standardize plugins path from `/usr/local/share/munin/` to `/usr/local/lib/munin/plugins/` +* varnish: allow the systemd template to be overridden with a template outside of the role ### Fixed -* elasticsearch: comment the Xlog:gc line instead of changing it completely -* fail2ban: Fix cron fail2ban_dbpurge (should be bash instead of sh) -* nagios-nrpe: remount /usr **after** installing the packages -* packweb-apache,nagios-nrpe: add missing task and config for PHP 8.2 container -* potsfix: add missing `localhost.$mydomain` to mydestination -* nagios-nrpe: check\_ssl\_local now has an output that nrpe can understand when it isn't OK +* elasticsearch: comment the `Xlog:gc` line instead of changing it completely +* evocheck: fix IS_SSHALLOWUSERS condition +* evolinux-base, evolinux-users: Fix files mode under `/etc/ssh/sshd_config.d` +* evolinux-base: fix file extension +* fail2ban: fix cron `fail2ban_dbpurge` (should be bash instead of sh) +* nagios-nrpe: `check_ssl_local` now has an output that nrpe can understand when it isn't OK +* nagios-nrpe: remount `/usr` **after** installing the packages * nginx: set default server directive in default vhost * opendkim: update apt cache before install -* redis: replace errorneous ini_file module for Munin config, fix dedicted Munin config filename (z-XXX). -* evolinux-base, evolinux-users: Fix files mode under /etc/ssh/sshd_config.d -* evolinux-base: Fix file extension -* evocheck: Fix IS_SSHALLOWUSERS condition +* packweb-apache,nagios-nrpe: add missing task and config for PHP 8.2 container +* postfix: add missing `localhost.$mydomain` to `mydestination` +* redis: replace erroneous `ini_file` module for Munin config, fix dedicated Munin config filename (z-XXX). ### Removed From b5550d2ce29522ab22115bb1aa80fa8d0185c289 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 21 Sep 2023 15:47:23 +0200 Subject: [PATCH 150/182] lxc-php: fix APT keyring path inside containers --- CHANGELOG.md | 4 +++- lxc-php/tasks/php80.yml | 4 ++-- lxc-php/tasks/php81.yml | 4 ++-- lxc-php/tasks/php82.yml | 4 ++-- lxc-php/templates/sury.sources.j2 | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b19f4d0..38b1cb9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * apt: disable `NonFreeFirmware` warning for VM on Debian 12+ * apt: explicit `signed-by` directives for official sources * bind: add reload-zone helper +* certbot: deploy-hook for proftpd * docker-host: added var for user namespace setting * dovecot: add Munin plugins dovecot1 and dovecot_stats (patched) * dovecot: fix old_stats plugin for Dovecot 2.3 @@ -51,7 +52,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * mysql: improve shell syntax for mysql_skip script * nagios-nrpe: set default check_load --per-cpu for BSD * pgbouncer: minor fixes -* postfix (packmail or when postfix_slow_transport_include is True): change `minimal_backoff_time` from 2h to 15m (see HowtoPostfix) +* postfix (packmail or when postfix_slow_transport_include is True): change `miniprofmal_backoff_time` from 2h to 15m (see HowtoPostfix) * postfix (packmail) : optimize Amavis integration * postfix: disable sending mails via IPv6 * postfix: new spam.sh update script that avoids reloading if files did not change. @@ -67,6 +68,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * evolinux-base, evolinux-users: Fix files mode under `/etc/ssh/sshd_config.d` * evolinux-base: fix file extension * fail2ban: fix cron `fail2ban_dbpurge` (should be bash instead of sh) +* lxc-php: fix APT keyring path inside containers * nagios-nrpe: `check_ssl_local` now has an output that nrpe can understand when it isn't OK * nagios-nrpe: remount `/usr` **after** installing the packages * nginx: set default server directive in default vhost diff --git a/lxc-php/tasks/php80.yml b/lxc-php/tasks/php80.yml index 0329d8b5..66f51f6f 100644 --- a/lxc-php/tasks/php80.yml +++ b/lxc-php/tasks/php80.yml @@ -27,9 +27,9 @@ - "deb [signed-by={{ lxc_apt_keyring_dir }}/sury.gpg] https://packages.sury.org/php/ bullseye main" - "deb [signed-by={{ lxc_apt_keyring_dir }}/pub_evolix.asc] http://pub.evolix.org/evolix bullseye-php80 main" -- name: "Ensure {{ lxc_rootfs }}{{ apt_keyring_dir }} directory exists" +- name: "Ensure {{ lxc_rootfs }}{{ lxc_apt_keyring_dir }} directory exists" file: - path: "{{ lxc_rootfs }}{{ apt_keyring_dir }}" + path: "{{ lxc_rootfs }}{{ lxc_apt_keyring_dir }}" state: directory mode: "755" owner: root diff --git a/lxc-php/tasks/php81.yml b/lxc-php/tasks/php81.yml index 67b50a28..0b92c3de 100644 --- a/lxc-php/tasks/php81.yml +++ b/lxc-php/tasks/php81.yml @@ -26,9 +26,9 @@ - "deb [signed-by={{ lxc_apt_keyring_dir }}/sury.gpg] https://packages.sury.org/php/ bullseye main" - "deb [signed-by={{ lxc_apt_keyring_dir }}/pub_evolix.asc] http://pub.evolix.org/evolix bullseye-php81 main" -- name: "Ensure {{ lxc_rootfs }}{{ apt_keyring_dir }} directory exists" +- name: "Ensure {{ lxc_rootfs }}{{ lxc_apt_keyring_dir }} directory exists" file: - path: "{{ lxc_rootfs }}{{ apt_keyring_dir }}" + path: "{{ lxc_rootfs }}{{ lxc_apt_keyring_dir }}" state: directory mode: "755" owner: root diff --git a/lxc-php/tasks/php82.yml b/lxc-php/tasks/php82.yml index f8fe2f33..ede18853 100644 --- a/lxc-php/tasks/php82.yml +++ b/lxc-php/tasks/php82.yml @@ -28,9 +28,9 @@ force: true mode: "0644" -- name: "Ensure {{ lxc_rootfs }}{{ apt_keyring_dir }} directory exists" +- name: "Ensure {{ lxc_rootfs }}{{ lxc_apt_keyring_dir }} directory exists" file: - path: "{{ lxc_rootfs }}{{ apt_keyring_dir }}" + path: "{{ lxc_rootfs }}{{ lxc_apt_keyring_dir }}" state: directory mode: "755" owner: root diff --git a/lxc-php/templates/sury.sources.j2 b/lxc-php/templates/sury.sources.j2 index 7d8a95c5..22725a58 100644 --- a/lxc-php/templates/sury.sources.j2 +++ b/lxc-php/templates/sury.sources.j2 @@ -4,5 +4,5 @@ Types: deb URIs: https://packages.sury.org/php/ Suites: {{ ansible_distribution_release }} Components: main -Signed-by: {{ apt_keyring_dir }}/sury.gpg +Signed-by: {{ lxc_apt_keyring_dir }}/sury.gpg Enabled: yes \ No newline at end of file From dfe2448e8691908e3be5de5938d35967f0edd2f7 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 21 Sep 2023 16:05:08 +0200 Subject: [PATCH 151/182] pki: fix conventions and idioms --- pki/tasks/main.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pki/tasks/main.yml b/pki/tasks/main.yml index f4d78ceb..55ef9be1 100644 --- a/pki/tasks/main.yml +++ b/pki/tasks/main.yml @@ -6,27 +6,29 @@ apt: name: python-cryptography state: present - when: ansible_python['executable'] == "/usr/bin/python" + when: ansible_python_version is version('3', '<') - name: Install python 3 cryptography apt: name: python3-cryptography state: present - when: ansible_python['executable'] == "/usr/bin/python3" + when: ansible_python_version is version('3', '>=') - name: Creates PKI tree directories file: path: "{{ item }}" - mode: 0700 + mode: "0700" state: directory loop: - "{{ pki_dir }}/certs" - "{{ pki_dir }}/private" -# Create Certificat Authority (CA) +# Create Certificate Authority (CA) - include: ca.yml - when: inventory_hostname == pki_ca_host and not ansible_check_mode + when: + - not ansible_check_mode + - inventory_hostname == pki_ca_host # Create a certificate signed by the CA From 4c91f424c6a16421fd4dd57eeead53aa47cfe991 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Thu, 21 Sep 2023 16:56:01 +0200 Subject: [PATCH 152/182] Revert "pki: fix conventions and idioms" This reverts commit dfe2448e8691908e3be5de5938d35967f0edd2f7. Implementation too inflexible. Try again! --- pki/tasks/main.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pki/tasks/main.yml b/pki/tasks/main.yml index 55ef9be1..f4d78ceb 100644 --- a/pki/tasks/main.yml +++ b/pki/tasks/main.yml @@ -6,29 +6,27 @@ apt: name: python-cryptography state: present - when: ansible_python_version is version('3', '<') + when: ansible_python['executable'] == "/usr/bin/python" - name: Install python 3 cryptography apt: name: python3-cryptography state: present - when: ansible_python_version is version('3', '>=') + when: ansible_python['executable'] == "/usr/bin/python3" - name: Creates PKI tree directories file: path: "{{ item }}" - mode: "0700" + mode: 0700 state: directory loop: - "{{ pki_dir }}/certs" - "{{ pki_dir }}/private" -# Create Certificate Authority (CA) +# Create Certificat Authority (CA) - include: ca.yml - when: - - not ansible_check_mode - - inventory_hostname == pki_ca_host + when: inventory_hostname == pki_ca_host and not ansible_check_mode # Create a certificate signed by the CA From e4a70b3c0c6a6071df73c21e31a1d78a7fbc15d3 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Thu, 21 Sep 2023 16:56:39 +0200 Subject: [PATCH 153/182] Revert "Add pki role." This reverts commit ac70793ad6506ca451bd883caf804831781e532d. Implementation too inflexible. Try again! --- pki/defaults/main.yml | 15 ------ pki/tasks/ca.yml | 28 ---------- pki/tasks/main.yml | 33 ------------ pki/tasks/signed_certificate.yml | 90 -------------------------------- 4 files changed, 166 deletions(-) delete mode 100644 pki/defaults/main.yml delete mode 100644 pki/tasks/ca.yml delete mode 100644 pki/tasks/main.yml delete mode 100644 pki/tasks/signed_certificate.yml diff --git a/pki/defaults/main.yml b/pki/defaults/main.yml deleted file mode 100644 index 30a0364b..00000000 --- a/pki/defaults/main.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -pki_dir: /etc/pki # Where to store PKI files - -pki_ca_cn: Null # Certificate Authority Commmon Name -pki_ca_host: Null # Host where the CA is located -pki_ca_filename: Null # Filename used to created CA related file -pki_ca_password: Null # Password for the key of the CA - - -# Private variable, please don't customize them -pki_ca_key: "{{ pki_dir }}/private/{{ pki_ca_filename | mandatory }}.key" -# pki_ca_csr: "{{ pki_dir }}/certs/{{ pki_ca_filename | mandatory }}.crt" -pki_ca_crt: "{{ pki_dir }}/certs/{{ pki_ca_filename | mandatory }}.crt" -pki_certificate_crt: "{{ pki_dir }}/certs/{{ ansible_fqdn }}.crt" -pki_certificate_key: "{{ pki_dir }}/private/{{ ansible_fqdn }}.key" diff --git a/pki/tasks/ca.yml b/pki/tasks/ca.yml deleted file mode 100644 index caae52d6..00000000 --- a/pki/tasks/ca.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- name: Create private key with password protection - community.crypto.openssl_privatekey: - path: "{{ pki_ca_key }}" - passphrase: "{{ pki_ca_password | mandatory }}" - cipher: auto - -- name: Create certificate signing request (CSR) for CA certificate - community.crypto.openssl_csr_pipe: - privatekey_path: "{{ pki_ca_key }}" - privatekey_passphrase: "{{ pki_ca_password | mandatory }}" - common_name: "{{ pki_ca_cn | mandatory }}" - use_common_name_for_san: false - basic_constraints: - - 'CA:TRUE' - basic_constraints_critical: yes - key_usage: - - keyCertSign - key_usage_critical: true - register: ca_csr - -- name: Create self-signed CA certificate from CSR - community.crypto.x509_certificate: - path: "{{ pki_ca_crt }}" - csr_content: "{{ ca_csr.csr }}" - privatekey_path: "{{ pki_ca_key }}" - privatekey_passphrase: "{{ pki_ca_password | mandatory }}" - provider: selfsigned diff --git a/pki/tasks/main.yml b/pki/tasks/main.yml deleted file mode 100644 index f4d78ceb..00000000 --- a/pki/tasks/main.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- - -# Prerequisites -# TODO Python packages may need to be differente based on debian version -- name: Install python 2 cryptography - apt: - name: python-cryptography - state: present - when: ansible_python['executable'] == "/usr/bin/python" - -- name: Install python 3 cryptography - apt: - name: python3-cryptography - state: present - when: ansible_python['executable'] == "/usr/bin/python3" - -- name: Creates PKI tree directories - file: - path: "{{ item }}" - mode: 0700 - state: directory - loop: - - "{{ pki_dir }}/certs" - - "{{ pki_dir }}/private" - - -# Create Certificat Authority (CA) -- include: ca.yml - when: inventory_hostname == pki_ca_host and not ansible_check_mode - - -# Create a certificate signed by the CA -- include: signed_certificate.yml diff --git a/pki/tasks/signed_certificate.yml b/pki/tasks/signed_certificate.yml deleted file mode 100644 index 15dbb42b..00000000 --- a/pki/tasks/signed_certificate.yml +++ /dev/null @@ -1,90 +0,0 @@ ---- -# CA certificate -- name: Check whether CA certificate exists - stat: - path: "{{ pki_ca_crt }}" - delegate_to: "{{ pki_ca_host | mandatory }}" - run_once: true - register: ca_certificate_exists - -- name: Fail if CA doesn't exists - fail: - msg: "CA '{{ pki_ca_crt }}' on host '{{ pki_ca_host }}' doesn't exists! You need to create one before continuing." - when: not ca_certificate_exists.stat.exists - -- name: Read existing CA certificate if exists - slurp: - src: "{{ pki_ca_crt }}" - when: ca_certificate_exists.stat.exists - delegate_to: "{{ pki_ca_host | mandatory }}" - run_once: true - register: ca_certificate - -- name: Write CA certificate file - copy: - dest: "{{ pki_ca_crt }}" - content: "{{ ca_certificate.content | b64decode }}" - run_once: true - register: ca_certificate - - -# Create new signed certificate -- name: Create private key for new certificate - community.crypto.openssl_privatekey: - path: "{{ pki_certificate_key }}" - run_once: true - -- name: Create certificate signing request (CSR) for new certificate - community.crypto.openssl_csr_pipe: - privatekey_path: "{{ pki_certificate_key }}" - common_name: "{{ ansible_fqdn }}" - run_once: true - register: csr - -- name: Check whether certificate exists - stat: - path: "{{ pki_certificate_crt }}" - run_once: true - register: certificate_exists - -- name: Read existing certificate if exists - slurp: - src: "{{ pki_certificate_crt }}" - when: certificate_exists.stat.exists - run_once: true - register: certificate - -- name: Sign certificate with CA - community.crypto.x509_certificate_pipe: - content: "{{ (certificate.content | b64decode) if certificate_exists.stat.exists else omit }}" - csr_content: "{{ csr.csr }}" - provider: ownca - ownca_path: "{{ pki_ca_crt }}" - ownca_privatekey_path: "{{ pki_ca_key }}" - ownca_privatekey_passphrase: "{{ pki_ca_password | mandatory}}" - delegate_to: "{{ pki_ca_host | mandatory }}" - run_once: true - register: certificate - when: not ansible_check_mode - -- name: Write certificate file - copy: - dest: "{{ pki_certificate_crt }}" - content: "{{ certificate.certificate }}" - run_once: true - when: certificate is changed and not ansible_check_mode - -- name: Write certificate file on the CA host - copy: - dest: "{{ pki_certificate_crt }}" - content: "{{ certificate.certificate }}" - delegate_to: "{{ pki_ca_host | mandatory }}" - run_once: true - when: certificate is changed and not ansible_check_mode - - -# Allow other roles to know if some certifiates has changed -- name: Set fact, pki_changed - when: certificate is changed or ca_certificate is changed - set_fact: - pki_changed: True From ee6bd8cec4db18c92108d7237a0f3800f92c9dd6 Mon Sep 17 00:00:00 2001 From: Bruno TATU Date: Tue, 26 Sep 2023 11:42:13 +0200 Subject: [PATCH 154/182] keep rights from current log --- userlogrotate/files/userlogrotate | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/userlogrotate/files/userlogrotate b/userlogrotate/files/userlogrotate index 9599d63b..2a76eaaf 100644 --- a/userlogrotate/files/userlogrotate +++ b/userlogrotate/files/userlogrotate @@ -40,9 +40,14 @@ rotate () { } user_for() { + stat -L -c '%U' $1 +} + +group_for() { stat -L -c '%G' $1 } + delete_old() { if [ ${DELETE_AFTER_RETENTION_DAYS} == "true" ]; then if [ ${DRY_RUN} == "false" ]; then @@ -67,7 +72,8 @@ for path in ${SYSTEM_LOGS_SEARCH_PATHS[@]}; do log_paths=$(ls -1 -d ${path}/${log_name} 2>/dev/null | grep -v \.bak\.) for file in ${log_paths}; do user="$(user_for "${file}")" - rotate "${file}" root:"${user}" + group="$(group_for "${file}")" + rotate "${file}" "${group}":"${user}" delete_old "$(dirname "${file}")" done done @@ -78,7 +84,8 @@ for path in ${APPLICATIVE_LOGS_SEARCH_PATHS[@]}; do log_paths=$(ls -1 -d ${path}/${log_name} 2>/dev/null | grep -v \.bak\.) for file in ${log_paths}; do user="$(user_for "${file}")" - rotate "${file}" "${user}":"${user}" + group="$(group_for "${file}")" + rotate "${file}" "${group}":"${user}" delete_old "$(dirname "${file}")" done done From a65230b5e0db99ece2cf992e0f20ae9437053fbe Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Tue, 26 Sep 2023 17:35:14 +0200 Subject: [PATCH 155/182] mysql: new munin graph to follow binlog_days over time --- CHANGELOG.md | 1 + mysql/files/mysql_binlog_days | 44 +++++++++++++++++++++++++++++++++++ mysql/tasks/munin.yml | 9 +++++++ 3 files changed, 54 insertions(+) create mode 100644 mysql/files/mysql_binlog_days diff --git a/CHANGELOG.md b/CHANGELOG.md index 38b1cb9b..39766522 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * fail2ban: add `fail2ban_sshd_port` variable to configure sshd port * kvm-host: release 23.09.1 for migrate-vm.sh * metricbeat/logstash: fix Ansible syntax +* mysql: new munin graph to follow binlog_days over time * nagios-nrpe: add a NRPE check-local command with completion. * nagios-nrpe: add a proper monitoring plugin for GlusterFS (on servers, not for clients) * php: add new variable to disable overriding settings of php-fpm default pool (www) diff --git a/mysql/files/mysql_binlog_days b/mysql/files/mysql_binlog_days new file mode 100644 index 00000000..ede363cc --- /dev/null +++ b/mysql/files/mysql_binlog_days @@ -0,0 +1,44 @@ +#!/bin/sh + +output_config() { + echo "graph_title MySQL - Value of expire_logs_days variable" + echo "graph_category mysql" + echo "binlogdays.label Number of days of storage of binary logs" + echo "binlogdays.draw AREA" + echo 'graph_args -l 0' + echo 'graph_scale no' +} + +output_values() { + printf "binlogdays.value %d\n" $(binlog_days) +} + +binlog_days() { + mysql --skip-column-names --silent --execute "show variables like 'expire_logs_days';" | awk '{print $2}' +} + +output_usage() { + printf >&2 "%s - munin plugin to graph value of MySQL expire_logs_days system variable\n" ${0##*/} + printf >&2 "Usage: %s [config]\n" ${0##*/} +} + +case $# in + 0) + output_values + ;; + 1) + case $1 in + config) + output_config + ;; + *) + output_usage + exit 1 + ;; + esac + ;; + *) + output_usage + exit 1 + ;; +esac diff --git a/mysql/tasks/munin.yml b/mysql/tasks/munin.yml index 9b4e9617..dfe959c1 100644 --- a/mysql/tasks/munin.yml +++ b/mysql/tasks/munin.yml @@ -66,6 +66,15 @@ - replication notify: restart munin-node + - name: Install custom plugin for binlog retention tracking + ansible.builtin.copy: + src: mysql_binlog_days + dest: /etc/munin/plugins/mysql_binlog_days + owner: root + group: root + mode: "0755" + notify: restart munin-node + - name: verify Munin configuration for mysql < Debian 11 ansible.builtin.replace: dest: /etc/munin/plugin-conf.d/munin-node From d69259f2caeddb2cb40c00eedac749908c3be0f9 Mon Sep 17 00:00:00 2001 From: David Prevot Date: Fri, 4 Aug 2023 15:19:13 +0200 Subject: [PATCH 156/182] LXC: Drop openssh-server from just installed container --- lxc/tasks/create-container.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lxc/tasks/create-container.yml b/lxc/tasks/create-container.yml index a4a17e16..4d3851b6 100644 --- a/lxc/tasks/create-container.yml +++ b/lxc/tasks/create-container.yml @@ -70,3 +70,8 @@ remote_src: true dest: "/var/lib/lxc/{{ name }}/rootfs/etc/profile.d/evolinux.sh" mode: '0644' + +- name: "Purge OpenSSH in container {{ name }}" + community.general.lxc_container: + name: "{{ name }}" + container_command: "DEBIAN_FRONTEND=noninteractive apt-get purge -y openssh-server" From c03dd0ca2f28781ac8757487b70a2337486b7848 Mon Sep 17 00:00:00 2001 From: David Prevot Date: Tue, 26 Sep 2023 16:14:54 +0200 Subject: [PATCH 157/182] Changelog for previous commit --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39766522..b74f3869 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * postgresql: fix task `update apt cache` for PGDG repo * redis: standardize plugins path from `/usr/local/share/munin/` to `/usr/local/lib/munin/plugins/` * varnish: allow the systemd template to be overridden with a template outside of the role +* lxc: purge openssh-server from container on install ### Fixed From ec4c9108e76ffb5e6efa06d942f58ce9f46a7bd6 Mon Sep 17 00:00:00 2001 From: David Prevot Date: Tue, 26 Sep 2023 17:47:42 +0200 Subject: [PATCH 158/182] Allow Java 17 --- java/vars/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/java/vars/main.yml b/java/vars/main.yml index 6cc0c9a5..5bdd9be5 100644 --- a/java/vars/main.yml +++ b/java/vars/main.yml @@ -2,3 +2,4 @@ java_bin_path: 8: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 11: /usr/lib/jvm/java-11-openjdk-amd64/bin/java + 17: /usr/lib/jvm/java-17-openjdk-amd64/bin/java From aa13171f91cab72c7711cefa7bb4e420dd61cdd5 Mon Sep 17 00:00:00 2001 From: David Prevot Date: Tue, 26 Sep 2023 17:56:33 +0200 Subject: [PATCH 159/182] Changelog for previous commit --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b74f3869..f9b73d8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * userlogrotate: add a `userlogpurge` script disabled by default * userlogrotate: new version, with separate conf file * userlogrotate: rotate also php.log +* java: allow version 17 ### Changed From ca67feb39e98aebcb977f38c536800ee1ad09457 Mon Sep 17 00:00:00 2001 From: David Prevot Date: Thu, 24 Aug 2023 18:08:16 +0200 Subject: [PATCH 160/182] New timesyncd role used instead of ntpd by default --- evolinux-base/defaults/main.yml | 5 ++-- evolinux-base/tasks/system.yml | 5 ++++ timesyncd/defaults/main.yml | 3 ++ timesyncd/handlers/main.yml | 5 ++++ timesyncd/tasks/main.yml | 40 +++++++++++++++++++++++++++ timesyncd/templates/timesyncd.conf.j2 | 3 ++ 6 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 timesyncd/defaults/main.yml create mode 100644 timesyncd/handlers/main.yml create mode 100644 timesyncd/tasks/main.yml create mode 100644 timesyncd/templates/timesyncd.conf.j2 diff --git a/evolinux-base/defaults/main.yml b/evolinux-base/defaults/main.yml index e8894baf..1a7f8c11 100644 --- a/evolinux-base/defaults/main.yml +++ b/evolinux-base/defaults/main.yml @@ -104,7 +104,8 @@ evolinux_system_locales: True evolinux_system_set_timezone: True evolinux_system_timezone: "Europe/Paris" -evolinux_system_include_ntpd: true +evolinux_system_include_ntpd: False +evolinux_system_include_timesyncd: True evolinux_system_vim_skip_defaults: True evolinux_system_vim_default_editor: True @@ -233,4 +234,4 @@ evolinux_cron_checkhpraid_frequency: daily evolinux_motd_include: True # Utils -evolinux_utils_include: True \ No newline at end of file +evolinux_utils_include: True diff --git a/evolinux-base/tasks/system.yml b/evolinux-base/tasks/system.yml index 67f4cc87..0f5fd825 100644 --- a/evolinux-base/tasks/system.yml +++ b/evolinux-base/tasks/system.yml @@ -134,6 +134,11 @@ when: - evolinux_system_include_ntpd | bool +- ansible.builtin.include_role: + name: evolix/timesyncd + when: + - evolinux_system_include_timesyncd | bool + ## alert5 - name: Install alert5 init script (jessie/stretch) diff --git a/timesyncd/defaults/main.yml b/timesyncd/defaults/main.yml new file mode 100644 index 00000000..7fb5bcf4 --- /dev/null +++ b/timesyncd/defaults/main.yml @@ -0,0 +1,3 @@ +--- +ntp_servers: +- 'ntp.evolix.net' diff --git a/timesyncd/handlers/main.yml b/timesyncd/handlers/main.yml new file mode 100644 index 00000000..904e3471 --- /dev/null +++ b/timesyncd/handlers/main.yml @@ -0,0 +1,5 @@ +--- +- name: Restart timesyncd + ansible.builtin.service: + name: systemd-timesyncd.service + state: restarted diff --git a/timesyncd/tasks/main.yml b/timesyncd/tasks/main.yml new file mode 100644 index 00000000..2efad13e --- /dev/null +++ b/timesyncd/tasks/main.yml @@ -0,0 +1,40 @@ +--- +- name: Install systemd-timesyncd package + ansible.builtin.apt: + name: systemd-timesyncd + state: present + tags: + - timesyncd + +- name: Remove openntpd package + ansible.builtin.apt: + name: openntpd + state: absent + tags: + - timesyncd + +- name: Remove ntp package + ansible.builtin.apt: + name: ntp + state: absent + tags: + - timesyncd + +- name: Ensure /etc/systemd/timesyncd.conf.d directory exists + file: + path: /etc/systemd/timesyncd.conf.d + state: directory + mode: "755" + owner: root + group: root + tags: + - timesyncd + +- name: Copy timesyncd config + ansible.builtin.template: + src: timesyncd.conf.j2 + dest: /etc/systemd/timesyncd.conf.d/evolix.conf + mode: "0644" + notify: Restart timesyncd + tags: + - timesyncd diff --git a/timesyncd/templates/timesyncd.conf.j2 b/timesyncd/templates/timesyncd.conf.j2 new file mode 100644 index 00000000..93d22569 --- /dev/null +++ b/timesyncd/templates/timesyncd.conf.j2 @@ -0,0 +1,3 @@ +# {{ ansible_managed }} +[Time] +NTP="{{ ntp_servers | join(' ') }}" From a2306e6a152a9f4f1126d8748235e5a5ab6ac713 Mon Sep 17 00:00:00 2001 From: David Prevot Date: Thu, 28 Sep 2023 14:34:20 +0200 Subject: [PATCH 161/182] Changelog for previous commit --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9b73d8f..20171792 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * userlogrotate: new version, with separate conf file * userlogrotate: rotate also php.log * java: allow version 17 +* timesyncd: new role, used instead of ntpd by default ### Changed From b722ca822f1c9de2bd61e96d82ccb67e6fd3ce9b Mon Sep 17 00:00:00 2001 From: David Prevot Date: Thu, 28 Sep 2023 15:27:10 +0200 Subject: [PATCH 162/182] evolinux-base: remount /usr rw before writting on it --- evolinux-base/tasks/system.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/evolinux-base/tasks/system.yml b/evolinux-base/tasks/system.yml index 0f5fd825..52766796 100644 --- a/evolinux-base/tasks/system.yml +++ b/evolinux-base/tasks/system.yml @@ -160,7 +160,8 @@ - evolinux_system_alert5_enable | bool - ansible_distribution_release == "jessie" or ansible_distribution_release == "stretch" - +- ansible.builtin.include_role: + name: evolix/remount-usr - name: Install alert5 init script (buster and later) ansible.builtin.template: From 35e7f2221077930b05ddc4feb7d12171667fbf74 Mon Sep 17 00:00:00 2001 From: David Prevot Date: Thu, 28 Sep 2023 15:56:24 +0200 Subject: [PATCH 163/182] =?UTF-8?q?deb822-migration:=20Don=E2=80=99t=20kee?= =?UTF-8?q?p=20evolix=5Fpublic=5Fold.sources=20on=20upgrade?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apt/files/deb822-migration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt/files/deb822-migration.py b/apt/files/deb822-migration.py index ab4bd79c..f8693b28 100755 --- a/apt/files/deb822-migration.py +++ b/apt/files/deb822-migration.py @@ -13,7 +13,7 @@ destinations = { ".*-backports": "backports.sources", ".debian.org": "system.sources", "mirror.evolix.org": "system.sources", - "pub.evolix.net": "evolix_public_old.sources", + "pub.evolix.net": "evolix_public_old.sources.bak", "pub.evolix.org": "evolix_public.sources", "artifacts.elastic.co": "elastic.sources", "download.docker.com": "docker.sources", From f2c37dddffa96f54a644613e9fa20de48a87bc65 Mon Sep 17 00:00:00 2001 From: David Prevot Date: Thu, 28 Sep 2023 17:25:18 +0200 Subject: [PATCH 164/182] Use timesyncd instead of ntpd starting with Debian 12 (not always) --- CHANGELOG.md | 2 +- evolinux-base/defaults/main.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20171792..c22c28b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * userlogrotate: new version, with separate conf file * userlogrotate: rotate also php.log * java: allow version 17 -* timesyncd: new role, used instead of ntpd by default +* timesyncd: new role, used instead of ntpd by default starting with Debian 12 ### Changed diff --git a/evolinux-base/defaults/main.yml b/evolinux-base/defaults/main.yml index 1a7f8c11..f92fa90b 100644 --- a/evolinux-base/defaults/main.yml +++ b/evolinux-base/defaults/main.yml @@ -104,8 +104,8 @@ evolinux_system_locales: True evolinux_system_set_timezone: True evolinux_system_timezone: "Europe/Paris" -evolinux_system_include_ntpd: False -evolinux_system_include_timesyncd: True +evolinux_system_include_ntpd: "{{ ansible_distribution_major_version is version('12', '<') }}" +evolinux_system_include_timesyncd: "{{ ansible_distribution_major_version is version('12', '>=') }}" evolinux_system_vim_skip_defaults: True evolinux_system_vim_default_editor: True From fef86b0a3fbce73e2e4196c65b53088bc8f9915f Mon Sep 17 00:00:00 2001 From: David Prevot Date: Fri, 29 Sep 2023 15:18:58 +0200 Subject: [PATCH 165/182] apt: Add Signed-by on Bookworm updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The generic keyring is used instead of the specific ones for system and security because /usr/share/keyrings/debian-archive-bookworm-* are not present (yet) on major upgrades. It’s not ideal, and should be replaced afterwards. https://wiki.evolix.org/HowtoDebian/SourcesList#bookworm-12 --- apt/tasks/migrate-to-deb822.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/apt/tasks/migrate-to-deb822.yml b/apt/tasks/migrate-to-deb822.yml index 18aa1580..e7339e8b 100644 --- a/apt/tasks/migrate-to-deb822.yml +++ b/apt/tasks/migrate-to-deb822.yml @@ -30,3 +30,21 @@ ignore_errors: yes tags: - apt + +- name: Add signed-by when relevant for bookworm + ansible.builtin.lineinfile: + dest: /etc/apt/sources.list.d/system.sources + line: "Signed-by: /usr/share/keyrings/debian-archive-keyring.gpg" + insertafter: "Suites: bookworm bookworm-updates" + state: present + tags: + - apt + +- name: Add signed-by when relevant for bookworm-security + ansible.builtin.lineinfile: + dest: /etc/apt/sources.list.d/security.sources + line: "Signed-by: /usr/share/keyrings/debian-archive-keyring.gpg" + insertafter: "Suites: bookworm-security" + state: present + tags: + - apt From 9cd0426d2b5233740803fdbd9abc5040ff2575a0 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 26 Sep 2023 10:40:06 +0200 Subject: [PATCH 166/182] nagios-nrpe: sync Redis check from redis roles --- CHANGELOG.md | 1 + .../files/plugins/check_redis_instances | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c22c28b2..a197cf09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * lxc-php: fix APT keyring path inside containers * nagios-nrpe: `check_ssl_local` now has an output that nrpe can understand when it isn't OK * nagios-nrpe: remount `/usr` **after** installing the packages +* nagios-nrpe: sync Redis check from redis roles * nginx: set default server directive in default vhost * opendkim: update apt cache before install * packweb-apache,nagios-nrpe: add missing task and config for PHP 8.2 container diff --git a/nagios-nrpe/files/plugins/check_redis_instances b/nagios-nrpe/files/plugins/check_redis_instances index 5923eef7..32580486 100755 --- a/nagios-nrpe/files/plugins/check_redis_instances +++ b/nagios-nrpe/files/plugins/check_redis_instances @@ -30,11 +30,21 @@ check_server() { host=$(config_var "bind" "${conf_file}") port=$(config_var "port" "${conf_file}") pass=$(config_var "requirepass" "${conf_file}") + maxmemory=$(config_var "maxmemory" "${conf_file}") + maxmemory_policy=$(config_var "maxmemory-policy" "${conf_file}") cmd="${check_bin} -H ${host} -p ${port}" + # If "requirepass" is set we add the password to the check if [ -n "${pass}" ]; then cmd="${cmd} -x ${pass}" fi + # If "maxmemory" is set and "maxmemory-policy" is missing or set to "noeviction" + # then we enforce the "maxmemory" limit + if [ -n "${maxmemory}" ]; then + if [ -z "${maxmemory_policy}" ] || [ "${maxmemory_policy}" = "noeviction" ]; then + cmd="${cmd} --total_memory ${maxmemory} --memory_utilization 80,90" + fi + fi result=$($cmd) ret="${?}" if [ "${ret}" -ge 2 ]; then @@ -54,7 +64,7 @@ check_server() { config_var() { variable=$1 file=$2 - test -f $file && grep -E "^${variable}\s+.+$" $file | awk '{ print $2 }' + test -f "${file}" && grep -E "^${variable}\s+.+$" "${file}" | awk '{ print $2 }' | sed -e "s/^[\"']//" -e "s/[\"']$//" } # default instance @@ -63,11 +73,11 @@ if systemctl is-enabled -q redis-server; then fi # additional instances -conf_files=$(ls -1 /etc/redis-*/redis.conf) +conf_files=$(ls -1 /etc/redis-*/redis.conf 2> /dev/null) for conf_file in ${conf_files}; do - name=$(dirname ${conf_file} | sed '{s|/etc/redis-||}') + name=$(dirname "${conf_file}" | sed '{s|/etc/redis-||}') if systemctl is-enabled -q "redis-server@${name}.service"; then - check_server $name $conf_file + check_server "${name}" "${conf_file}" else nb_unchk=$((nb_unchk + 1)) output="${output}UNCHK - ${name} (unit is disabled or missing)\n" From 31456aa126ad5c9c6e31f4cea790827402877e55 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 5 Oct 2023 18:06:30 +0200 Subject: [PATCH 167/182] kvm-host: migrate-vm: set drbd role after define/undefine --- kvm-host/files/migrate-vm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kvm-host/files/migrate-vm.sh b/kvm-host/files/migrate-vm.sh index 09b7f6f3..d745e4fb 100644 --- a/kvm-host/files/migrate-vm.sh +++ b/kvm-host/files/migrate-vm.sh @@ -249,11 +249,11 @@ migrate_from() { set_drbd_role primary "${resource}" migrate_vm_from "${vm}" "${remote_ip}" "${current_ip}" - set_drbd_role secondary "${resource}" "${remote_ip}" if persistent; then define_vm "${vm}" undefine_vm "${vm}" "${remote_ip}" fi + set_drbd_role secondary "${resource}" "${remote_ip}" } migrate_to() { @@ -268,11 +268,11 @@ migrate_to() { set_drbd_role primary "${resource}" "${remote_ip}" migrate_vm_to "${vm}" "${remote_ip}" - set_drbd_role secondary "${resource}" if persistent; then define_vm "${vm}" "${remote_ip}" undefine_vm "${vm}" fi + set_drbd_role secondary "${resource}" } main() { From d6a777be72cfd64d40104012da3f4f0130a0a978 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 5 Oct 2023 22:05:17 +0200 Subject: [PATCH 168/182] kvm-host: migrate-vm: set migration speed even on bridges --- CHANGELOG.md | 2 +- kvm-host/files/migrate-vm.sh | 51 +++++++++++++++++++++++++++++++----- 2 files changed, 45 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a197cf09..88490bd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * evolinux: install HPE Agentless Management Service (amsd) * fail2ban: add default variable fail2ban_dbpurgeage_default * fail2ban: add `fail2ban_sshd_port` variable to configure sshd port -* kvm-host: release 23.09.1 for migrate-vm.sh +* kvm-host: release 23.10 for migrate-vm.sh * metricbeat/logstash: fix Ansible syntax * mysql: new munin graph to follow binlog_days over time * nagios-nrpe: add a NRPE check-local command with completion. diff --git a/kvm-host/files/migrate-vm.sh b/kvm-host/files/migrate-vm.sh index d745e4fb..26883e4c 100644 --- a/kvm-host/files/migrate-vm.sh +++ b/kvm-host/files/migrate-vm.sh @@ -11,7 +11,7 @@ # * migrate "from" # * switch to Bash to use local and readonly variables -VERSION="23.09.1" +VERSION="23.10" show_version() { cat <&2 + case "$(ls "${bridge_path}" | wc -l)" in + 0) + # echo "${interface} bridge is empty, fallback to ${fallback_speed}" >&2 + echo "${fallback_speed}" + ;; + 1) + bridge_iface="$(ls "${bridge_path}" | head -n 1)" + # echo "${interface} bridge has 1 interface: ${bridge_iface}" >&2 + interface_speed "${bridge_iface}" + ;; + *) + # echo "${interface} bridge has many interfaces" >&2 + min_speed="" + for bridge_iface in $(ls "${bridge_path}"); do + if realpath "/sys/class/net/${bridge_iface}" | grep --quiet --invert-match virtual; then + speed=$(head -n 1 "/sys/class/net/${bridge_iface}/speed") + # echo "${bridge_iface} is a physical interface, keep" >&2 + if [ -z "${min_speed}" ] || [ "${min_speed}" -gt "${speed}" ]; then + # echo "new min speed with ${bridge_iface}: ${speed}" >&2 + min_speed="${speed}" + fi + else + # echo "${bridge_iface} is a virtual interface, skip" >&2 + : # noop + fi + done + if [ -n "${min_speed}" ] && [ "${min_speed}" -gt "0" ]; then + echo "${min_speed}" + else + echo "${fallback_speed}" + fi + ;; + esac + elif [ -e "${speed_path}" ]; then + head -n 1 "${speed_path}" else - # fallback on 1Gb/s if unknown - echo "1000" + echo "${fallback_speed}" fi } @@ -230,7 +267,7 @@ migrate_vm_to() { interface_speed=$(interface_speed "${drbd_interface}") migrate_speed=$(echo "${interface_speed}*0.8/8" | bc) - # echo "Migration speed set to ${migrate_speed}MiB/s" + echo "Migration speed set to ${migrate_speed}MiB/s" virsh --quiet migrate-setspeed "${vm}" "${migrate_speed}" export VIRSH_DEFAULT_CONNECT_URI="qemu:///system" From 0f15484adaf69e67c03a7ce6bf05b328dad7bec8 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Fri, 6 Oct 2023 15:25:29 +0200 Subject: [PATCH 169/182] kvm-tools: migrate-vm: remove transient/persistent options + allow migration of stopped VM --- kvm-host/files/migrate-vm.sh | 100 ++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 49 deletions(-) diff --git a/kvm-host/files/migrate-vm.sh b/kvm-host/files/migrate-vm.sh index 26883e4c..4676a123 100644 --- a/kvm-host/files/migrate-vm.sh +++ b/kvm-host/files/migrate-vm.sh @@ -8,10 +8,9 @@ # * logging (stdout/stderr + syslog) # * more checks, rollback if needed… # * different return codes for different errors -# * migrate "from" # * switch to Bash to use local and readonly variables -VERSION="23.10" +VERSION="23.10.1" show_version() { cat < or migrate-vm --vm --resource - or migrate-vm --persistent - or migrate-vm --transient Options --vm VM name (from libvirt point of view) --resource DRBD resource name (default to VM name) - --transient Leave VM as defined on hosts - --persistent Undefine the VM on the source and define it on the destination (default) --help Print this message and exit --version Print version and exit END } -persistent() { - test "${persistent}" -eq 1 -} - server_ips() { ip addr show | grep 'inet '| awk '{print $2}' | cut -f1 -d'/' } @@ -148,6 +139,11 @@ is_vm_running_locally() { virsh list --state-running --name | grep --fixed-strings --line-regexp --quiet "${vm}" } +is_vm_defined_locally() { + vm=${1:-} + + virsh list --all --name | grep --fixed-strings --line-regexp --quiet "${vm}" +} execute_remotely() { remote=${1:-} @@ -250,15 +246,6 @@ undefine_vm() { fi } -migrate_vm_from() { - vm=${1:-} - remote_ip=${2:-} - current_ip=${3:-} - - export VIRSH_DEFAULT_CONNECT_URI="qemu+ssh://${remote_ip}/system" - virsh migrate --live --unsafe --verbose "${vm}" "qemu:///system" "tcp://${current_ip}/" -} - migrate_vm_to() { vm=${1:-} remote_ip=${2:-} @@ -274,24 +261,28 @@ migrate_vm_to() { virsh migrate --live --unsafe --verbose "${vm}" "qemu+ssh://${remote_ip}/system" "tcp://${remote_ip}/" } -migrate_from() { - vm=${1:-} - resource=${2:-} - remote_ip=${3:-} - remote_host=${4:-} - current_ip=${5:-} - current_host=${6:-} +# start_vm() { +# vm=${1:-} +# remote_ip=${2:-} - echo "Start migration of ${vm} from ${remote_ip} (${remote_host})" +# command="virsh start ${vm}" - set_drbd_role primary "${resource}" - migrate_vm_from "${vm}" "${remote_ip}" "${current_ip}" - if persistent; then - define_vm "${vm}" - undefine_vm "${vm}" "${remote_ip}" - fi - set_drbd_role secondary "${resource}" "${remote_ip}" -} +# if [ -z "${remote}" ]; then +# retval=$(eval "${command}") +# retcode=$? +# if [ ${retcode} != 0 ]; then +# echo "An error occured while starting ${vm} : ${retval}" >&2 +# exit 1 +# fi +# else +# retval=$(execute_remotely "${remote}" "${command}") +# retcode=$? +# if [ ${retcode} != 0 ]; then +# echo "An error occured while remotely starting ${vm}: ${retval}" >&2 +# exit 1 +# fi +# fi +# } migrate_to() { vm=${1:-} @@ -304,11 +295,18 @@ migrate_to() { check_drbd_sync "${resource}" set_drbd_role primary "${resource}" "${remote_ip}" - migrate_vm_to "${vm}" "${remote_ip}" - if persistent; then - define_vm "${vm}" "${remote_ip}" - undefine_vm "${vm}" + sleep 1 + + if is_vm_running_locally "${vm}"; then + migrate_vm_to "${vm}" "${remote_ip}" + else + echo "${vm} is not running locally, so it won't be started on ${remote_host}" fi + + define_vm "${vm}" "${remote_ip}" + undefine_vm "${vm}" + + sleep 1 set_drbd_role secondary "${resource}" } @@ -336,14 +334,21 @@ main() { fi done - if is_vm_running_locally "${vm}"; then + if is_vm_defined_locally "${vm}"; then migrate_to "${vm}" "${resource}" "${remote_ip}" "${remote_host}" else - echo "Migrating \"from\" is not supported yet" >&2 + echo "VM \"${vm}\" is not defined." >&2 exit 1 - - migrate_from "${vm}" "${resource}" "${remote_ip}" "${remote_host}" "${current_ip}" "${current_host}" fi + + # if is_vm_running_locally "${vm}"; then + # migrate_to "${vm}" "${resource}" "${remote_ip}" "${remote_host}" + # else + # echo "Migrating \"from\" is not supported yet" >&2 + # exit 1 + + # migrate_from "${vm}" "${resource}" "${remote_ip}" "${remote_host}" "${current_ip}" "${current_host}" + # fi } if [ "$(id -u)" -ne "0" ] ; then @@ -364,12 +369,11 @@ while :; do exit 0 ;; --transient) - transient=1 - persistent=0 + printf 'WARNING: "transient" mode has been removed.\n' >&2 + exit 1 ;; --persistent) - transient=0 - persistent=1 + printf 'WARNING: "persistent" mode is the only one available. You can remove this argument from your command.\n' >&2 ;; --vm) # with value separated by space @@ -433,8 +437,6 @@ done # Initial values vm=${vm:-} resource=${resource:-${vm}} -transient=${transient:-0} -persistent=${persistent:-1} set -u set -e From c673ed10c68ef567797c82b3b784e2d53c8f23da Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Mon, 9 Oct 2023 16:24:47 +0200 Subject: [PATCH 170/182] evomaintenance: upstream release 23.10 --- CHANGELOG.md | 1 + evomaintenance/files/evomaintenance.sh | 54 ++++++++++++++++++-------- 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88490bd5..451d535c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * elasticsearch: improve networking configuration * evolinux-base: include files under `sshd_config.d` * evolinux-users: remove Stretch references in tasks that also apply to next Debian versions +* evomaintenance: upstream release 23.10 * lxc-php: change LXC container in bookworm for php82 * minifirewall: update nrpe script to check active configuration * minifirewall: upstream release 23.07 diff --git a/evomaintenance/files/evomaintenance.sh b/evomaintenance/files/evomaintenance.sh index bce0e562..d3ea6de6 100644 --- a/evomaintenance/files/evomaintenance.sh +++ b/evomaintenance/files/evomaintenance.sh @@ -1,21 +1,16 @@ #!/bin/sh -# EvoMaintenance script -# Dependencies (all OS): git postgresql-client -# Dependencies (Debian): sudo - -# Copyright 2007-2022 Evolix , Gregory Colpart , -# Jérémy Lecour and others. - -VERSION="22.07" +VERSION="23.10" show_version() { cat <, +Copyright 2007-2023 Evolix , Gregory Colpart , - Jérémy Lecour + Jérémy Lecour , + Brice Waegeneire , + Mathieu Trossevin and others. evomaintenance comes with ABSOLUTELY NO WARRANTY. This is free software, @@ -47,11 +42,11 @@ Options --no-evocheck disable evocheck execution --auto use "auto" mode --no-auto use "manual" mode (default) - --autosysadmin author change as autosysadmin + -u, --user=USER force USER value (default: logname(1)) -v, --verbose increase verbosity -n, --dry-run actions are not executed --help print this message and exit - --version print version and exit + -V, --version print version and exit END } @@ -109,7 +104,7 @@ get_begin_date() { get_ip() { ip=$(get_who | cut -d" " -f6 | sed -e "s/^(// ; s/)$//") - if is_autosysadmin || [ "${ip}" = ":0" ]; then + if is_autosysadmin || [ "${ip}" = ":0" ]; then ip="localhost" elif [ -z "${ip}" ]; then ip="unknown (no tty)" @@ -127,8 +122,8 @@ get_now() { } get_user() { - if is_autosysadmin; then - echo autosysadmin + if [ -n "${USER}" ]; then + echo "${USER}" else logname fi @@ -193,7 +188,7 @@ print_session_data() { } is_autosysadmin() { - test "${AUTOSYSADMIN}" -eq 1 + test "${USER}" = "autosysadmin" } is_repository_readonly() { @@ -404,7 +399,7 @@ AUTO=${AUTO:-"0"} EVOCHECK=${EVOCHECK:-"0"} GIT_STATUS_MAX_LINES=${GIT_STATUS_MAX_LINES:-20} API_ENDPOINT=${API_ENDPOINT:-""} -AUTOSYSADMIN=${AUTOSYSADMIN:-0} +USER=${USER:-""} # initialize variables MESSAGE="" @@ -482,6 +477,31 @@ while :; do # use "auto" mode AUTO=1 ;; + --autosysadmin) + # Deprecated, backward compatibility + # author change as autosysadmin + printf 'WARNING: "--autosysadmin" is deprecated, use "--user autosysadmin".\n' >&2 + USER="autosysadmin" + ;; + -u|--user) + # user options, with value speparated by space + if [ -n "$2" ]; then + USER=$2 + shift + else + printf 'ERROR: "--user" requires a non-empty option argument.\n' >&2 + exit 1 + fi + ;; + --user=?*) + # message options, with value speparated by = + USER=${1#*=} + ;; + --user=) + # message options, without value + printf 'ERROR: "--user" requires a non-empty option argument.\n' >&2 + exit 1 + ;; -n|--dry-run) # disable actual commands DRY_RUN=1 From 0c9b55e5e1f7eb40bfd7bb590493ae9a048a8d44 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Mon, 9 Oct 2023 17:12:15 +0200 Subject: [PATCH 171/182] evolix-base/root: fix module used --- CHANGELOG.md | 1 + evolinux-base/tasks/root.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 451d535c..1609869a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,6 +82,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * packweb-apache,nagios-nrpe: add missing task and config for PHP 8.2 container * postfix: add missing `localhost.$mydomain` to `mydestination` * redis: replace erroneous `ini_file` module for Munin config, fix dedicated Munin config filename (z-XXX). +* evolinux-base: use lineinfile instead of replace under root task ### Removed diff --git a/evolinux-base/tasks/root.yml b/evolinux-base/tasks/root.yml index 5db27cfb..8910b5fa 100644 --- a/evolinux-base/tasks/root.yml +++ b/evolinux-base/tasks/root.yml @@ -112,7 +112,7 @@ - ansible_distribution_major_version is version('12', '>=') - name: disable SSH access for root (Debian >= 12) - ansible.builtin.replace: + ansible.builtin.lineinfile: path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf line: "PermitRootLogin no" create: yes From 3347ac4271ebd5594e6fabafb9d2c11f40180b44 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Mon, 9 Oct 2023 18:13:35 +0200 Subject: [PATCH 172/182] evomaintenance: upstream release 23.10.1 --- CHANGELOG.md | 2 +- evomaintenance/files/evomaintenance.sh | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1609869a..177c3dc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,7 +49,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * elasticsearch: improve networking configuration * evolinux-base: include files under `sshd_config.d` * evolinux-users: remove Stretch references in tasks that also apply to next Debian versions -* evomaintenance: upstream release 23.10 +* evomaintenance: upstream release 23.10.1 * lxc-php: change LXC container in bookworm for php82 * minifirewall: update nrpe script to check active configuration * minifirewall: upstream release 23.07 diff --git a/evomaintenance/files/evomaintenance.sh b/evomaintenance/files/evomaintenance.sh index d3ea6de6..3ddbdf76 100644 --- a/evomaintenance/files/evomaintenance.sh +++ b/evomaintenance/files/evomaintenance.sh @@ -1,6 +1,6 @@ #!/bin/sh -VERSION="23.10" +VERSION="23.10.1" show_version() { cat <&2 - USER="autosysadmin" + FORCE_USER="autosysadmin" ;; -u|--user) # user options, with value speparated by space if [ -n "$2" ]; then - USER=$2 + FORCE_USER=$2 shift else printf 'ERROR: "--user" requires a non-empty option argument.\n' >&2 @@ -495,7 +495,7 @@ while :; do ;; --user=?*) # message options, with value speparated by = - USER=${1#*=} + FORCE_USER=${1#*=} ;; --user=) # message options, without value From a80076a5ea3c12bc4e1200a7377e060b285a8800 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Wed, 11 Oct 2023 09:55:56 +0200 Subject: [PATCH 173/182] evolinux-base: Corriger autorisation pour evolinux_user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cas configuration SSH séparée. Ticket #74636. --- CHANGELOG.md | 1 + evolinux-base/tasks/ssh.included-files.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 177c3dc1..86163086 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -83,6 +83,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * postfix: add missing `localhost.$mydomain` to `mydestination` * redis: replace erroneous `ini_file` module for Munin config, fix dedicated Munin config filename (z-XXX). * evolinux-base: use lineinfile instead of replace under root task +* evolinux-base: Corriger autorisation pour evolinux_user ### Removed diff --git a/evolinux-base/tasks/ssh.included-files.yml b/evolinux-base/tasks/ssh.included-files.yml index bb3538d6..c21fdd20 100644 --- a/evolinux-base/tasks/ssh.included-files.yml +++ b/evolinux-base/tasks/ssh.included-files.yml @@ -36,6 +36,7 @@ - name: "Add AllowUsers sshd directive for current user" ansible.builtin.lineinfile: dest: /etc/ssh/sshd_config.d/allow_evolinux_user.conf + create: yes line: "AllowUsers {{ logname.stdout }}" insertafter: 'Subsystem' validate: '/usr/sbin/sshd -t -f %s' From bc3656dd4cb27a9ffff0ceea99e735117c76173c Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Wed, 11 Oct 2023 12:07:05 +0200 Subject: [PATCH 174/182] =?UTF-8?q?evolinux-base:=20retirer=20t=C3=A2che?= =?UTF-8?q?=20trait=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- evolinux-base/tasks/ssh.included-files.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/evolinux-base/tasks/ssh.included-files.yml b/evolinux-base/tasks/ssh.included-files.yml index c21fdd20..6454e390 100644 --- a/evolinux-base/tasks/ssh.included-files.yml +++ b/evolinux-base/tasks/ssh.included-files.yml @@ -45,6 +45,5 @@ - ansible.builtin.meta: flush_handlers -# TODO vérifier présence de Include /etc/ssh/sshd_config.d/*.conf # TODO si allowusers et allowgroups, ajouter utilisateur aux deux # TODO si allowgroups, ajouter groupe de l’utilisateur From dbd110307828d02316c8ba8eae904c0c648aea3c Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Wed, 11 Oct 2023 18:05:39 +0200 Subject: [PATCH 175/182] docker-host: Retirer directive state en trop --- CHANGELOG.md | 1 + docker-host/tasks/main.yml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86163086..6631d20c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -84,6 +84,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * redis: replace erroneous `ini_file` module for Munin config, fix dedicated Munin config filename (z-XXX). * evolinux-base: use lineinfile instead of replace under root task * evolinux-base: Corriger autorisation pour evolinux_user +* docker-host: Retirer directive state en trop ### Removed diff --git a/docker-host/tasks/main.yml b/docker-host/tasks/main.yml index 92c6ab3e..556570f5 100644 --- a/docker-host/tasks/main.yml +++ b/docker-host/tasks/main.yml @@ -51,7 +51,6 @@ ansible.builtin.template: src: docker.sources.j2 dest: /etc/apt/sources.list.d/docker.sources - state: present register: docker_sources when: ansible_distribution_major_version is version('12', '>=') From bbf6ce6f6e3899b4997a6127a89c85ae852987af Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Thu, 12 Oct 2023 17:49:00 +0200 Subject: [PATCH 176/182] rbenv: Installer libyaml-dev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le paquet est nécessaire en Debian 12. --- CHANGELOG.md | 1 + rbenv/tasks/main.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6631d20c..e8de8a36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,6 +85,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * evolinux-base: use lineinfile instead of replace under root task * evolinux-base: Corriger autorisation pour evolinux_user * docker-host: Retirer directive state en trop +* rbenv: Installer libyaml-dev ### Removed diff --git a/rbenv/tasks/main.yml b/rbenv/tasks/main.yml index ea73a9e6..abd39e12 100644 --- a/rbenv/tasks/main.yml +++ b/rbenv/tasks/main.yml @@ -13,6 +13,7 @@ - libxslt1-dev - zlib1g-dev - pkg-config + - libyaml-dev state: present tags: - rbenv From 243c64f555bfab1a999ce9239bb5204a40900490 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Sat, 14 Oct 2023 06:59:57 +0200 Subject: [PATCH 177/182] timesyncd: compact tasks --- timesyncd/tasks/main.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/timesyncd/tasks/main.yml b/timesyncd/tasks/main.yml index 2efad13e..73dda7c6 100644 --- a/timesyncd/tasks/main.yml +++ b/timesyncd/tasks/main.yml @@ -6,16 +6,11 @@ tags: - timesyncd -- name: Remove openntpd package +- name: Remove other NTP packages ansible.builtin.apt: - name: openntpd - state: absent - tags: - - timesyncd - -- name: Remove ntp package - ansible.builtin.apt: - name: ntp + name: + - openntpd + - ntp state: absent tags: - timesyncd From 9c56cff642cf006df192033c2212b3fdd18593d1 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Sat, 14 Oct 2023 07:05:55 +0200 Subject: [PATCH 178/182] conventions --- timesyncd/tasks/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/timesyncd/tasks/main.yml b/timesyncd/tasks/main.yml index 73dda7c6..7ce56ffc 100644 --- a/timesyncd/tasks/main.yml +++ b/timesyncd/tasks/main.yml @@ -4,7 +4,7 @@ name: systemd-timesyncd state: present tags: - - timesyncd + - timesyncd - name: Remove other NTP packages ansible.builtin.apt: @@ -13,17 +13,17 @@ - ntp state: absent tags: - - timesyncd + - timesyncd - name: Ensure /etc/systemd/timesyncd.conf.d directory exists - file: + ansible.builtin.file: path: /etc/systemd/timesyncd.conf.d state: directory mode: "755" owner: root group: root tags: - - timesyncd + - timesyncd - name: Copy timesyncd config ansible.builtin.template: @@ -32,4 +32,4 @@ mode: "0644" notify: Restart timesyncd tags: - - timesyncd + - timesyncd From 86e753b7a0b83b01436bb0a4c2cfe93c0487faa3 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Sat, 14 Oct 2023 07:07:57 +0200 Subject: [PATCH 179/182] timesyncd: rename variable ntp_servers to timesyncd_ntp_servers and check for minimum number of elements --- timesyncd/defaults/main.yml | 4 ++-- timesyncd/tasks/main.yml | 6 ++++++ timesyncd/templates/timesyncd.conf.j2 | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/timesyncd/defaults/main.yml b/timesyncd/defaults/main.yml index 7fb5bcf4..a321fbfa 100644 --- a/timesyncd/defaults/main.yml +++ b/timesyncd/defaults/main.yml @@ -1,3 +1,3 @@ --- -ntp_servers: -- 'ntp.evolix.net' +timesyncd_ntp_servers: + - 'ntp.evolix.net' diff --git a/timesyncd/tasks/main.yml b/timesyncd/tasks/main.yml index 7ce56ffc..a6d70f15 100644 --- a/timesyncd/tasks/main.yml +++ b/timesyncd/tasks/main.yml @@ -1,4 +1,10 @@ --- + +- name: Verify that at least 1 NTP server is provided + ansible.builtin.assert: + that: timesyncd_ntp_servers | length > 0 + msg: The variable timesyncd_ntp_servers must contain at least 1 element + - name: Install systemd-timesyncd package ansible.builtin.apt: name: systemd-timesyncd diff --git a/timesyncd/templates/timesyncd.conf.j2 b/timesyncd/templates/timesyncd.conf.j2 index 93d22569..8aebc1be 100644 --- a/timesyncd/templates/timesyncd.conf.j2 +++ b/timesyncd/templates/timesyncd.conf.j2 @@ -1,3 +1,3 @@ # {{ ansible_managed }} [Time] -NTP="{{ ntp_servers | join(' ') }}" +NTP="{{ timesyncd_ntp_servers | join(' ') }}" From 3e55768c4952a750b7ac1c325557d6d7ecf460bc Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Sat, 14 Oct 2023 07:20:57 +0200 Subject: [PATCH 180/182] evolinux-base: replace value if present --- evolinux-base/tasks/root.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/evolinux-base/tasks/root.yml b/evolinux-base/tasks/root.yml index 8910b5fa..a3b51f5d 100644 --- a/evolinux-base/tasks/root.yml +++ b/evolinux-base/tasks/root.yml @@ -90,7 +90,7 @@ - "set shiftwidth=4" when: evolinux_root_vim_conf | bool -- name: disable SSH access for root +- name: disable SSH access for root (Debian < 12) ansible.builtin.replace: dest: /etc/ssh/sshd_config regexp: '^#?PermitRootLogin (yes|without-password|prohibit-password)' @@ -115,6 +115,7 @@ ansible.builtin.lineinfile: path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf line: "PermitRootLogin no" + regexp: "^#?PermitRootLogin " create: yes mode: "0644" validate: '/usr/sbin/sshd -t -f %s' From 31990cfe807c3fbbd87b62573a1aa08916d25683 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Sat, 14 Oct 2023 07:36:29 +0200 Subject: [PATCH 181/182] Linting CHANGELOG --- .markdownlint.json | 4 +++ CHANGELOG.md | 88 ++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 78 insertions(+), 14 deletions(-) create mode 100644 .markdownlint.json diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 00000000..9eb5b2db --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,4 @@ +{ + "MD013": false, + "MD024": false +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e8de8a36..fdcf1df6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). @@ -8,7 +9,6 @@ The **major** part of the version is the year The **minor** part changes is the month The **patch** part changes is incremented if multiple releases happen the same month - ## [Unreleased] ### Added @@ -91,8 +91,6 @@ The **patch** part changes is incremented if multiple releases happen the same m * dovecot: remove Munin plugin dovecot (not working) -### Security - ## [23.04] 2023-04-23 ### Added @@ -179,7 +177,6 @@ The **patch** part changes is incremented if multiple releases happen the same m * evolinux-base: subversion is not installed anymore - ## [22.12] 2022-12-14 ### Added @@ -234,7 +231,6 @@ The **patch** part changes is incremented if multiple releases happen the same m * openvpn: Deleted the task fixing the CRL rights since it has been fixed in upstream - ## [22.09] 2022-09-19 ### Added @@ -248,7 +244,6 @@ The **patch** part changes is incremented if multiple releases happen the same m * proftpd: Add options to override configs (and add a warning if file was overriden) * proftpd: Allow user auth with ssh keys - ### Changed * evocheck: upstream release 22.09 @@ -256,7 +251,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * generate-ldif: Support any MariaDB version * minifirewall: use handlers to restart minifirewall * openvpn: automate the initialization of the CA and the creation of the server certificate ; use openssl_dhparam module instead of a command -* generate-ldif: support any version of MariaDB (instead of only 10.0, 10.1 and 10.3) +* generate-ldif: support any version of MariaDB (instead of only 10.0, 10.1 and 10.3) * openvpn: Run OpenVPN with the \_openvpn user and group instead of nobody which is originally for NFS * nagios-nrpe: Upgrade check_mongo @@ -374,7 +369,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Added -* docker : Introduce new default settings + allow to change the docker data directory +* docker : Introduce new default settings + allow to change the docker data directory * docker : Introduce new variables to tweak daemon settings ### Changed @@ -407,7 +402,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * minifirewall: restore "force-restart" and fix "restart-if-needed" * minifirewall: tail template follows symlinks * minifirewall: upstream release 22.05 -* opendkim : add generate opendkim-genkey in sha256 and key 4096 +* opendkim : add generate opendkim-genkey in sha256 and key 4096 * openvpn: use a local copy of files instead of cloning an external git repository * openvpn: use a subnet topology instead of the net30 default topology * tomcat: Tomcat 9 by default with Debian 11 @@ -770,6 +765,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ## [10.0.0] - 2020-05-13 ### Added + * apache: the default VHost doesn't redirect to https for ".well-known" paths * apt: added buster backports prerferences * apt: check if cron is installed before adding a cron job @@ -806,6 +802,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * bind: enable bind9 munin plugin for recursive resolvers ### Changed + * replace version_compare() with version()s * removed some deprecations for Ansible 2.7 * apache: improve permissions in save_apache_status script @@ -851,6 +848,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * varnish: remove custom ExecReload= script for Debian 10+ ### Fixed + * etc-git: fix warnings ansible-lint * evoadmin-web: Put the php config at the right place for Buster * lxc: Don't stop the container if it already exists @@ -873,16 +871,19 @@ The **patch** part changes is incremented if multiple releases happen the same m * packweb-apache: Don't try to install PHPMyAdmin on Buster as it's not available ### Removed + * clamav : do not install the zoo package anymore ## [9.10.1] - 2019-06-21 ### Changed + * evocheck : update (version 19.06) from upstream ## [9.10.0] - 2019-06-21 ### Added + * apache: add server status suffix in VHost (and default site) if missing * apache: add a variable to customize the server-status host * apt: add a script to manage packages with "hold" mark @@ -893,6 +894,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * redmine: enable gzip compression in nginx vhost ### Changed + * evocheck : update (unreleased) from upstream * evomaintenance : use the web API instead of PG Insert * fluentd: store gpg key locally @@ -905,23 +907,26 @@ The **patch** part changes is incremented if multiple releases happen the same m * apt: Add Debian Buster repositories ### Fixed + * rbenv: add check_mode for check rbenv and ruby versions * nagios-nrpe: fix redis_instances check when Redis port equal 0 * redmine: fix 500 error on logging * evolinux-base: Validate sshd config with "-t" instead of "-T" * evolinux-base: Ensure rename is present * evolinux-users: Validate sshd config with "-t" instead of "-T" -* nagios-nrpe: Replace the dummy packages nagios-plugins-* with monitoring-plugins-* +* nagios-nrpe: Replace the dummy packages nagios-plugins-*with monitoring-plugins-* ## [9.9.0] - 2019-04-16 ### Added + * etc-git: ignore evobackup/.keep-* files * lxc: /home is mounted in the container by default * nginx : add "x-frame-options: sameorigin" for Munin ### Changed -* changed remote repository to https://gitea.evolix.org/evolix/ansible-roles + +* changed remote repository to * apt: Ensure jessie-backport from archives.debian.org is accepted * apt: Remove jessie-update suite as it's no longer exists * apt: Replace mirror.evolix.org by archives.debian.org for jessie-backport @@ -934,8 +939,8 @@ The **patch** part changes is incremented if multiple releases happen the same m * tomcat: better tomcat version management * webapps/evoadmin-web: add dbadmin.sh to sudoers file - ### Fixed + * spamassasin: fix sa-update.sh and ensure service is started and enabled * tomcat-instance: deploy correct version of config files * tomcat-instance: deploy correct version of server.xml @@ -943,20 +948,24 @@ The **patch** part changes is incremented if multiple releases happen the same m ## [9.8.0] - 2019-01-31 ### Added + * filebeat: disable cloud_metadata processor by default * metricbeat: disable cloud_metadata processor by default * percona : new role to install Percona repositories and tools * redis: add variable for configure unixsocketperm ### Changed + * redmine: refactoring of redmine role with use of rbenv ### Fixed + * ntpd: Update the restrictions to follow wiki.evolix.org/HowtoNTP client config ## [9.7.0] - 2019-01-17 ### Added + * apache: add Munin configuration for Apache server-status URL * evomaintenance: database variables must be set or the task fails * fail2ban: add "ips" tag added to fail2ban/tasks/ip_whitelist.yml @@ -969,6 +978,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * proftpd: add FTPS and SFTP support ### Changed + * redis: distinction between main and master password * evocheck: update evocheck.sh for source install * php: added php-zip in the installed package list for debian 9 (and later) @@ -976,6 +986,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * java: update Oracle java package to 8u192 ### Fixed + * fail2ban: fix "ignoreip" update * metricbeat: fix username/password replacement * nagios-nrpe: check_process now return the error code (making the check more usefull than /bin/true) @@ -984,16 +995,17 @@ The **patch** part changes is incremented if multiple releases happen the same m * redis: In instance mode, ensure to replace the nrpe check_redis with the instance check script * redis: Don't set the owner of /var/{lib,log}/redis to a redis instance account - ## [9.6.0] - 2018-12-04 ### Added + * evolinux-base: deploy custom motd if template are present * minifirewall: all variables are configurable (untouched by default) * minifirewall: main file is configurable * squid: minifirewall main file is configurable ### Changed + * minifirewall: compare config before/after (for restart condition) * squid: better replacement in minifirewall config * evoadmin-mail: complete refactoring, use Debian Package @@ -1001,6 +1013,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ## [9.5.0] - 2018-11-14 ### Added + * apache: separate task to update IP whitelist * evolinux-base: install man package * evolinux-users: add newaliases handler @@ -1014,11 +1027,13 @@ The **patch** part changes is incremented if multiple releases happen the same m * mysql: logdir can be customized ### Changed + * evocheck: update script from upstream * evomaintenance: update script from upstream * mysql: restart service if systemd unit has been patched ### Fixed + * packweb-apache: mod-security config is already included elsewhere * redis: for permissions on log and lib directories * redis: fix shell for instance users @@ -1027,13 +1042,16 @@ The **patch** part changes is incremented if multiple releases happen the same m ## [9.4.2] - 2018-10-12 ### Added + * evomaintenance: install dependencies manually when installing vendored version * nagios-nrpe: add an option to ignore servers in NOLB status ### Changed + * haproxy: move check_haproxy_stats to nagios-nrpe role ### Fixed + * evoacme: better error when apache2ctl fails * evomaintenance: fix role compatibility with OpenBSD * spamassassin: add missing right for amavis @@ -1042,16 +1060,19 @@ The **patch** part changes is incremented if multiple releases happen the same m ## [9.4.1] - 2018-09-28 ### Added + * redis: set masterauth when redis_password is defined * evomaintenance: variable to install a vendored version * evomaintenance: tasks/variables to handle minifirewall restarts ### Changed + * mysql-oracle: better handle packages and users ## [9.4.0] - 2018-09-20 ### Added + * etc-git: manage a cron job to monitor uncommited changes in /etc/.git (default: `True`) * evolinux-base: better shell history * evolinux-users: add user to /etc/aliases @@ -1066,9 +1087,11 @@ The **patch** part changes is incremented if multiple releases happen the same m * nagios-nrpe: add check_redis_instances ### Changed + * dovecot: stronger TLS configuration ### Fixed + * apache: cleaner way to overwrite the server status suffix * packweb-apache: don't regenerate phpMyAdmin suffix each time * nginx: cleaner way to overwrite the server status suffix @@ -1077,11 +1100,13 @@ The **patch** part changes is incremented if multiple releases happen the same m ## [9.3.2] - 2018-09-06 ### Added + * minifirewall: add a variable to disable the restart handler * minifirewall: add a variable to force a restart of the firewall (even with no change) * minifirewall: improve variables values and documentation ### Changed + * dovecot: enable SSL/TLS by default with snakeoil certificate ### Fixed @@ -1091,11 +1116,13 @@ The **patch** part changes is incremented if multiple releases happen the same m ## [9.3.1] - 2018-08-30 ### Added + * metricbeat: new variables to configure elasticsearch hosts and auth ## [9.3.0] - 2018-08-24 ### Added + * elasticsearch: tmpdir configuration compatible with 5.x also * elasticsearch: add http.publish_host variable * evoacme: disable old certbot cron also in cron.daily @@ -1116,6 +1143,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * nagios-nrpe: add check_postgrey ### Changed + * etc-git: some entries of .gitignore are mandatory * evocheck: update upstream script * evolinux-base: improve hostname configuration (real vs. internal) @@ -1134,6 +1162,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * kvm-host: install kvm-tools package instead of copying add-vm.sh ### Fixed + * apache: logrotate replacement is more subtle/precise. It replaces only the proper directive and not every occurence of the word. * bind: chroot-bind.sh must not be executed in check mode * evoacme: fix module detection in apache config @@ -1145,12 +1174,14 @@ The **patch** part changes is incremented if multiple releases happen the same m ## [9.2.0] - 2018-05-16 ### Changed + * filebeat: install version 6.x by default * filebeat: cleanup unused code * squid: add some domaine and fix broken restrictions * elasticsearch: defaults to version 6.x ### Fixed + * evolinux-users: secondary groups are comma-separated * ntpd: fix configuration (server and ACL) * varnish: don't fork the process on startup with systemd @@ -1160,6 +1191,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Added ### Changed + * apache: customize logrotate (52 weeks) * evolinux: groups for SSH configuration are used with Debian 10 and later * evolinux-base: fail2ban is not enabled by default @@ -1171,9 +1203,11 @@ The **patch** part changes is incremented if multiple releases happen the same m ## [9.1.8] - 2018-04-16 ### Changed + * packweb-apache: use dependencies instead of include_role for apache and php roles ### Fixed + * mysql: use check_mode for apg command (Fix --check) * mysql/mysql-oracle: properly reload systemd * packweb-apache: use check_mode for apg command (Fix --check) @@ -1181,6 +1215,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ## [9.1.7] - 2018-04-06 ### Added + * added a few become attributes where missing * etc-git: add tags for Ansible * evolinux-base: install ncurses-term package @@ -1198,6 +1233,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * redmine: added missing tags ### Changed + * elasticsearch: RESTART_ON_UPGRADE is configurable (default: `true`) * elasticsearch: use ES_TMPDIR variable for custom tmpdir, (from `/etc/default/elasticsearch` instead of changing `/etc/elesticsearch/jvm.options`). * evolinux-base: Exec the firewall tasks sooner (to avoid dependency issues) @@ -1213,6 +1249,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * webapps/evoadmin-web: Fail if variable evoadmin_contact_email isn't defined ### Fixed + * dovecot: fix support of plus sign * mysql/mysql-oracle: mysqltuner cron task is executable * nginx: fix basic auth for default vhost @@ -1221,21 +1258,25 @@ The **patch** part changes is incremented if multiple releases happen the same m ## [9.1.6] - 2018-02-02 ### Added + * mongodb: install python-pymongo for monitoring * nagios-nrpe: allowed_hosts can be updated ### Changed + * Changelog: explain the versioning scheme * Changelog: add a release date for 9.1.5 * evoacme: exclude typical certbot directories ### Fixed + * fail2ban: fix horrible typo, Python is not Ruby * nginx: fix servers status dirname ## [9.1.5] - 2018-01-18 ### Added + * There is a changelog! * redis: configuration variable for protected mode (v3.2+) * evolinux-users: users are in "adm" group for Debian 9 or later @@ -1247,41 +1288,49 @@ The **patch** part changes is incremented if multiple releases happen the same m * redmine: ability to install themes and plugins ### Changed + * rbenv: Ruby 2.5 becomes the default version * evocheck: update upstream version embedded in role (c993244) * bind: keep 52 weeks of logs ### Fixed + * squid: different logrotate file for Jessie or Stretch+ * evoacme: don't invoke evoacme if no vhost is found * evomaintenance: explicit quotes in config file * redmine: force xpath gem < 3.0.0 ### Security + * evomaintenance: fix permissions for config file ## [9.1.4] - 2017-12-20 ### Added + * php: install php5-intl (for Jessie) and php-intl (for Debian 9 or later) * mysql: add a check_mysql_slave in nrpe configuration * ldap: slapd tcp port is configurable * elasticsearch: broader patterns for log rotation ### Changed + * split IP lists in 2 – default and additional – for easier customization. ### Fixed + * minifirewall: allow outgoing SSH connections over IPv6 * nodejs: rename source.list file ### Security + * evoadmin-web: change config.local.php file permissions * evolinux-base: change default_www file permissions ## [9.1.3] 2017-12-08 ### Added + * evolinux-base: install traceroute package * evolinux-base/ntpd: purge openntpd * tomcat: add Tomcat 8 cmpatibility @@ -1293,6 +1342,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * elastic: option for stack main version ### Changed + * nginx: rename Let's Encrypt snippet * nginx: simpler apt preferences for backports * generate-ldif: add clamd service instead of clamav_db @@ -1304,10 +1354,12 @@ The **patch** part changes is incremented if multiple releases happen the same m * mongodb: comatible with Stretch ### Removed + * mongodb: logfile/pidfile are not configurable on Jessie * minifirewall: remove zidane.evolix.net from HTTPSITES ### Fixed + * nginx: fix munin CGI graphs * ntpd: fix default configuration (localhost only) * logstash: fix permissions on pipeline configuration @@ -1318,14 +1370,17 @@ The **patch** part changes is incremented if multiple releases happen the same m ## [9.1.2] 2017-12-05 ### Fixed + * listupgrade: remount /usr as rw ## [9.1.1] 2017-11-21 ### Added + * amazon-ec2: add egress rules ### Fixed + * evoacme: fix multiple bugs ## [9.1.0] 2017-11-19 @@ -1333,6 +1388,7 @@ The **patch** part changes is incremented if multiple releases happen the same m _Warning: huge release, many entries are missing below._ ### Added + * amazon-ec2: new role, for EC2 instances creation * Move /usr rw remount into remount-usr role * kibana: host and basepath configuration @@ -1343,6 +1399,7 @@ _Warning: huge release, many entries are missing below._ * nagios-nrpe: add opendkim check ### Changed + * Combine evolix and additional trusted IP addresses * amazon-ec2: split tasks * apt: don't upgrade by default @@ -1353,6 +1410,7 @@ _Warning: huge release, many entries are missing below._ * ldap: better variables ### Fixed + * fail2ban: create config hierarchy beforehand * elasticsearch: fix datadir/tmpdir conditions * elastic: remove double ".list" suffix @@ -1363,10 +1421,10 @@ _Warning: huge release, many entries are missing below._ ### Security - ## [9.0.1] 2017-10-02 ### Added + * haproxy: add a Nagios check * php: add "sury" mode for PHP 7.1 on Stretch * minifirewall: explicit dependency on iptables @@ -1374,9 +1432,11 @@ _Warning: huge release, many entries are missing below._ * docker-host: new variable for docker home ### Changed + * php: install php5/php package after fpm/libapache2-mod-php ### Fixed + * mysql: add "REPLICATION CLIENT" privilege for nrpe * evoadmin-web: revert from variables to keywords in the templates * evoacme: many fixes From 3b3b13024898a61c79a34c309e280a329e389577 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Sat, 14 Oct 2023 07:37:18 +0200 Subject: [PATCH 182/182] Release 23.10 --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdcf1df6..2a4c9e60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,18 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Added +### Changed + +### Fixed + +### Removed + +### Security + +## [23.10] 2023-10-14 + +### Added + * apt: disable `NonFreeFirmware` warning for VM on Debian 12+ * apt: explicit `signed-by` directives for official sources * bind: add reload-zone helper