toansible: Add protonvpn installation
This commit is contained in:
parent
c90c5457f0
commit
f531c08f23
4 changed files with 47 additions and 17 deletions
17
configs.yml
17
configs.yml
|
@ -36,23 +36,6 @@ repos:
|
||||||
- include:
|
- include:
|
||||||
- repos.yml
|
- repos.yml
|
||||||
|
|
||||||
protonvpn:
|
|
||||||
- install:
|
|
||||||
- openvpn
|
|
||||||
- clone:
|
|
||||||
url: https://aur.archlinux.org/openvpn-update-systemd-resolved.git
|
|
||||||
dest: ~/builds/openvpn-update-systemd-resolved
|
|
||||||
condition: arch
|
|
||||||
- run:
|
|
||||||
command: cd ~/builds/openvpn-update-systemd-resolved && makepkg -cirs --needed
|
|
||||||
condition: arch
|
|
||||||
- run:
|
|
||||||
- sudo cp ~/src/secrets/setup-cockpit/protonvpn_confs/*.conf /etc/openvpn/client/
|
|
||||||
- run:
|
|
||||||
- sudo cp ~/src/secrets/setup-cockpit/protonvpn_confs/pvpn.auth /etc/openvpn/client/
|
|
||||||
- run:
|
|
||||||
- sudo systemctl enable openvpn-client@fr.protonvpn.com.udp.service
|
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
- install:
|
- install:
|
||||||
- mariadb
|
- mariadb
|
||||||
|
|
|
@ -37,3 +37,5 @@
|
||||||
tags: lilypond
|
tags: lilypond
|
||||||
- role: latex
|
- role: latex
|
||||||
tags: latex
|
tags: latex
|
||||||
|
- role: protonvpn
|
||||||
|
tags: protonvpn
|
||||||
|
|
3
roles/protonvpn/meta/main.yml
Normal file
3
roles/protonvpn/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: git
|
42
roles/protonvpn/tasks/main.yml
Normal file
42
roles/protonvpn/tasks/main.yml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
---
|
||||||
|
- name: Install packages (Archlinux)
|
||||||
|
become: true
|
||||||
|
pacman:
|
||||||
|
name:
|
||||||
|
- openvpn
|
||||||
|
when: ansible_distribution == 'Archlinux'
|
||||||
|
|
||||||
|
- name: Install packages (Debian)
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- openvpn
|
||||||
|
when: ansible_distribution == 'Debian'
|
||||||
|
|
||||||
|
- name: Clone openvpn-update-systemd-resolved
|
||||||
|
git:
|
||||||
|
repo: https://aur.archlinux.org/openvpn-update-systemd-resolved.git
|
||||||
|
dest: ~/builds/openvpn-update-systemd-resolved
|
||||||
|
clone: yes
|
||||||
|
when: ansible_distribution == 'Archlinux'
|
||||||
|
|
||||||
|
- name: Make and install openvpn-update-systemd-resolved
|
||||||
|
command:
|
||||||
|
cmd: makepkg -cirs --needed
|
||||||
|
chdir: ~/builds/openvpn-update-systemd-resolved
|
||||||
|
when: ansible_distribution == 'Archlinux'
|
||||||
|
|
||||||
|
- name: Copy client confs
|
||||||
|
become: true
|
||||||
|
copy:
|
||||||
|
src: "{{ ansible_facts.user_dir }}/src/secrets/setup-cockpit/protonvpn_confs/"
|
||||||
|
dest: /etc/openvpn/client/
|
||||||
|
mode: 0644
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
remote_src: yes
|
||||||
|
|
||||||
|
- name: Enable protonvpn service
|
||||||
|
systemd:
|
||||||
|
name: openvpn-client@fr.protonvpn.com.udp
|
||||||
|
enabled: true
|
Loading…
Add table
Reference in a new issue