Make OpenVPN use tun1 for os-node's
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This commit is contained in:
parent
91a771d738
commit
8ad630412f
2 changed files with 18 additions and 3 deletions
|
@ -19,14 +19,24 @@
|
||||||
- openvpn
|
- openvpn
|
||||||
when: ansible_distribution_major_version|int > 7 and ansible_cmdline.ostree is not defined
|
when: ansible_distribution_major_version|int > 7 and ansible_cmdline.ostree is not defined
|
||||||
|
|
||||||
|
- name: Install main config file (rhel7 and fedora)
|
||||||
|
template: src=client.conf
|
||||||
|
dest=/etc/openvpn/client/openvpn.conf
|
||||||
|
owner=root group=root mode=0644
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
- openvpn
|
||||||
|
# notify:
|
||||||
|
# - restart openvpn (Fedora)
|
||||||
|
# - restart openvpn (RHEL7)
|
||||||
|
# - restart openvpn (RHEL6)
|
||||||
|
when: ( ansible_distribution_major_version|int != 6 and ansible_distribution_major_version|int != 24) and ansible_cmdline.ostree is not defined
|
||||||
|
|
||||||
- name: Install configuration files (rhel7 and fedora)
|
- name: Install configuration files (rhel7 and fedora)
|
||||||
copy: src={{ item.file }}
|
copy: src={{ item.file }}
|
||||||
dest={{ item.dest }}
|
dest={{ item.dest }}
|
||||||
owner=root group=root mode={{ item.mode }}
|
owner=root group=root mode={{ item.mode }}
|
||||||
with_items:
|
with_items:
|
||||||
- { file: client.conf,
|
|
||||||
dest: /etc/openvpn/client/openvpn.conf,
|
|
||||||
mode: '0644' }
|
|
||||||
- { file: "{{ private }}/files/vpn/pki/issued/{{ inventory_hostname }}.crt",
|
- { file: "{{ private }}/files/vpn/pki/issued/{{ inventory_hostname }}.crt",
|
||||||
dest: "/etc/openvpn/client/client.crt",
|
dest: "/etc/openvpn/client/client.crt",
|
||||||
mode: '0600' }
|
mode: '0600' }
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
client
|
client
|
||||||
|
|
||||||
|
{% if hostname.startswith("os-node") %}
|
||||||
|
# OpenShift REALLY wants tun0. Let's make sure openvpn doesn't claim it
|
||||||
|
dev tun1
|
||||||
|
{% else %}
|
||||||
dev tun
|
dev tun
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
proto udp
|
proto udp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue