• Stars
    star
    287
  • Rank 144,232 (Top 3 %)
  • Language Jinja
  • License
    MIT License
  • Created about 10 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ansible role to install and configure OpenVPN server

Stouts.openvpn

Build Status Galaxy

Ansible role that installs an openvpn server

  • Install and setup OpenVPN server
  • Setup authentication

Requirements

Previous versions of the role supported generating certificates and keys for the OpenVPN server to use. Since version 3.0.0, such support has been removed and the users of the role are expected to use some other way of generating certificates/keys (eg using another Ansible role). See the example playbook for an example.

An EasyRSA role that was created specifically to compliment this role can be found here.

Supported platforms

  • Ubuntu 14.04
  • Ubuntu 16.04
  • Ubuntu 18.04
  • Debian 8
  • Debian 9
  • Centos 7

Variables

See defaults/main.yml for a full list of variables together with documentation on how to use them to configure this role.

Elastic Beats monitoring

Heartbeat monitor

The role comes bundled with a meta/monitors.yml template that can be used by Heartbeat to check if the OpenVPN server is up and running. The template can be configured via variables (they should be self-explanatory). To use it, you can use some Ansible tasks to upload it to your Heartbeat instance. For example:

- name: Add earth-kibana host
  add_host:
    name: heartbeat_instance
    hostname: "{{ heartbeat.hostname }}"
    ansible_host: "{{ heartbeat.ansible_host }}"
    ansible_password: "{{ heartbeat.ansible_password }}"
    ansible_user: "{{ heartbeat.ansible_user }}"

- name: Upload role monitors
  template:
    src: "{{ item.1 + '/' + item.0 }}/meta/monitors.yml"
    dest: "/etc/heartbeat/monitors.d/{{ inventory_hostname }}.{{ item.0.split('.')[-1] }}.yml"
  when: (item.1 + '/' + item.0 + '/meta/monitors.yml') is file
  loop: "{{ roles | product(lookup('config', 'DEFAULT_ROLES_PATH')) | list }}"
  delegate_to: heartbeat_instance

Filebeat input

The role also includes a filebeat input file that can be uploaded to a filebeat server. The input reads the OpenVPN log and reads the lines that correspond to successful connections. The role includes an Elasticsearch ingest pipeline that can be imported to Elasticsearch to parse and break the log lines into fields. The files can be found under the meta/ folder.

Example playbook

See molecule/default/converge.yml for a working example of how to use this role.

License

Licensed under the MIT License. See the LICENSE file for details.

Feedback, bug-reports, requests, ...

...are welcome!

More Repositories

1

Stouts.backup

Ansible role to backup files, databases
Shell
150
star
2

Stouts.mongodb

Ansible role which manage MongoDB
Shell
76
star
3

Stouts.grafana

Ansible role which Installs and setups Grafana metrics dashboard
Makefile
54
star
4

Stouts.jenkins

Ansible role which manage Jenkins CI
Makefile
41
star
5

Stouts.sentry

Ansible role which manage Sentry
Python
40
star
6

Stouts.iptables

Ansible role which manage iptables rules
Shell
27
star
7

Stouts.nginx

Ansible role which simple manage nginx
Shell
17
star
8

Stouts.postfix

Ansible role which manage postfix
Makefile
17
star
9

Stouts.python

Ansible role which manage python (pip, virtualenv)
Python
16
star
10

Stouts.elasticsearch

Ansible role for Elasticsearch
Shell
15
star
11

Stouts.django

Ansible role for Django projects
15
star
12

Stouts.collectd

Ansible role to install and configure Collectd
Makefile
14
star
13

Stouts.wale

Ansible role which to perform continuous archiving of PostgreSQL WAL files
Shell
12
star
14

Stouts.supervisor

Ansible role which manage supervisor
Shell
12
star
15

Stouts.timezone

Ansible role which manage timezone
Makefile
10
star
16

Stouts.sudo

Manage sudoers
Makefile
9
star
17

Stouts.limits

Ansible role which manage system limis.
Makefile
9
star
18

Stouts.rabbitmq

Ansible role which manage RabbitMQ
Makefile
8
star
19

Stouts.redis

Ansible role which manage redis
HTML
7
star
20

Stouts.hostname

Ansible role for hostname managing
Makefile
7
star
21

Stouts.apt

Ansible role which manages apt
Shell
7
star
22

Stouts.celery

Ansible role wich manage celery
Makefile
7
star
23

Stouts.wsgi

Ansible role to setup and run WSGI applications
Shell
7
star
24

Stouts.users

Manage users and groups
Makefile
6
star
25

Stouts.nodejs

Ansible role which manage nodejs and npm
Shell
6
star
26

Django-application

Deploy Django application with ansible
Python
5
star
27

Stouts.deploy

Ansible role (just create base directories and define base variables)
5
star
28

Stouts.openssh

Ansible role which installs and setups OpenSSH (client and server)
Makefile
4
star
29

Stouts.graphite-api

Ansible role to install and configure Graphite API service
Shell
3
star
30

Stouts.source

Ansible role for get application source code from git or mercurial repositoires
Makefile
3
star
31

Stouts.foundation

Just proxy to some ansibles recipes
3
star
32

Stouts.notify

Ansible role wich send email notify when doing provision
Makefile
2
star
33

Stouts.ntp

Ansible role to install and setup NTP
Shell
2
star
34

Stouts.ruby

There is an Ansible role which installs ruby and ruby gems.
Makefile
2
star
35

Stouts.locale

Ansible role which manage system locales
Makefile
2
star
36

Stouts.logstash

Ansible role to install and configure Logstash
Shell
2
star
37

Stouts.denyhosts

Ansible role which manage Denyhosts
Python
2
star
38

Stouts.resources

Ansible role (copy files from your inventory directory to remote server)
Makefile
1
star
39

Stouts.ansible

Install and configure Ansible
Shell
1
star
40

Stouts.statsd

Ansible role to install and configure Statsd
Shell
1
star
41

Stouts.kibana

Ansible role to install and configure Elasticsearch Kibana
Makefile
1
star
42

Stouts.docker-backup

Ansible role to backup docker volumes
Makefile
1
star
43

Stouts.yum

Ansible role which manages Yum package manager
Makefile
1
star
44

Stouts.heka

Ansible role which manage Mozilla Heka
Makefile
1
star
45

Stouts.graphite-beacon

Ansible role to install and configure Graphite-beacon (alerting dashboard)
Makefile
1
star
46

Stouts.docker-registry

Ansible role to setup and run docker-registry
Shell
1
star
47

Stouts.memcached

Ansible role which manages Memcached
Makefile
1
star
48

Stouts.pull

Ansible role which manage ansible-pull
Shell
1
star