From 3f1b32d61a0cf75c230d0801c31396a83d27ac49 Mon Sep 17 00:00:00 2001 From: DeadSwitch Date: Fri, 6 Feb 2026 19:37:21 +0100 Subject: [PATCH 1/2] Adding CI Ansible run. --- .github/test/variables.yaml | 22 ++++++++++++++++++++++ .github/workflows/test.yaml | 21 +++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/test/variables.yaml create mode 100644 .github/workflows/test.yaml diff --git a/.github/test/variables.yaml b/.github/test/variables.yaml new file mode 100644 index 0000000..e9ebe6c --- /dev/null +++ b/.github/test/variables.yaml @@ -0,0 +1,22 @@ +--- +group_data: + ansible: + sudo: + type: nopasswd + commands: all + +user_data: + deadswitch: + ssh_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBpU3ZoAwSXwSZoAae4ca1BPVwcNaxIYXkYwzCbX5+4" + full_name: "DeadSwitch" + password: "*" + groups: + - ansible + sudo: + type: nopasswd + commands: all + +firewall_allowed_ports: + - { port: "{{ sshd_port | default('22') }}", proto: tcp } + - { port: "53", proto: udp } + - { port: "443", proto: tcp } diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..5f9cc57 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,21 @@ +--- +name: Ansible Test Run +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + ansible-run-test: + runs-on: ubuntu-latest + container: + image: debian:13 + + steps: + - name: Check out the repository + uses: actions/checkout@v4 + - name: Install the dependencies + run: apt-get update && apt-get install ansible + - name: Run Ansible + run: ansible-playbook playbooks/play-operation-zero.yml -e @.github/test/variables.yaml -i localhost, -c local From 7bfc06d8aefc23aa424bd794eb2cdb103100febd Mon Sep 17 00:00:00 2001 From: DeadSwitch Date: Fri, 6 Feb 2026 19:40:01 +0100 Subject: [PATCH 2/2] Force install Ansible in the test container. --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5f9cc57..0dc05b8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,6 +16,6 @@ jobs: - name: Check out the repository uses: actions/checkout@v4 - name: Install the dependencies - run: apt-get update && apt-get install ansible + run: apt-get update && apt-get install -y ansible - name: Run Ansible run: ansible-playbook playbooks/play-operation-zero.yml -e @.github/test/variables.yaml -i localhost, -c local