From f8089d7a8c063e4ca61b517d2e55f7fac2cf8122 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Mon, 14 Dec 2020 12:36:39 -0500 Subject: [PATCH] container-host: Create tag for registries-conf-ctl This will let us skip those tasks when we don't want to run them (like on a Jenkins builder) Signed-off-by: David Galloway --- roles/container-host/README.rst | 8 ++++++++ roles/container-host/tasks/container_mirror.yml | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/roles/container-host/README.rst b/roles/container-host/README.rst index bea5240..aa0b247 100644 --- a/roles/container-host/README.rst +++ b/roles/container-host/README.rst @@ -24,3 +24,11 @@ The following variables are used to optionally configure a docker.io mirror CA c # Automatically determined in roles/container-host/tasks/main.yml container_mirror_cert_path: "/etc/docker/certs.d/{{ container_mirror }}" + +Tags +++++ + +registries-conf-ctl + Add ``--skip-tags registries-conf-ctl`` to your ``ansible-playbook`` command if you don't want to use registries-conf-ctl_ to configure the container service's conf file. + +.. _registries-conf-ctl: https://github.com/sebastian-philipp/registries-conf-ctl diff --git a/roles/container-host/tasks/container_mirror.yml b/roles/container-host/tasks/container_mirror.yml index d99d1a3..8395f5d 100644 --- a/roles/container-host/tasks/container_mirror.yml +++ b/roles/container-host/tasks/container_mirror.yml @@ -13,6 +13,8 @@ pip: name: git+https://github.com/sebastian-philipp/registries-conf-ctl state: latest + tags: + - registries-conf-ctl - name: "Check for docker's daemon.json" stat: @@ -35,6 +37,8 @@ command: registries-conf-ctl add-mirror docker.io "{{ container_mirror }}" environment: PATH: /usr/local/bin:/usr/bin + tags: + - registries-conf-ctl # not very elegant but it's a workaround for now - name: Restart docker service -- 2.39.5