fix: resolve yamllint violations in docker role

- Remove standalone comment blocks that caused indentation errors
- Collapse multiline repo string to single line
- Ensure document start marker is present
This commit is contained in:
Rasmus Wejlgaard 2026-03-29 20:03:56 +00:00
parent 2d6b3957f9
commit be96f205df

View file

@ -1,8 +1,6 @@
--- ---
# Set up Docker's official apt repository and install Docker + Compose plugin. # Set up Docker's official apt repository and install Docker + Compose plugin.
# --- Debian/Ubuntu: add Docker official repo ---
- name: Install prerequisites for Docker repo (Debian/Ubuntu) - name: Install prerequisites for Docker repo (Debian/Ubuntu)
ansible.builtin.apt: ansible.builtin.apt:
name: name:
@ -30,11 +28,7 @@
- name: Add Docker apt repository - name: Add Docker apt repository
ansible.builtin.apt_repository: ansible.builtin.apt_repository:
repo: >- repo: "deb [arch={{ ansible_facts['architecture'] | regex_replace('x86_64', 'amd64') | regex_replace('aarch64', 'arm64') }} signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/{{ 'ubuntu' if ansible_facts['distribution'] == 'Ubuntu' else 'debian' }} {{ ansible_facts['distribution_release'] }} stable"
deb [arch={{ ansible_facts['architecture'] | regex_replace('x86_64', 'amd64') | regex_replace('aarch64', 'arm64') }}
signed-by=/etc/apt/keyrings/docker.asc]
https://download.docker.com/linux/{{ 'ubuntu' if ansible_facts['distribution'] == 'Ubuntu' else 'debian' }}
{{ ansible_facts['distribution_release'] }} stable
filename: docker filename: docker
state: present state: present
update_cache: true update_cache: true
@ -58,8 +52,6 @@
state: absent state: absent
when: ansible_facts["os_family"] == "Debian" when: ansible_facts["os_family"] == "Debian"
# --- Alpine ---
- name: Install Docker (Alpine) - name: Install Docker (Alpine)
community.general.apk: community.general.apk:
name: name:
@ -68,8 +60,6 @@
state: present state: present
when: ansible_facts["os_family"] == "Alpine" when: ansible_facts["os_family"] == "Alpine"
# --- Common ---
- name: Enable and start Docker - name: Enable and start Docker
ansible.builtin.service: ansible.builtin.service:
name: docker name: docker