38 lines
1.6 KiB
YAML
38 lines
1.6 KiB
YAML
---
|
|
- name: Verify
|
|
hosts: all
|
|
gather_facts: true
|
|
tasks:
|
|
- name: Get content of docker source file
|
|
ansible.builtin.slurp:
|
|
src: /etc/apt/sources.list.d/docker.list
|
|
register: docker_repo
|
|
- name: Get content of caddy source file
|
|
ansible.builtin.slurp:
|
|
src: /etc/apt/sources.list.d/caddy-stable.list
|
|
register: caddy_repo
|
|
|
|
- name: Ensure docker repo file content is as expected
|
|
ansible.builtin.assert:
|
|
that: >
|
|
docker_repo.content | b64decode == "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc]
|
|
https://download.docker.com/linux/{{ ansible_distribution | lower }}
|
|
{{ ansible_distribution_release }} stable\n"
|
|
msg: >
|
|
/etc/apt/sources.list.d/docker.list should contain
|
|
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc]
|
|
https://download.docker.com/linux/{{ ansible_distribution | lower }}
|
|
{{ ansible_distribution_release }} stable but it contained {{ docker_repo.content | b64decode }} instead
|
|
|
|
- name: Ensure caddy repo file content is as expected
|
|
ansible.builtin.assert:
|
|
that: >
|
|
caddy_repo.content | b64decode == "deb [signed-by=/etc/apt/keyrings/caddy-stable.asc]
|
|
https://dl.cloudsmith.io/public/caddy/stable/deb/debian
|
|
any-version main\n"
|
|
msg: >
|
|
/etc/apt/sources.list.d/caddy-stable.list should contain
|
|
deb [signed-by=/etc/apt/keyrings/caddy-stable.asc]
|
|
https://dl.cloudsmith.io/public/caddy/stable/deb/debian
|
|
any-version main but it contained {{ docker_repo.content | b64decode }} instead
|