diff --git a/CHANGELOG.md b/CHANGELOG.md index c98d3e9c..0dff2c1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ The **patch** part is incremented if multiple releases happen the same month * packweb: fix old bug (2017!) .orig file created by module patch and taken in account by ProFTPd * redis: replace inline argument with environment variable for the password * evolinux-base/logcheck: fix conf patch, journal check was not disabled when asked +* openvpn: install packages manually, because openbsd_pkg module is broken since OpenBSD 7.4 with the version of Ansible we currently use ### Removed diff --git a/openvpn/tasks/openbsd.yml b/openvpn/tasks/openbsd.yml index 28781880..820e3b20 100644 --- a/openvpn/tasks/openbsd.yml +++ b/openvpn/tasks/openbsd.yml @@ -1,9 +1,16 @@ --- +- name: Check if OpenVPN is already installed + ansible.builtin.command: + cmd: pkg_info -Iq inst:openvpn + register: is_installed + ignore_errors: true + changed_when: false + - name: Install OpenVPN - community.general.openbsd_pkg: - name: openvpn-- - when: ansible_distribution == 'OpenBSD' + ansible.builtin.command: + cmd: pkg_add openvpn-- + when: "'Can\\'t find inst:' in is_installed.stderr" - name: Create /etc/openvpn ansible.builtin.file: @@ -116,10 +123,19 @@ check_mode: no register: nrpe_evolix_config -- name: Install NRPE check dependencies - community.general.openbsd_pkg: - name: p5-Net-Telnet - when: nrpe_evolix_config.stat.exists +- name: Check if NRPE check dependenciy is already installed + ansible.builtin.command: + cmd: pkg_info -Iq inst:p5-Net-Telnet + register: is_installed + ignore_errors: true + changed_when: false + +- name: Install p5-Net-Telnet + ansible.builtin.command: + cmd: pkg_add p5-Net-Telnet + when: + - "'Can\\'t find inst:' in is_installed.stderr" + - nrpe_evolix_config.stat.exists - name: Install OpenVPN NRPE check ansible.builtin.copy: