7 Commits

Author SHA1 Message Date
Clark Boylan
589cccb055 Fix dockerhub check in use-docker-mirror role
We were checking if dockerhub is a valid key in the
zuul_site_mirror_info/mirror_info dictionaries but did so without
quoting dockerhub as a string. This meant ansible tried to look up
dockerhub as a variable producing this error:

  The conditional check 'dockerhub is in zuul_site_mirror_info' failed.
  The error was: error while evaluating conditional (dockerhub is in
  zuul_site_mirror_info): 'dockerhub' is undefined. 'dockerhub' is undefined

Fix this by quoting dockerhub so that we lookup the string as a key
instead of a variable.

Change-Id: Ie869b9b52fd0a5b70fc07548ce449937ed2c9589
2024-11-20 23:06:10 +00:00
Clark Boylan
b007e86a0f Support new style mirror_info in use-docker-mirror
This adds new style mirror_info handling to use-docker-mirror to give us
greater control over whether or not docker hub should be mirrored. We
ignore old style configuration if new style is present which gives us
this control. Otherwise we fallback to the old behavior.

We also update the ensure-docker test jobs to be triggered by updates to
the use-docker-mirror roles as ensure-docker includes this role. We
should get decent functional testing coverage this way.

Change-Id: Ia1b216a6dd68bcafbe599777037c5d7b1b3e8201
2024-11-19 14:56:56 -08:00
Joshua Watt
739d7b5118 use-docker-mirror: Also run task if docker_mirror is defined
The role was skipping doing anything if docker_mirror was not defined.

Change-Id: I82c8869f6a05651336f0f106ea98b33331b19ac1
2023-01-10 14:16:39 -06:00
Sorin Sbarnea
856866fdde More E208 mode fixes
Change-Id: I8157ec1f31b8c5a064b63002e8311b91ef9ce9ab
See: https://ansible-lint.readthedocs.io/en/latest/default_rules.html#file-permissions-not-mentioned
2020-10-31 07:34:03 +00:00
Albin Vass
91ae649107 use-docker-mirror: update include to include_tasks
Change-Id: I501ef1c05404b1d808ea5964795fb4fec1179e5a
2020-05-26 10:09:56 +02:00
vass
c80b593fb6 Rename install-docker to ensure-docker for consistency
The old role will be kept and include ensure-docker for backwards compatability.

Change-Id: Icb76a954b04631c405b09eb54343fd852a511b83
2020-04-04 15:41:29 -04:00
James E. Blair
90fc18f621 Split docker mirror config into its own role
So that the docker mirror configuration can be used without the
install-docker role (e.g., if another process is used to install
docker on a target host), split the part of the role which
configures mirrors into its own role and include it in the
install-docker role.

Change-Id: I7cd7f61e2d1281cd2949c1f69a081c7217d0d328
2019-02-21 14:07:43 -08:00