Add platform-agnostic installation of nebula
This commit is contained in:
parent
723372dd09
commit
92815a6f76
3 changed files with 32 additions and 8 deletions
5
ansible/roles/nebula/handlers/main.yml
Normal file
5
ansible/roles/nebula/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
- name: restart nebula
|
||||
service:
|
||||
name: nebula
|
||||
state: reloaded
|
||||
become: true
|
|
@ -1,19 +1,36 @@
|
|||
- name: Install Nebula
|
||||
package:
|
||||
name: nebula
|
||||
when: ansible_os_family == 'Archlinux'
|
||||
become: true
|
||||
|
||||
- name: Create nebula directory
|
||||
- name: Create config directory
|
||||
file:
|
||||
path: /etc/nebula
|
||||
state: directory
|
||||
mode: "0700"
|
||||
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:
|
||||
src: files/nebula.yml
|
||||
dest: /etc/nebula/config.yml
|
||||
mode: "0600"
|
||||
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
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
nebula_lighthouse_public_ip: "{{ hosts.casey_ip }}"
|
||||
nebula_lighthouse_ip: "{{ nebula.clients.casey.ip }}"
|
||||
nebula_lighthouse_port: 6328
|
||||
|
||||
nebula_version: 1.3.0
|
||||
|
|
Loading…
Reference in a new issue