Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Commit f17e5de

Browse files
committed
initial commit
0 parents  commit f17e5de

File tree

16 files changed

+319
-0
lines changed

16 files changed

+319
-0
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
root = true
2+
3+
[*.yml]
4+
insert_final_newline = true
5+
indent_style = space
6+
indent_size = 2

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
yggdrasil
2+
=========
3+
4+
Deploy yggdrasil using Ansible.
5+
6+
Dependencies
7+
------------
8+
9+
ansible_lsb needs additional packages on some systems,
10+
those need to be available
11+
12+
13+
Role Variables
14+
--------------
15+
16+
For available variables take a look at the config template,
17+
it is currently the only place with variables.
18+
19+
Example Playbook
20+
----------------
21+
22+
- hosts: servers
23+
roles:
24+
- role: yggdrasil
25+
become: yes
26+
27+
License
28+
-------
29+
30+
AGPLv3
31+
32+
Author Information
33+
------------------
34+
35+
Jan Christian Grünhage <[email protected]>

defaults/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# defaults file for yggdrasil
3+
yggdrasil_listen_address: "[::]:61216"
4+
yggdrasil_admin_listen_address: "unix:///var/run/yggdrasil.sock"
5+
yggdrasil_peers: []
6+
yggdrasil_interface_peer_interfaces: []
7+
yggdrasil_allowed_encryption_public_keys: []
8+
yggdrasil_multicast_interfaces: [ ".*" ]

files/fedora/yggdrasil.repo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[yggdrasil]
2+
name = Yggdrasil
3+
baseurl = https://neilalexander.s3.eu-west-2.amazonaws.com/rpm/
4+
gpgcheck=1

handlers/main.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
# handlers file for yggdrasil
3+
- name: restart yggdrasil using service
4+
service:
5+
name: yggdrasil
6+
enabled: true
7+
state: restarted
8+
when: ansible_lsb.id is not "Void"
9+
listen: restart yggdrasil
10+
11+
- name: restart yggdrasil using runit
12+
runit:
13+
name: yggdrasil
14+
enabled: true
15+
state: restarted
16+
when: ansible_lsb.id is "Void"
17+
listen: restart yggdrasil

meta/main.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
galaxy_info:
3+
author: Jan Christian Grünhage <[email protected]>
4+
description: Install and configure yggdrasil
5+
6+
license: AGPLv3
7+
8+
min_ansible_version: 2.5
9+
10+
galaxy_tags: []
11+
12+
dependencies: []

tasks/configure.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
- import_tasks: configure/configuration.yml
3+
- import_tasks: configure/service.yml

tasks/configure/configuration.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
- name: template configuration
3+
template:
4+
src: yggdrasil.conf.j2
5+
dest: /etc/yggdrasil.conf
6+
notify: restart yggdrasil

tasks/configure/service.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
- name: start yggdrasil
3+
service:
4+
name: yggdrasil
5+
enabled: true
6+
state: started
7+
when: ansible_lsb.id is not "Void"
8+
9+
# This separate entry here is needed because
10+
# the service module does not support runit
11+
- name: start yggdrasil
12+
runit:
13+
name: yggdrasil
14+
enabled: true
15+
state: started
16+
when: ansible_lsb.id is "Void"

tasks/install.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
- import_tasks: install/void.yml
3+
when: ansible_lsb.id is "VoidLinux"
4+
5+
- import_tasks: install/fedora.yml
6+
when: ansible_lsb.id is "Fedora" or ansible_lsb.id is "CentOS"
7+
8+
- import_tasks: install/debian.yml
9+
when: ansible_lsb.id is "Debian" or ansible_lsb.id is "Ubuntu"
10+
11+
# TODO: Support more distros (and maybe even Windows one day)

0 commit comments

Comments
 (0)