Delete the CA key

This commit is contained in:
Jack Ivanov 2017-01-14 19:24:23 +03:00
parent 072eb2cc53
commit 40079f3be6
2 changed files with 16 additions and 1 deletions

6
algo
View file

@ -50,6 +50,12 @@ Do you want the VPN to support Windows 10 clients? (requires RSA certificates an
Win10_Enabled=${Win10_Enabled:-n} Win10_Enabled=${Win10_Enabled:-n}
if [[ "$Win10_Enabled" =~ ^(y|Y)$ ]]; then EXTRA_VARS+=" Win10_Enabled=Y"; fi if [[ "$Win10_Enabled" =~ ^(y|Y)$ ]]; then EXTRA_VARS+=" Win10_Enabled=Y"; fi
read -p "
Do you want to delete the CA key? (if you choose 'yes', you cannot update users)
[Y/n]: " -r Delete_CAKEY
Delete_CAKEY=${Delete_CAKEY:-y}
if [[ "$Delete_CAKEY" =~ ^(y|Y)$ ]]; then EXTRA_VARS+=" Delete_CAKEY=Y"; fi
} }
deploy () { deploy () {

View file

@ -64,8 +64,17 @@
- debug: msg="{{ additional_information.split('\n') }}" - debug: msg="{{ additional_information.split('\n') }}"
tags: cloud tags: cloud
- name: Save the CA key - name: Save the CA key password
local_action: > local_action: >
shell echo "{{ easyrsa_CA_password }}" > /tmp/ca_password shell echo "{{ easyrsa_CA_password }}" > /tmp/ca_password
become: no become: no
tags: tests tags: tests
- name: Delete the CA key
local_action:
module: file
path: "configs/{{ IP_subject_alt_name }}/pki/private/cakey.pem"
state: absent
become: no
tags: always
when: Delete_CAKEY is defined and Delete_CAKEY == "Y"