Skip to content
Snippets Groups Projects
Commit 99410a35 authored by Jupiter Hu's avatar Jupiter Hu
Browse files

Fixed merge complit

parents ebc146f6 81251ca3
No related branches found
No related tags found
No related merge requests found
...@@ -11,9 +11,6 @@ ...@@ -11,9 +11,6 @@
- nfs-server - nfs-server
sudo: true sudo: true
vars: vars:
ansible_ssh_private_key_file: "/home/sgeadmin/.ssh/shahaan.pem"
ansible_ssh_user: "ec2-user"
nfs_network: "10.8.0.0/16"
x509_ca_server: vm-118-138-240-224.erc.monash.edu.au x509_ca_server: vm-118-138-240-224.erc.monash.edu.au
- -
hosts: openvpn-clients hosts: openvpn-clients
...@@ -23,12 +20,10 @@ ...@@ -23,12 +20,10 @@
- easy-rsa-certificate - easy-rsa-certificate
- OpenVPN-Client - OpenVPN-Client
- nfs-common - nfs-common
- syncExports
- nfs-client - nfs-client
sudo: true sudo: true
vars: vars:
ansible_ssh_private_key_file: "/home/sgeadmin/.ssh/shahaan.pem"
ansible_ssh_user: "ec2-user"
x509_ca_server: vm-118-138-240-224.erc.monash.edu.au x509_ca_server: vm-118-138-240-224.erc.monash.edu.au
openvpn_servers: ['vm-118-138-240-224.erc.monash.edu.au'] openvpn_servers: ['vm-118-138-240-224.erc.monash.edu.au']
server: vm-118-138-240-224.erc.monash.edu.au nfs_server: "vm-118-138-240-224.erc.monash.edu.au"
nfs_server: "10.8.0.1"
...@@ -93,7 +93,7 @@ dh {{ dhparms_file }} ...@@ -93,7 +93,7 @@ dh {{ dhparms_file }}
# Each client will be able to reach the server # Each client will be able to reach the server
# on 10.8.0.1. Comment this line out if you are # on 10.8.0.1. Comment this line out if you are
# ethernet bridging. See the man page for more info. # ethernet bridging. See the man page for more info.
server 10.8.0.0 255.255.255.0 server {{ server_network }} {{ server_netmask }}
# Maintain a record of client <-> virtual IP address # Maintain a record of client <-> virtual IP address
# associations in this file. If OpenVPN goes down or # associations in this file. If OpenVPN goes down or
......
---
x509_csr_args: "--server"
x509_cacert_file: "/etc/ssl/certs/ca.crt"
x509_key_file: "/etc/openvpn/private/server.key"
x509_cert_file: "/etc/openvpn/certs/server.crt"
x509_common_name: "{{ ansible_fqdn }}_OpenVPN_Server"
dhparms_file: "/etc/openvpn/private/dh.pem"
server_network: "10.8.0.0"
server_netmask: "255.255.255.0"
...@@ -8,4 +8,3 @@ ...@@ -8,4 +8,3 @@
- name: "Start the Server" - name: "Start the Server"
service: "name=nfs state=restarted" service: "name=nfs state=restarted"
sudo: true sudo: true
{{ nfsServerSrcDir }} {{ nfs_network }}{{ nfsServerMountOption }}
---
-
name: "Templating /etc/exports"
template: src=exports.j2 dest=/etc/exports owner=root group=root mode=644
delegate_to: "{{ nfs_server }}"
run_once: true
---
- include : addExports.yml
{% for src in srcDir %}
{{ src }} {% for node in groups['openvpn-clients'] %}{% for ip in hostvars[node]['ansible_all_ipv4_addresses'] %}{{ ip }}(rw,sync,root_squash) {% endfor %}{% endfor %}
{% endfor %}
---
-
hosts: openvpn-clients
remote_user: ec2-user
roles:
- syncExports
- nfs-client
sudo: true
vars:
nfs_server: "vm-118-138-240-224.erc.monash.edu.au"
openvpn_servers:
- vm-118-138-240-224.erc.monash.edu.au
x509_ca_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