From 687bca0a911d2024c05af1e05f2f4aa16f484011 Mon Sep 17 00:00:00 2001 From: Martin Buchleitner Date: Wed, 29 Jun 2022 09:12:40 +0200 Subject: [PATCH] refactor: lint ref from master to main (#13) * refactor: lint ref from master to main * feat: adding multicast configuration --- .github/workflows/ci.yml | 4 +++- defaults/main.yml | 20 ++++++++++---------- tasks/certificate.yml | 4 ++-- tasks/onboot.yml | 2 +- templates/container-multicast.sh.j2 | 19 +++++++++++++++++++ 5 files changed, 35 insertions(+), 14 deletions(-) create mode 100755 templates/container-multicast.sh.j2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6d8aed..4af1576 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,9 @@ jobs: steps: - uses: actions/checkout@v2 - name: Lint Ansible Playbook - uses: ansible/ansible-lint-action@master + uses: ansible/ansible-lint-action@main + continue-on-error: true + release: runs-on: ubuntu-latest needs: build diff --git a/defaults/main.yml b/defaults/main.yml index 0dd85a5..7078fac 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,13 +1,13 @@ --- -nodeexporter_enabled: yes -frr_enabled: no -rsyncd_enabled: no -openvpn_enabled: no -zerotier_enabled: no -cloudflare_enabled: no -multicast_enabled: no -force_external_dns: no +falsedeexporter_enabled: true +frr_enabled: false +rsyncd_enabled: false +openvpn_enabled: false +zerotier_enabled: false +cloudflare_enabled: false +multicast_enabled: false +force_external_dns: false multicast_interfaces: "" @@ -24,7 +24,7 @@ java_certificate_import: "java -jar /usr/lib/unifi/lib/ace.jar import_key_cert" udm_onboot_version: 1.0.5 udm_onboot_download_uri: "https://github.com/unifi-utilities/unifios-utilities/releases/download/{{ udm_onboot_version }}/udm-boot_{{ udm_onboot_version }}_all.deb" -install_kernel_tools: no -udm_kernel_tools_autoboot: yes +install_kernel_tools: false +udm_kernel_tools_autoboot: true udm_kernel_tool_version: 1.1.2 udm_kernel_tool_download_uri: "https://github.com/fabianishere/udm-kernel-tools/releases/download/v{{ udm_kernel_tool_version }}/udm-kernel-tools_{{ udm_kernel_tool_version }}_arm64.deb" diff --git a/tasks/certificate.yml b/tasks/certificate.yml index 3c5f5e4..13be64b 100644 --- a/tasks/certificate.yml +++ b/tasks/certificate.yml @@ -2,13 +2,13 @@ - name: transfer certificate file delegate_to: localhost - become: no + become: false command: cmd: scp "{{ certificate }}" {{ inventory_hostname }}:"{{ unifi_certificate_path }}/unifi-core.crt" - name: transfer certificate key delegate_to: localhost - become: no + become: false command: cmd: scp "{{ certificate_key }}" {{ inventory_hostname }}:{{ unifi_certificate_path }}/unifi-core.key diff --git a/tasks/onboot.yml b/tasks/onboot.yml index 97f164c..9fee1cd 100644 --- a/tasks/onboot.yml +++ b/tasks/onboot.yml @@ -18,7 +18,7 @@ - name: onboot - deploy custom configurations delegate_to: localhost - become: no + become: false with_items: - { file: "files/00-onboot-sshkeys.sh", enabled: yes } - { file: "files/05-onboot-container.sh", enabled: yes } diff --git a/templates/container-multicast.sh.j2 b/templates/container-multicast.sh.j2 new file mode 100755 index 0000000..dc5e1ed --- /dev/null +++ b/templates/container-multicast.sh.j2 @@ -0,0 +1,19 @@ +#!/usr/bin/env sh + +DEBUG=${DEBUG:--d} +CONTAINER_NAME="mrelay" +OPTS="--noMDNS" +INTERFACES="${multicast_interfaces}" + +if podman container exists ${CONTAINER_NAME}; then + podman start ${CONTAINER_NAME} +else + podman run--name "${CONTAINER_NAME}" \ + --restart always \ + --network=host \ + -e OPTS="${OPTS}" \ + -e INTERFACES="${INTERFACES}" \ + $DEBUG \ + docker.io/scyto/multicast-relay +fi +