Merge "Fix deploy-env when buildset_registry is defined"

This commit is contained in:
Zuul 2023-11-01 19:10:07 +00:00 committed by Gerrit Code Review
commit bad0169ece
4 changed files with 10 additions and 18 deletions

View File

@ -1,2 +1,5 @@
127.0.0.1 localhost
{{ ansible_default_ipv4['address'] }} {{ ansible_hostname }}
{% if buildset_registry is defined and (buildset_registry.host | ipaddr) %}
{{ buildset_registry.host }} zuul-jobs.buildset-registry
{% endif %}

View File

@ -85,11 +85,6 @@
- /etc/resolv.conf
- /run/systemd/resolve/resolv.conf
- name: Configure /etc/hosts
template:
src: files/hosts
dest: /etc/hosts
# We download Calico manifest on all nodes because we then want to download
# Calico images BEFORE deploying it
- name: Download Calico manifest

View File

@ -87,17 +87,6 @@
include_tasks:
file: buildset_registry_alias.yaml
- name: Configure /etc/hosts for buildset_registry to workaround docker not understanding ipv6 addresses
lineinfile:
path: /etc/hosts
state: present
regex: "^{{ buildset_registry.host }}\tzuul-jobs.buildset-registry$"
line: "{{ buildset_registry.host }}\tzuul-jobs.buildset-registry"
insertafter: EOF
when:
- buildset_registry is defined
- buildset_registry.host | ipaddr
- name: Write buildset registry TLS certificate
copy:
content: "{{ buildset_registry.cert }}"

View File

@ -3,11 +3,16 @@
include_tasks:
file: prerequisites.yaml
- name: Include common tasks
- name: Configure /etc/hosts
template:
src: files/hosts
dest: /etc/hosts
- name: Deploy Containerd
include_tasks:
file: containerd.yaml
- name: Include common tasks
- name: Common K8s tasks
include_tasks:
file: common_k8s.yaml