updated headscale state
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
fe6d9ab425
commit
1ad496aec9
@ -28,3 +28,22 @@ headscale-config-derp:
|
||||
- template: jinja
|
||||
- watch_in:
|
||||
- service: headscale-service
|
||||
|
||||
headscale-policy:
|
||||
file.managed:
|
||||
- name: {{ headscale.config_path }}/policy.json
|
||||
- source: salt://headscale/templates/policy.json.j2
|
||||
- user: {{ headscale.user.uid }}
|
||||
- group: {{ headscale.group.gid }}
|
||||
- template: jinja
|
||||
- watch_in:
|
||||
- service: headscale-service
|
||||
|
||||
headscale-policy-update:
|
||||
file.managed:
|
||||
- name: {{ headscale.config_path }}/update_policy.sh
|
||||
- source: salt://headscale/templates/update_policy.sh
|
||||
- user: {{ headscale.user.uid }}
|
||||
- group: {{ headscale.group.gid }}
|
||||
- watch_in:
|
||||
- service: headscale-service
|
||||
|
@ -90,17 +90,18 @@ headscale:
|
||||
enabled: false
|
||||
randomize_client_port: false
|
||||
derp_config:
|
||||
regions:
|
||||
900:
|
||||
regionid: 900
|
||||
regioncode: custom
|
||||
regionname: My Region
|
||||
nodes:
|
||||
- name: 900a
|
||||
regionid: 900
|
||||
hostname: myderp.mydomain.no
|
||||
ipv4: 123.123.123.123
|
||||
ipv6: "2604:a880:400:d1::828:b001"
|
||||
stunport: 0
|
||||
stunonly: false
|
||||
derpport: 0
|
||||
regions: {}
|
||||
#900:
|
||||
# regionid: 900
|
||||
# regioncode: custom
|
||||
# regionname: My Region
|
||||
# nodes:
|
||||
# - name: 900a
|
||||
# regionid: 900
|
||||
# hostname: myderp.mydomain.no
|
||||
# ipv4: 123.123.123.123
|
||||
# ipv6: "2604:a880:400:d1::828:b001"
|
||||
# stunport: 0
|
||||
# stunonly: false
|
||||
# derpport: 0
|
||||
policy: {}
|
||||
|
3
states/headscale/templates/policy.json.j2
Normal file
3
states/headscale/templates/policy.json.j2
Normal file
@ -0,0 +1,3 @@
|
||||
{%- from "headscale/map.jinja" import headscale with context -%}
|
||||
{{ headscale.policy|json }}
|
||||
|
4
states/headscale/templates/update_policy.sh
Normal file
4
states/headscale/templates/update_policy.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
FILENAME=/etc/headscale/policy.json
|
||||
headscale policy get | jq > $FILENAME; vim $FILENAME; headscale policy set -f $FILENAME
|
Loading…
Reference in New Issue
Block a user