From cd706dbf8290014b4b404255a61f6e4ed886b0a3 Mon Sep 17 00:00:00 2001 From: Evgeniy Ivanov Date: Thu, 18 Aug 2016 21:49:20 +0300 Subject: [PATCH] Update-users fixed #52 --- users.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/users.yml b/users.yml index 53b4b35..2e9e37e 100644 --- a/users.yml +++ b/users.yml @@ -7,18 +7,23 @@ vars_prompt: - name: "server_ip" - prompt: "\nEnter IP address of your server:\n" + prompt: "Enter IP address of your server: (use localhost for local installation)\n" + default: localhost private: no - name: "server_user" - prompt: "What user should we use to login on the server?:\n" + prompt: "What user should we use to login on the server? (ignore if you're deploying to localhost):\n" default: "root" private: no - name: "easyrsa_p12_export_password" prompt: "Enter the password for p12 certificates:\n" default: "vpn" - private: yes + private: yes + + - name: "IP_subject" + prompt: "Enter public IP address of your server: (IMPORTANT! This IP is used to verify the certificate)\n" + private: no tasks: - name: Add the server to the vpn-host group @@ -28,6 +33,7 @@ ansible_ssh_user: "{{ server_user }}" ansible_python_interpreter: "/usr/bin/python2.7" easyrsa_p12_export_password: "{{ easyrsa_p12_export_password }}" + IP_subject: "{{ IP_subject }}" - name: Wait for SSH to become available local_action: "wait_for port=22 host={{ server_ip }} timeout=320" @@ -39,6 +45,10 @@ become: true vars_files: - config.cfg + + pre_tasks: + - set_fact: + IP_subject_alt_name: "{{ IP_subject }}" tasks: - name: Build the client's pair