Skip to content
Snippets Groups Projects
Verified Commit 4f108c31 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

add docker mirror info to inventory instead of separate settings.yml

parent 414af051
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,17 @@ def create_inventory(cluster):
inventory['all']['hosts'][cluster.hostname]['ansible_host'] = \
cluster.ip_address
if cluster.docker_mirror_endpoint \
and cluster.docker_mirror_server \
and cluster.docker_mirror_username \
and cluster.docker_mirror_password:
inventory['all']['hosts'][cluster.hostname]['docker_mirror']['enabled'] = True
inventory['all']['hosts'][cluster.hostname]['docker_mirror']['endpoint'] = cluster.docker_mirror_endpoint
inventory['all']['hosts'][cluster.hostname]['docker_mirror']['username'] = cluster.docker_mirror_username
inventory['all']['hosts'][cluster.hostname]['docker_mirror']['password'] = cluster.docker_mirror_password
inventory['all']['hosts'][cluster.hostname]['docker_mirror']['server'] = cluster.docker_mirror_server
inventory['all']['children']['master']['hosts'] = cluster.hostname
inventory['all']['children']['worker']['hosts'] = cluster.hostname
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment