|
8 | 8 | notify:
|
9 | 9 | - Restart_nebula
|
10 | 10 |
|
| 11 | +- name: Ensure nebula bin directory exists |
| 12 | + file: |
| 13 | + path: "{{ nebula_bin_directory }}" |
| 14 | + state: directory |
| 15 | + |
11 | 16 | - name: Download release from Github (x86)
|
12 | 17 | unarchive:
|
13 | 18 | src: https://github.com/slackhq/nebula/releases/download/v{{ nebula_version }}/nebula-{{ ansible_system|lower }}-amd64.tar.gz
|
14 |
| - dest: /bin |
| 19 | + dest: "{{ nebula_bin_directory }}" |
15 | 20 | remote_src: yes
|
16 | 21 | mode: 0755
|
17 |
| - creates: "{{ '/bin/nebula' if nebula_force_install == false else '' }}" |
| 22 | + creates: "{{ (nebula_bin_directory + '/nebula') if nebula_force_install == false else '' }}" |
18 | 23 | when: ansible_architecture == "x86_64"
|
19 | 24 |
|
20 | 25 | - name: Download release from Github (arm64)
|
21 | 26 | unarchive:
|
22 | 27 | src: https://github.com/slackhq/nebula/releases/download/v{{ nebula_version }}/nebula-{{ ansible_system|lower }}-arm64.tar.gz
|
23 |
| - dest: /bin |
| 28 | + dest: "{{ nebula_bin_directory }}" |
24 | 29 | remote_src: yes
|
25 | 30 | mode: 0755
|
26 |
| - creates: "{{ '/bin/nebula' if nebula_force_install == false else '' }}" |
| 31 | + creates: "{{ (nebula_bin_directory + '/nebula') if nebula_force_install == false else '' }}" |
27 | 32 | when: ansible_architecture == "armv64" or ansible_architecture == "aarch64"
|
28 | 33 |
|
29 | 34 | - name: Download release from Github (arm7)
|
30 | 35 | unarchive:
|
31 | 36 | src: https://github.com/slackhq/nebula/releases/download/v{{ nebula_version }}/nebula-{{ ansible_system|lower }}-arm-7.tar.gz
|
32 |
| - dest: /bin |
| 37 | + dest: "{{ nebula_bin_directory }}" |
33 | 38 | remote_src: yes
|
34 | 39 | mode: 0755
|
35 |
| - creates: "{{ '/bin/nebula' if nebula_force_install == false else '' }}" |
| 40 | + creates: "{{ (nebula_bin_directory + '/nebula') if nebula_force_install == false else '' }}" |
36 | 41 | when: ansible_architecture == "armv7l"
|
37 | 42 |
|
38 | 43 | - name: Set correct user and group on the nebula binary
|
39 | 44 | ansible.builtin.file:
|
40 |
| - path: /bin/nebula |
| 45 | + path: "{{ nebula_bin_directory }}/nebula" |
41 | 46 | owner: root
|
42 | 47 | group: root
|
43 |
| - mode: "0750" |
| 48 | + mode: '0750' |
| 49 | + |
| 50 | +- name: Set correct user and group on the nebula-cert binary |
| 51 | + ansible.builtin.file: |
| 52 | + path: "{{ nebula_bin_directory }}/nebula-cert" |
| 53 | + owner: root |
| 54 | + group: root |
| 55 | + mode: '0750' |
44 | 56 |
|
45 | 57 | - name: Create configuration directory
|
46 | 58 | file:
|
|
60 | 72 | - Restart_nebula
|
61 | 73 |
|
62 | 74 | - name: Verify configuration
|
63 |
| - ansible.builtin.command: /bin/nebula -test -config /etc/nebula/config.yaml 1>/dev/null |
| 75 | + ansible.builtin.command: "{{ nebula_bin_directory }}/nebula -test -config /etc/nebula/config.yaml 1>/dev/null" |
64 | 76 | changed_when: false
|
65 | 77 |
|
66 | 78 | - name: Deploy systemd template
|
|
0 commit comments