diff --git a/README.md b/README.md index 73f0590b910f007fd9d88e9bb3c44d63b25a6b2a..3f6f1d3c4aa733dc0e4462fca4f855a0480f2a62 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ Ansible Role to install [Docker CE](https://docs.docker.com/engine/installation/linux/docker-ce/debian/) on Debian and Ubuntu. - This role can also optionally install the last version of `docker-compose` version 1, [Docker Compose 1.29.2 ](https://github.com/docker/compose/tree/5becea4ca9f68875334c92f191a13482bcd6e5cf#docker-compose) and [Compose Switch](https://github.com/docker/compose-switch). See the [defaults/main.yml](defaults/main.yml) for the default settings and [vars/main.yml](vars/main.yml) for the `gpg` and `apt` variables. @@ -71,7 +70,13 @@ docker_daemon: - 9.9.9.9 ``` -The role uses `.sources` rather than `.list` files for `apt` and it also checks the `gpg` public key used to sign packages and limits what packages can be installed from the Docker repo. +The role uses `.sources` rather than `.list` files for `apt`, see the Debian wiki page with [instructions to connect to a third-party repository](https://wiki.debian.org/DebianRepository/UseThirdParty) and it also checks the `gpg` public key used to sign packages and limits what packages can be installed from the Docker repo. + +This role requires [jc](https://github.com/kellyjonbrazil/jc) version `1.20.2` or later to be installed on the Ansible controller using `pip` for the parsing of GPG command output, `jc` can be [installed using Ansible](https://git.coop/webarch/jc/), or simply run: + +```bash +pip3 install jc +``` The primary URL of this repo is [`https://git.coop/webarch/docker`](https://git.coop/webarch/docker) however it is also [mirrored to GitHub](https://github.com/webarch-coop/ansible-role-docker) and [available via Ansible Galaxy](https://galaxy.ansible.com/chriscroome/docker). diff --git a/tasks/apt.yml b/tasks/apt.yml index 751aa3a0b64976b739106fa4518bda0dad1e49c6..4fa823f8135cbe52dcb44c19a80fd9afa27e812a 100644 --- a/tasks/apt.yml +++ b/tasks/apt.yml @@ -92,19 +92,11 @@ ansible.builtin.set_fact: docker_gpg_fingerprints_found: "{{ docker_gpg.stdout | community.general.jc('gpg') | community.general.json_query('[?type==`fpr`].user_id') | list }}" - - name: Debug vars - debug: - var: docker_gpg_fingerprints_found - - - name: Debug vars - debug: - var: docker_gpg_fingerprints[0] - - name: Docker gpg key check first fingerprint for GPG versions less that 2.2.12 ansible.builtin.assert: that: - docker_gpg_fingerprints_found[0] == docker_gpg_fingerprints[0] - # when: ansible_local.gpg.version is version('2.2.12', '<') + when: ansible_local.gpg.version is version('2.2.12', '<') - name: Docker gpg key check all fingerprints ansible.builtin.assert: