This commit is contained in:
parent
1a0e26a998
commit
3bffb1b180
@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: Restart openvpn client
|
||||
service:
|
||||
name: "openvpn@{{ openvpn_client_name }}"
|
||||
name: "{{ __openvpn_service_prefix }}@{{ openvpn_client_name }}"
|
||||
state: "{{ 'restarted' if openvpn_service_state == 'started' else 'stopped' }}"
|
||||
enabled: yes
|
||||
listen: __openvpn_restart
|
||||
|
@ -32,26 +32,18 @@
|
||||
dest: "{{ item.dest }}"
|
||||
mode: "{{ item.mode }}"
|
||||
loop:
|
||||
- {
|
||||
src: "{{ openvpn_client_ca_source | default('') }}",
|
||||
dest: "/etc/openvpn/certs/{{ openvpn_client_ca_file }}",
|
||||
mode: "0640",
|
||||
}
|
||||
- {
|
||||
src: "{{ openvpn_client_cert_source | default('') }}",
|
||||
dest: "/etc/openvpn/certs/{{ openvpn_client_cert_file }}",
|
||||
mode: "0640",
|
||||
}
|
||||
- {
|
||||
src: "{{ openvpn_client_key_source | default('') }}",
|
||||
dest: "/etc/openvpn/certs/{{ openvpn_client_key_file }}",
|
||||
mode: "0600",
|
||||
}
|
||||
- {
|
||||
src: "{{ openvpn_client_ta_source | default('') }}",
|
||||
dest: "/etc/openvpn/certs/{{ openvpn_client_ta_file }}",
|
||||
mode: "0600",
|
||||
}
|
||||
- src: "{{ openvpn_client_ca_source | default('') }}"
|
||||
dest: "/etc/openvpn/certs/{{ openvpn_client_ca_file }}"
|
||||
mode: "0640"
|
||||
- src: "{{ openvpn_client_cert_source | default('') }}"
|
||||
dest: "/etc/openvpn/certs/{{ openvpn_client_cert_file }}"
|
||||
mode: "0640"
|
||||
- src: "{{ openvpn_client_key_source | default('') }}"
|
||||
dest: "/etc/openvpn/certs/{{ openvpn_client_key_file }}"
|
||||
mode: "0600"
|
||||
- src: "{{ openvpn_client_ta_source | default('') }}"
|
||||
dest: "/etc/openvpn/certs/{{ openvpn_client_ta_file }}"
|
||||
mode: "0600"
|
||||
loop_control:
|
||||
label: "{{ item.dest }}"
|
||||
when: item.src | length > 0
|
||||
|
Loading…
Reference in New Issue
Block a user