Fixing warning with ansible v2. Adding stub configuration for openvpn.

This commit is contained in:
Emiliano Vavassori 2016-03-12 17:54:01 +01:00
parent 19983d13bf
commit 692233c6f6
3 changed files with 31 additions and 1 deletions

5
ovpn-client.yml Normal file
View File

@ -0,0 +1,5 @@
---
- hosts: server
roles:
- ovpn-client

View File

@ -3,4 +3,4 @@
- name: Installazione pacchetti neth
yum: name="{{ item }}" state=present
become: yes
with_items: neth_pkgs
with_items: '{{ neth_pkgs }}'

View 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