forked from evolix/ansible-roles
openvpn: install packages manually
Because openbsd_pkg module is broken since OpenBSD 7.4 with the version of Ansible we currently use
This commit is contained in:
parent
0ec343766d
commit
f4e6aabe8a
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue