From 3150ff2110d6affd60cb2d0083f8368086e90059 Mon Sep 17 00:00:00 2001 From: Michele Costa Date: Tue, 6 Sep 2022 10:16:18 +0100 Subject: [PATCH] WIP --- playbooks/deploy_registry.yml | 6 ++-- .../templates/agent-config.yaml.j2 | 30 +++++++++---------- .../templates/infraenv.yaml.j2 | 2 ++ .../templates/registries.conf.j2 | 4 +-- roles/get_image_hash/defaults/main.yml | 3 +- 5 files changed, 24 insertions(+), 21 deletions(-) diff --git a/playbooks/deploy_registry.yml b/playbooks/deploy_registry.yml index 9c7155b0..0092f267 100644 --- a/playbooks/deploy_registry.yml +++ b/playbooks/deploy_registry.yml @@ -32,15 +32,15 @@ - role: setup_selfsigned_cert when: - SETUP_REGISTRY_SERVICE == True - - not (deploy_supported_registry | bool) + - not ((deploy_supported_registry | default(false)) | bool) - role: setup_mirror_registry when: - SETUP_REGISTRY_SERVICE == True - - not (deploy_supported_registry | bool) + - not ((deploy_supported_registry | default(false)) | bool) - role: setup_mirror_registry_supported when: - SETUP_REGISTRY_SERVICE == True - - deploy_supported_registry | bool + - (deploy_supported_registry | default(false)) | bool - import_playbook: populate_registry.yml diff --git a/roles/generate_manifests/templates/agent-config.yaml.j2 b/roles/generate_manifests/templates/agent-config.yaml.j2 index 4800e691..30172d22 100644 --- a/roles/generate_manifests/templates/agent-config.yaml.j2 +++ b/roles/generate_manifests/templates/agent-config.yaml.j2 @@ -1,21 +1,21 @@ #jinja2:trim_blocks: True, lstrip_blocks: True +apiVersion: v1alpha1 kind: AgentConfig metadata: labels: cluster-name: {{ cluster_name }} -spec: - {% if billi_bootstrap_node is defined %} - rendezvousIP: {{ hostvars[billi_bootstrap_node]['ansible_host'] }} +{% if billi_bootstrap_node is defined %} +rendezvousIP: {{ hostvars[billi_bootstrap_node]['ansible_host'] }} +{% endif %} +hosts: +{% for hostname, network_config in static_network_config.items() %} + - role: {{ hostvars[hostname]['role'] }} + hostname: {{ hostname }} + interfaces: + - name: {{ network_config.mac_interface_map[0].logical_nic_name }} + macAddress: {{ network_config.mac_interface_map[0].mac_address }} + {% if hostvars[hostname]['installation_disk_path'] is defined %} + rootDeviceHints: + deviceName: {{ hostvars[hostname]['installation_disk_path'] }} {% endif %} - hosts: - {% for hostname, network_config in static_network_config.items() %} - - role: {{ hostvars[hostname]['role'] }} - hostname: {{ hostname }} - interfaces: - - name: {{ network_config.mac_interface_map[0].logical_nic_name }} - macAddress: {{ network_config.mac_interface_map[0].mac_address }} - {% if hostvars[hostname]['installation_disk_path'] is defined %} - rootDeviceHints: - deviceName: {{ hostvars[hostname]['installation_disk_path'] }} - {% endif %} - {% endfor %} +{% endfor %} diff --git a/roles/generate_manifests/templates/infraenv.yaml.j2 b/roles/generate_manifests/templates/infraenv.yaml.j2 index 2d0c5c2c..0c88d3be 100644 --- a/roles/generate_manifests/templates/infraenv.yaml.j2 +++ b/roles/generate_manifests/templates/infraenv.yaml.j2 @@ -10,6 +10,8 @@ spec: pullSecretRef: name: pull-secret sshAuthorizedKey: {{ ssh_public_key }} + additionalNTPSources: + - {{ ntp_server }} nmStateConfigLabelSelector: matchLabels: cluster-name: {{ cluster_name }} diff --git a/roles/generate_manifests/templates/registries.conf.j2 b/roles/generate_manifests/templates/registries.conf.j2 index c4750095..c97db0c8 100644 --- a/roles/generate_manifests/templates/registries.conf.j2 +++ b/roles/generate_manifests/templates/registries.conf.j2 @@ -4,13 +4,13 @@ unqualified-search-registries = ["registry.access.redhat.com", "docker.io"] location = "quay.io/openshift-release-dev/ocp-release" mirror-by-digest-only = false [[registry.mirror]] - location = "{{ mirror_registry }}/origin/release-images" + location = "{{ mirror_registry }}/ocp4/openshift4" [[registry]] prefix = "" location = "quay.io/openshift-release-dev/ocp-v4.0-art-dev" mirror-by-digest-only = false [[registry.mirror]] - location = "{{ mirror_registry }}/origin" + location = "{{ mirror_registry }}/ocp4/openshift4" [[registry]] prefix = "" location = "k8s.gcr.io/pause" diff --git a/roles/get_image_hash/defaults/main.yml b/roles/get_image_hash/defaults/main.yml index aba12f72..6a1f7a90 100644 --- a/roles/get_image_hash/defaults/main.yml +++ b/roles/get_image_hash/defaults/main.yml @@ -90,7 +90,8 @@ release_images_defaults: cpu_architecture: x86_64 # url: registry.ci.openshift.org/origin/release:4.11 # url: "{{ mirror_registry }}/origin/openshift/release-images:4.11" - url: quay.io/openshift-release-dev/ocp-release:4.11.0-x86_64 + # url: quay.io/openshift-release-dev/ocp-release:4.11.0-x86_64 + url: quay.io/openshift-release-dev/ocp-release@sha256:300bce8246cf880e792e106607925de0a404484637627edf5f517375517d54a4 version: 4.11.0 release_images: "{{ release_images_defaults }}"