From f7bb510acfabb0cc565e6bbf653633975aa3efeb Mon Sep 17 00:00:00 2001 From: jack Date: Sun, 14 Aug 2016 20:26:32 +0300 Subject: [PATCH] client cert password #45 --- algo | 17 ++++++++++++++--- config.cfg | 1 - 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/algo b/algo index c62bf664..8e1c48e2 100755 --- a/algo +++ b/algo @@ -1,5 +1,13 @@ #!/bin/sh +p12_export_password () { + echo -n " +Enter the password for p12 certificates (default: vpn): +: " + read -s P + P=${P:-vpn} +} + algo_provisioning () { echo -n " What provider would you like to use? @@ -20,12 +28,15 @@ Enter the number of your desired provider 0) CLOUD="non-cloud" ;; *) exit 1 ;; esac - - ansible-playbook "${CLOUD}.yml" + + p12_export_password + + ansible-playbook "${CLOUD}.yml" -e easyrsa_p12_export_password=${P} } user_management () { - ansible-playbook users.yml + p12_export_password + ansible-playbook users.yml -e easyrsa_p12_export_password=${P} } case "$1" in diff --git a/config.cfg b/config.cfg index c17bbf47..4daa91a0 100644 --- a/config.cfg +++ b/config.cfg @@ -3,7 +3,6 @@ easyrsa_dir: /opt/easy-rsa-ipsec easyrsa_ca_expire: 3650 easyrsa_cert_expire: 3650 -easyrsa_p12_export_password: vpn # If True re-init all existing certificates. (True or False) easyrsa_reinit_existent: False