Copied from the maintainer's local role and reworked for the Collection: the binary swap and rollback of an update go through the internal _binary_update role, input checks move to tasks/validate.yml, the removal ends the role, commands take argv, and the molecule tooling needs an explicit collections requirements file. Adds a molecule scenario with stub Docker, runner and release files. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
45 lines
1.0 KiB
YAML
45 lines
1.0 KiB
YAML
---
|
|
- name: Install Docker dependencies
|
|
become: true
|
|
ansible.builtin.apt:
|
|
name:
|
|
- ca-certificates
|
|
- curl
|
|
- gnupg
|
|
- lsb-release
|
|
state: present
|
|
update_cache: true
|
|
tags: [gitea_runner, docker, install]
|
|
|
|
- name: Install Docker
|
|
become: true
|
|
ansible.builtin.apt:
|
|
name:
|
|
- docker.io
|
|
state: present
|
|
tags: [gitea_runner, docker, install]
|
|
|
|
- name: Enable and start Docker
|
|
become: true
|
|
ansible.builtin.systemd:
|
|
name: docker
|
|
enabled: true
|
|
state: started
|
|
tags: [gitea_runner, docker, install]
|
|
|
|
- name: Add the runner user to the docker group
|
|
become: true
|
|
ansible.builtin.user:
|
|
name: "{{ gitea_runner_user }}"
|
|
groups: docker
|
|
append: true
|
|
tags: [gitea_runner, docker, install]
|
|
|
|
# Pulls ubuntu:24.04 from Docker Hub. Also proves Docker runs inside a container host
|
|
# (an LXC needs nesting enabled).
|
|
- name: Verify Docker can run a container
|
|
become: true
|
|
ansible.builtin.command: docker run --rm ubuntu:24.04 echo ok
|
|
changed_when: false
|
|
tags: [gitea_runner, docker, install, health]
|