Skip to content

Commit 904ae90

Browse files
authored
Merge pull request #5 from rwese/pr-version-support-1.5.0
Pr version support 1.5.0
2 parents f2290f3 + a4c4aca commit 904ae90

File tree

4 files changed

+32
-14
lines changed

4 files changed

+32
-14
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@ Requirements
88

99
Currently you need to generate and deploy certificates before running this (see example)
1010

11+
Supported Nebula Version
12+
------------------------
13+
14+
Currently this role is tested against version `1.5.0`
15+
1116
Role Variables
1217
--------------
1318

1419
| Variable Name | Type | Purpose | Default | Required |
1520
|---|---|---|---|---|
16-
| `nebula_version` | String | Version to download | `1.3.0` | Yes |
21+
| `nebula_version` | String | Version to download | `1.5.0` | Yes |
22+
| `nebula_force_install` | Boolean | Force overwrite of the existing nebula binary | `false` | No |
1723
| `ca` | String | Path to CA file | NA | Yes |
1824
| `cert` | String | Path to Certificate | NA | Yes |
1925
| `key` | String | Path to Certificate Key| NA | Yes |

defaults/main.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
# defaults file for .
3-
nebula_version: 1.3.0
3+
nebula_version: 1.5.0
4+
5+
# force overwrite
6+
nebula_force_install: false
47

58
# this will cause net.ipv4.ip_forward to be set to 1 to allow unsafe routes
69
enable_ip_forward: false
@@ -36,8 +39,8 @@ listen:
3639
host: 0.0.0.0
3740
port: 4242
3841

39-
punchy: true
40-
punch_back: true
42+
punchy: "true"
43+
punch_back: "true"
4144

4245
outbound:
4346
- port: any

tasks/main.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
when: enable_ip_forward
44
sysctl:
55
name: net.ipv4.ip_forward
6-
value: '1'
6+
value: "1"
77
state: present
88
notify:
99
- Restart_nebula
@@ -14,7 +14,7 @@
1414
dest: /bin
1515
remote_src: yes
1616
mode: 0755
17-
creates: /bin/nebula
17+
creates: "{{ '/bin/nebula' if nebula_force_install == false else '' }}"
1818
when: ansible_architecture == "x86_64"
1919

2020
- name: Download release from Github (arm64)
@@ -23,7 +23,7 @@
2323
dest: /bin
2424
remote_src: yes
2525
mode: 0755
26-
creates: /bin/nebula
26+
creates: "{{ '/bin/nebula' if nebula_force_install == false else '' }}"
2727
when: ansible_architecture == "armv64" or ansible_architecture == "aarch64"
2828

2929
- name: Download release from Github (arm7)
@@ -32,29 +32,29 @@
3232
dest: /bin
3333
remote_src: yes
3434
mode: 0755
35-
creates: /bin/nebula
35+
creates: "{{ '/bin/nebula' if nebula_force_install == false else '' }}"
3636
when: ansible_architecture == "armv7l"
3737

3838
- name: Set correct user and group on the nebula binary
3939
ansible.builtin.file:
4040
path: /bin/nebula
4141
owner: root
4242
group: root
43-
mode: '0750'
43+
mode: "0750"
4444

4545
- name: Create configuration directory
4646
file:
4747
path: /etc/nebula
4848
state: directory
49-
mode: '0750'
49+
mode: "0750"
5050

5151
- name: Deploy configuration template
5252
ansible.builtin.template:
5353
src: templates/config.yaml.j2
5454
dest: /etc/nebula/config.yaml
5555
owner: root
5656
group: root
57-
mode: '0600'
57+
mode: "0600"
5858
register: nebula_config
5959
notify:
6060
- Restart_nebula

templates/config.yaml.j2

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,24 @@ listen:
3838
{% if listen.read_buffer is defined %}read_buffer: {{ listen.read_buffer | default("10485760") }}{% endif %}
3939
{% if listen.write_buffer is defined %}write_buffer: {{ listen.write_buffer | default("10485760") }}{% endif %}
4040

41-
punchy: {{ punchy }}
42-
punch_back: {{ punch_back }}
41+
punchy:
42+
# Continues to punch inbound/outbound at a regular interval to avoid expiration of firewall nat mappings
43+
punch: {{ punchy }}
44+
45+
# respond means that a node you are trying to reach will connect back out to you if your hole punching fails
46+
# this is extremely useful if one node is behind a difficult nat, such as a symmetric NAT
47+
# Default is false
48+
respond: {{ punch_back | default("false") }}
49+
50+
# delays a punch response for misbehaving NATs, default is 1 second, respond must be true to take effect
51+
#delay: 1s
4352

4453
{% if cipher is defined %}
4554
cipher: {{ cipher }}
4655
{% endif %}
4756

4857
{% if local_range is defined %}
49-
local_range: "{{ local_range }}"
58+
preferred_ranges: "{{ local_range }}"
5059
{% endif %}
5160

5261
{% if sshd is defined %}

0 commit comments

Comments
 (0)