CCDs to be deleted in a separate list.

This commit is contained in:
Andrea Dell'Amico 2023-10-30 17:13:05 +01:00
parent bf91aeb58f
commit 562df8844e
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 1 additions and 3 deletions

View File

@ -95,14 +95,12 @@
group: "{{ openvpn_unprivileged_group }}"
mode: "0440"
loop: '{{ openvpn_users_customizations | default([]) }}'
when: item.state is not defined or item.state == "present"
tags: ['openvpn', 'openvpn_conf', 'openvpn_ccd']
- name: openvpn | Remove some ccd configurations
ansible.builtin.file:
dest: "{{ openvpn_conf_dir }}/ccd/{{ item.cn }}"
state: absent
loop: '{{ openvpn_users_customizations | default([]) }}'
when: item.state defined and item.state == "absent"
loop: '{{ openvpn_users_to_be_removed | default([]) }}'
tags: ['openvpn', 'openvpn_conf', 'openvpn_ccd']
- name: openvpn | Install the easy-rsa package on servers when we use the certificate authentication
ansible.builtin.apt: