4 - vpn_mode|default() in ('user-server', 'vpc-server', 'vpc-client')
11 - vpn_server_ip|default() != ''
12 when: vpn_mode|default() == 'vpc-client'
15 - name: Install packages
23 - name: Install pip things
30 - name: openvpn config directories
36 path: /etc/openvpn/{{ item }}
41 - name: openvpn cert directory
44 path: /etc/openvpn/keys
49 - name: openvpn log directory
52 path: /var/log/openvpn
57 - name: openvpn log files
65 path: /var/log/openvpn/{{ item }}
70 - name: install scripts
71 when: vpn_mode == 'user-server'
77 dest: /etc/openvpn/scripts/{{ item }}
82 - name: generate dh parameters
83 command: /usr/bin/openssl dhparam -out /etc/openvpn/keys/dh.pem 4096
85 creates: /etc/openvpn/keys/dh.pem
87 - name: configure openvpn
89 src: "{{ vpn_mode }}.conf.j2"
90 dest: /etc/openvpn/{{ vpc_region }}-{{ vpn_mode }}.conf
97 - name: enable openvpn
104 - name: configure log shipping
106 src: awslogs.openvpn.conf
107 dest: /etc/awslogs/config/openvpn.conf