Install nginx from package manager if available

This commit is contained in:
Jake Howard 2023-12-24 19:38:58 +00:00
parent bd15946f3b
commit 593a945c5c
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -5,14 +5,29 @@
mode: "0700" mode: "0700"
become: true become: true
- name: Install nebula
package:
name: nebula
when: ansible_os_family == 'Archlinux'
become: true
- name: Manually install nebula
block:
- name: Install binaries - name: Install binaries
unarchive: unarchive:
src: https://github.com/slackhq/nebula/releases/download/v{{ nebula_version }}/nebula-linux-amd64.tar.gz src: https://github.com/slackhq/nebula/releases/download/v{{ nebula_version }}/nebula-linux-amd64.tar.gz
dest: /usr/bin dest: /usr/bin
remote_src: true remote_src: true
mode: "0755" mode: "0755"
become: true
- 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"
when: ansible_os_family != 'Archlinux'
notify: restart nebula notify: restart nebula
become: true
- name: Install config - name: Install config
template: template:
@ -41,13 +56,6 @@
become: true become: true
notify: restart nebula 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 - name: Enable service
service: service:
name: nebula name: nebula