mirror of
https://github.com/ben-grande/qusal.git
synced 2024-10-01 02:35:49 -04:00
chore: move port forward to dom0 formula
The script can be used with sys-cacher, sys-pihole, sys-syncthing, sys-ssh and many services you'd want to forward, make it reusable.
This commit is contained in:
parent
30f2ebe4ce
commit
b01f2d213a
@ -8,6 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
|||||||
|
|
||||||
include:
|
include:
|
||||||
- .install
|
- .install
|
||||||
|
- .port-forward
|
||||||
- .backup
|
- .backup
|
||||||
- .xorg
|
- .xorg
|
||||||
- .kde
|
- .kde
|
||||||
|
18
salt/dom0/port-forward.sls
Normal file
18
salt/dom0/port-forward.sls
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{#
|
||||||
|
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
#}
|
||||||
|
|
||||||
|
{% if grains['nodename'] == 'dom0' -%}
|
||||||
|
|
||||||
|
"{{ slsdotpath }}-port-forward-script":
|
||||||
|
file.managed:
|
||||||
|
- name: /usr/local/bin/qvm-port-forward
|
||||||
|
- source: salt://{{ slsdotpath }}/files/bin/qvm-port-forward
|
||||||
|
- mode: "0755"
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- makedirs: True
|
||||||
|
|
||||||
|
{% endif -%}
|
10
salt/dom0/port-forward.top
Normal file
10
salt/dom0/port-forward.top
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{#
|
||||||
|
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
#}
|
||||||
|
|
||||||
|
base:
|
||||||
|
'dom0':
|
||||||
|
- match: nodegroup
|
||||||
|
- dom0.port-forward
|
@ -10,6 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
|||||||
include:
|
include:
|
||||||
- .clone
|
- .clone
|
||||||
- browser.create
|
- browser.create
|
||||||
|
- dom0.port-forward
|
||||||
|
|
||||||
{% load_yaml as defaults -%}
|
{% load_yaml as defaults -%}
|
||||||
name: tpl-{{ slsdotpath }}
|
name: tpl-{{ slsdotpath }}
|
||||||
@ -100,12 +101,3 @@ features:
|
|||||||
|
|
||||||
{% from 'utils/macros/policy.sls' import policy_set with context -%}
|
{% from 'utils/macros/policy.sls' import policy_set with context -%}
|
||||||
{{ policy_set(sls_path, '80') }}
|
{{ policy_set(sls_path, '80') }}
|
||||||
|
|
||||||
"{{ slsdotpath }}-qvm-port-forward":
|
|
||||||
file.managed:
|
|
||||||
- name: /usr/local/bin/qvm-port-forward
|
|
||||||
- source: salt://{{ slsdotpath }}/files/admin/firewall/qvm-port-forward
|
|
||||||
- user: root
|
|
||||||
- group: root
|
|
||||||
- mode: '0755'
|
|
||||||
- makedirs: True
|
|
||||||
|
Loading…
Reference in New Issue
Block a user