Implements the docker_host role tasks: prerequisites, /etc/apt/keyrings directory (ordered before the GPG key write), Docker APT key + repo, and docker-ce/cli/containerd.io/compose-plugin install. Daemon hardening and nftables.d integration remain deferred to Phase 2 (cluster + base firewall). Updates defaults, README, and molecule verify to assert docker --version. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
17 lines
460 B
YAML
17 lines
460 B
YAML
---
|
|
- name: Verify
|
|
hosts: all
|
|
gather_facts: true
|
|
|
|
tasks:
|
|
- name: Verify docker binary is present
|
|
ansible.builtin.command: docker --version
|
|
register: docker_version_output
|
|
changed_when: false
|
|
tags: [verify]
|
|
|
|
- name: Assert docker --version succeeded
|
|
ansible.builtin.assert:
|
|
that: docker_version_output.rc == 0
|
|
msg: "docker --version failed — Docker was not installed correctly"
|
|
tags: [verify]
|