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..0dc05b8 --- /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 -y ansible + - name: Run Ansible + run: ansible-playbook playbooks/play-operation-zero.yml -e @.github/test/variables.yaml -i localhost, -c local