Files
ansible-playbooks/github-runner.yaml
Matthew Spencer 58fd266621 Ensure Watchtower removes old images
The github runner machine ran our of disk space because of old runner images.
This should ensure that doesn't happen any more :o)

Signed-off-by: Matt Spencer matthew@thespencers.me.uk
2025-03-07 18:37:22 +00:00

35 lines
852 B
YAML
Executable File

---
- name: Github Runner setup
hosts: github-runners
vars:
username: matt
docker_add_repo: true
docker_users:
- "{{ username }}"
roles:
- role: geerlingguy.docker
become: true
- role: compscidr.github_runner.github_runner
vars:
github_runner_install_docker: false
github_runner_personal_access_token: "{{ secrets.GITHUB_ACTIONS_TOKEN }}"
github_runner_name: "aarch64-rpi5-runner"
github_runner_repo: "m5p3nc3r/website"
github_runner_lables: "aarch64, rpi5"
tasks:
- name: Start watchtower
community.docker.docker_container:
name: watchtower
image: containrrr/watchtower
restart_policy: always
command:
- --cleanup
volumes:
- /var/run/docker.sock:/var/run/docker.sock
state: started