mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-28 20:42:20 +08:00
38 lines
873 B
YAML
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
|