diff --git a/tasks/openvpn.yml b/tasks/openvpn.yml index 3f9b463..9f77b5d 100644 --- a/tasks/openvpn.yml +++ b/tasks/openvpn.yml @@ -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: