ansible-role-openvpn icon indicating copy to clipboard operation
ansible-role-openvpn copied to clipboard

Client CSR is not deleted CentOS 7

Open terryjrjoyce opened this issue 2 years ago • 1 comments

When revoking the clients the CA cert is not removed from the server.

Current Code

- name: Revoke certificates
  command: sh revoke.sh {{ item }}.crt
  changed_when: true
  args:
    chdir: "{{ openvpn_key_dir }}"
  with_items:
    - '{{ openvpn_revoke_these_certs }}'
    - '{{ openvpn_cert_sync_revoke | default([]) }}'

New Code

- name: Revoke client crt
  file:
    path: "{{ openvpn_key_dir }}/{{ item }}.crt"
    state: absent
    force: true
  with_items:
    - '{{ openvpn_revoke_these_certs }}'
    - '{{ openvpn_cert_sync_revoke | default([]) }}'

terryjrjoyce avatar May 24 '22 08:05 terryjrjoyce

I think this would be fixed by #186.

jbeyerstedt avatar Aug 25 '22 07:08 jbeyerstedt