diff --git a/openvpn/tasks/openvpn.yml b/openvpn/tasks/openvpn.yml index 41551471..d050ba7c 100644 --- a/openvpn/tasks/openvpn.yml +++ b/openvpn/tasks/openvpn.yml @@ -103,13 +103,15 @@ - name: Get the dh file from the master host synchronize: src: '{{ openvpn_conf_dir }}/dh2048.pem' - dest: 'rsync://root@{{ ansible_fqdn }}/{{ openvpn_conf_dir }}/dh2048.pem' + #dest: 'rsync://root@{{ ansible_fqdn }}/{{ openvpn_conf_dir }}/dh2048.pem' + dest: '/{{ openvpn_conf_dir }}/dh2048.pem' delegate_to: '{{ openvpn_master_host }}' - name: Get the ta key from the master host synchronize: src: '{{ openvpn_conf_dir }}/ta.key' - dest: 'rsync://root@{{ ansible_fqdn }}/{{ openvpn_conf_dir }}/ta.key' + #dest: 'rsync://root@{{ ansible_fqdn }}/{{ openvpn_conf_dir }}/ta.key' + dest: '/{{ openvpn_conf_dir }}/ta.key' delegate_to: '{{ openvpn_master_host }}' when: @@ -117,6 +119,24 @@ - not openvpn_is_master_host tags: [ 'openvpn', 'openvpn_conf', 'openvpn_shared_secrets' ] +- block: + - name: Get the dh file from the master host + synchronize: + src: '{{ openvpn_conf_dir }}/dh2048.pem' + #dest: 'rsync://root@{{ ansible_fqdn }}/{{ openvpn_conf_dir }}/dh2048.pem' + dest: '/{{ openvpn_conf_dir }}/dh2048.pem' + delegate_to: '{{ openvpn_master_host }}' + + - name: Get the ta key from the master host + synchronize: + src: '{{ openvpn_conf_dir }}/ta.key' + #dest: 'rsync://root@{{ ansible_fqdn }}/{{ openvpn_conf_dir }}/ta.key' + dest: '/{{ openvpn_conf_dir }}/ta.key' + delegate_to: '{{ openvpn_master_host }}' + + when: openvpn_mode != 'server' + tags: [ 'openvpn', 'openvpn_conf', 'openvpn_shared_secrets' ] + - block: - name: Enable kernel forwarding