Add platform-agnostic installation of nebula

This commit is contained in:
Jake Howard 2021-01-30 19:10:52 +00:00
parent 723372dd09
commit 92815a6f76
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 32 additions and 8 deletions

View file

@ -0,0 +1,5 @@
- name: restart nebula
service:
name: nebula
state: reloaded
become: true

View file

@ -1,19 +1,36 @@
- name: Install Nebula - name: Create config directory
package:
name: nebula
when: ansible_os_family == 'Archlinux'
become: true
- name: Create nebula directory
file: file:
path: /etc/nebula path: /etc/nebula
state: directory state: directory
mode: "0700" mode: "0700"
become: true become: true
- name: Install nebula config - name: Install binaries
unarchive:
src: https://github.com/slackhq/nebula/releases/download/v{{ nebula_version }}/nebula-linux-amd64.tar.gz
dest: /usr/bin
remote_src: yes
mode: "0755"
become: true
notify: restart nebula
- name: Install config
template: template:
src: files/nebula.yml src: files/nebula.yml
dest: /etc/nebula/config.yml dest: /etc/nebula/config.yml
mode: "0600" mode: "0600"
become: true become: true
notify: restart nebula
- name: Install service
get_url:
url: https://raw.githubusercontent.com/slackhq/nebula/v{{ nebula_version }}/dist/arch/nebula.service
dest: /usr/lib/systemd/system/nebula.service
mode: '0644'
become: true
- name: Enable service
service:
name: nebula
enabled: true
become: true

View file

@ -1,3 +1,5 @@
nebula_lighthouse_public_ip: "{{ hosts.casey_ip }}" nebula_lighthouse_public_ip: "{{ hosts.casey_ip }}"
nebula_lighthouse_ip: "{{ nebula.clients.casey.ip }}" nebula_lighthouse_ip: "{{ nebula.clients.casey.ip }}"
nebula_lighthouse_port: 6328 nebula_lighthouse_port: 6328
nebula_version: 1.3.0