openvpn/tasks/install.yml
2020-08-17 11:48:37 +02:00

40 lines
860 B
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
- name: 'openvpn | update APT Cache'
apt:
update_cache: yes
cache_valid_time: 3600
tags: ['openvpn', 'openvpn_install']
- name: 'openvpn | install packages'
apt:
name:
- openvpn
- openssl
- easy-rsa
state: present
tags: ['openvpn', 'openvpn_install']
- name: 'openvpn | create directories'
file:
path: /etc/openvpn/{{ ansible_hostname }}/keys
state: directory
mode: '0755'
tags: ['openvpn', 'openvpn_install']
- name: 'openvpn | copy easy-rsa'
copy:
src: /usr/share/easy-rsa
dest: /etc/openvpn/{{ ansible_hostname }}
owner: root
group: root
tags: ['openvpn', 'openvpn_install']
- name: 'openvpn | chmod +x easyrsa'
file:
path: /etc/openvpn/{{ ansible_hostname }}/easy-rsa/easyrsa
owner: root
group: root
mode: 0755
tags: ['openvpn', 'openvpn_install']