From f319377f37f0f4c4b44072424d687832bd947ae2 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 30 Nov 2024 14:45:08 +0100 Subject: [PATCH] added tailscale state --- states/tailscale/defaults.yaml | 3 +++ states/tailscale/init.sls | 4 ++++ states/tailscale/install.sls | 0 states/tailscale/kernelmap.yaml | 3 +++ states/tailscale/map.jinja | 14 ++++++++++++++ states/tailscale/osarchmap.yaml | 24 ++++++++++++++++++++++++ 6 files changed, 48 insertions(+) create mode 100644 states/tailscale/defaults.yaml create mode 100644 states/tailscale/init.sls create mode 100644 states/tailscale/install.sls create mode 100644 states/tailscale/kernelmap.yaml create mode 100644 states/tailscale/map.jinja create mode 100644 states/tailscale/osarchmap.yaml diff --git a/states/tailscale/defaults.yaml b/states/tailscale/defaults.yaml new file mode 100644 index 0000000..1ec80b4 --- /dev/null +++ b/states/tailscale/defaults.yaml @@ -0,0 +1,3 @@ +--- +tailscale: + config: {} diff --git a/states/tailscale/init.sls b/states/tailscale/init.sls new file mode 100644 index 0000000..b85b784 --- /dev/null +++ b/states/tailscale/init.sls @@ -0,0 +1,4 @@ +--- +include: + - repo + - .install diff --git a/states/tailscale/install.sls b/states/tailscale/install.sls new file mode 100644 index 0000000..e69de29 diff --git a/states/tailscale/kernelmap.yaml b/states/tailscale/kernelmap.yaml new file mode 100644 index 0000000..40943f2 --- /dev/null +++ b/states/tailscale/kernelmap.yaml @@ -0,0 +1,3 @@ +--- +Linux: + os: "linux" diff --git a/states/tailscale/map.jinja b/states/tailscale/map.jinja new file mode 100644 index 0000000..3f37ad9 --- /dev/null +++ b/states/tailscale/map.jinja @@ -0,0 +1,14 @@ +{%- import_yaml "systemd/defaults.yaml" as default_settings -%} + +{%- import_yaml "systemd/kernelmap.yaml" as kernelmap %} +{%- import_yaml "systemd/osarchmap.yaml" as osarchmap %} + +{%- set defaults = salt['grains.filter_by'](default_settings, + default='systemd', + merge=salt['grains.filter_by'](osarchmap, grain='osarch', + merge=salt['grains.filter_by'](kernelmap, grain='kernel') + ) + ) +-%} + +{%- set systemd = salt['pillar.get']('systemd', default=defaults, merge=True) -%} diff --git a/states/tailscale/osarchmap.yaml b/states/tailscale/osarchmap.yaml new file mode 100644 index 0000000..05f0f25 --- /dev/null +++ b/states/tailscale/osarchmap.yaml @@ -0,0 +1,24 @@ +--- +amd64: + arch: "amd64" + +x86_64: + arch: "amd64" + +386: + arch: "386" + +arm64: + arch: "arm64" + +aarch64: + arch: "arm64" + +armv6l: + arch: "arm" + +armv7l: + arch: "arm" + +armhf: + arch: "arm"