forked from LibreSchool/server-config
Fixing warning with ansible v2. Adding stub configuration for openvpn.
This commit is contained in:
parent
19983d13bf
commit
692233c6f6
5
ovpn-client.yml
Normal file
5
ovpn-client.yml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
- hosts: server
|
||||
roles:
|
||||
- ovpn-client
|
@ -3,4 +3,4 @@
|
||||
- name: Installazione pacchetti neth
|
||||
yum: name="{{ item }}" state=present
|
||||
become: yes
|
||||
with_items: neth_pkgs
|
||||
with_items: '{{ neth_pkgs }}'
|
||||
|
25
roles/ovpn-client/tasks/main.yml
Normal file
25
roles/ovpn-client/tasks/main.yml
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
# Install and configure openvpn to be a client for vpn.
|
||||
|
||||
- name: Installing openvpn
|
||||
yum:
|
||||
pkg: nethserver-openvpn
|
||||
state: present
|
||||
become: yes
|
||||
|
||||
- name: Temporarily enabling roadwarrior server
|
||||
shell: /sbin/e-smith/db configuration setprop openvpn ServerStatus enabled Network 192.168.101.1 Netmask 255.255.255.0
|
||||
become: yes
|
||||
|
||||
- name: Triggering activation
|
||||
shell: /sbin/e-smith/signal-event nethserver-openvpn-save
|
||||
become: yes
|
||||
|
||||
- name: Deconfiguring it to install client
|
||||
shell: /sbin/e-smith/db configuration setprop openvpn ServerStatus disabled
|
||||
become: yes
|
||||
|
||||
- name: Signaling disactivation
|
||||
shell: /sbin/e-smith/signal-event nethserver-openvpn-save
|
||||
|
||||
# Getting configuration from outside
|
Loading…
x
Reference in New Issue
Block a user