Skip to content
Snippets Groups Projects
Commit ecb3d61f authored by Shahaan Ayyub's avatar Shahaan Ayyub
Browse files

Changed server to ansible_fqdn

parent 9a0f2a69
No related branches found
No related tags found
No related merge requests found
......@@ -2,10 +2,10 @@
-
name: "Check if certificate exist"
register: cert
stat: "path=/etc/easy-rsa/2.0/keys/{{ server }}.crt"
stat: "path=/etc/easy-rsa/2.0/keys/{{ ansible_fqdn }}.crt"
-
name: "Creating Server certificate"
shell: " cd /etc/easy-rsa/2.0; source ./vars; export EASY_RSA=\"${EASY_RSA:-.}\"; \"$EASY_RSA/pkitool\" --server {{ server }}"
shell: " cd /etc/easy-rsa/2.0; source ./vars; export EASY_RSA=\"${EASY_RSA:-.}\"; \"$EASY_RSA/pkitool\" --server {{ ansible_fqdn }}"
when: "cert.stat.exists == false"
-
name: "Check if Diffie Hellman parameters file exist"
......
---
-
hosts: openvpn-clients
remote_user: ec2-user
roles:
- easy-rsa-CA-client
- OpenVPN-Client
sudo: true
vars:
ansible_ssh_private_key_file: /root/.ssh/shahaan.pem
ansible_ssh_user: ec2-user
server: "vm-118-138-240-224.erc.monash.edu.au"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment