Files
fedora-infra_ansible/roles/openvpn/base/tasks/main.yml
2015-11-26 01:27:59 +00:00

38 lines
873 B
YAML

---
# OpenVpn basic configuration
- name: Install needed package
yum: pkg={{ item }} state=present
with_items:
- openvpn
tags:
- packages
when: ansible_distribution_major_version|int < 22
- name: Install needed package (dnf)
dnf: pkg={{ item }} state=present
with_items:
- openvpn
tags:
- packages
when: ansible_distribution_major_version|int > 21 and ansible_cmdline.ostree is not defined
- name: Install certificate and key
copy: src={{ private }}/files/vpn/openvpn/keys/ca.crt
dest=/etc/openvpn/ca.crt
owner=root group=root mode=0600
tags:
- install
- openvpn
notify:
- restart openvpn (Fedora)
- restart openvpn (RHEL7)
- restart openvpn (RHEL6)
- name: install fix-routes.sh script
copy: src=fix-routes.sh
dest=/etc/openvpn/fix-routes.sh
owner=root group=root mode=0755
tags:
- openvpn