diff --git a/ansible/roles/bastion-assisted-installer/templates/onprem-environment.j2 b/ansible/roles/bastion-assisted-installer/templates/onprem-environment.j2 index 00898ca7..33f08028 100644 --- a/ansible/roles/bastion-assisted-installer/templates/onprem-environment.j2 +++ b/ansible/roles/bastion-assisted-installer/templates/onprem-environment.j2 @@ -12,6 +12,7 @@ ASSISTED_SERVICE_HOST={{ assisted_installer_host }}:{{ assisted_installer_port } IMAGE_SERVICE_BASE_URL=http://{{ assisted_installer_host }}:{{ assisted_image_service_port }} LISTEN_PORT={{ assisted_image_service_port }} DEPLOY_TARGET=onprem +DEPLOY_TYPE="Podman" STORAGE=filesystem DUMMY_IGNITION=false diff --git a/ansible/roles/create-ai-cluster/tasks/main.yml b/ansible/roles/create-ai-cluster/tasks/main.yml index bdd1cfab..671e2c46 100644 --- a/ansible/roles/create-ai-cluster/tasks/main.yml +++ b/ansible/roles/create-ai-cluster/tasks/main.yml @@ -59,7 +59,10 @@ "pull_secret": "{{ pull_secret | to_json }}", "ssh_public_key": "{{ lookup('file', ssh_public_key_file) }}", "vip_dhcp_allocation": "{{ vip_dhcp_allocation }}", - "additional_ntp_source": "{{ bastion_controlplane_ip if use_bastion_registry else labs[lab]['ntp_server'] }}" + "additional_ntp_source": "{{ bastion_controlplane_ip if use_bastion_registry else labs[lab]['ntp_server'] }}", + "api_vips": [{"ip": "{{ controlplane_network_api }}"}], + "ingress_vips": [{"ip": "{{ controlplane_network_ingress }}"}], + "network_type": "{{ networktype }}" } register: create_cluster_return @@ -90,6 +93,27 @@ set_fact: ai_infraenv_id: "{{ create_infra_env_return.json.id }}" +# curl -X PATCH -H 'Content-Type: application/json;' -d '{"ignition_config_override": "{\"ignition\":{\"version\":\"3.1.0\"},\"storage\":{\"files\":[{\"contents\":{\"source\":\"data:text/plain;base64,bmV0LmlwdjQubmVpZ2guZGVmYXVsdC5nY190aHJlc2gxID0gMTAyNApuZXQuaXB2NC5uZWlnaC5kZWZhdWx0LmdjX3RocmVzaDIgPSA0MDk2Cm5ldC5pcHY0Lm5laWdoLmRlZmF1bHQuZ2NfdGhyZXNoMyA9IDgxOTIK\"},\"mode\":420,\"overwrite\":true,\"path\":\"/etc/sysctl.d/arp.conf\"}]}}"}' http://f04-h08-000-r640.rdu2.scalelab.redhat.com:8090/api/assisted-install/v2/infra-envs/faa5f20f-4a7d-4d92-90e8-25603a561e4a +- name: Patch infra-env for arp cache with ignition config overrides + uri: + url: "http://{{ assisted_installer_host }}:{{ assisted_installer_port }}/api/assisted-install/v2/infra-envs/{{ ai_infraenv_id }}" + method: PATCH + body_format: json + status_code: [201] + return_content: true + body: { + "ignition_config_override": "{{ lookup('template', 'arp.ign.j2') | to_json }}", + } + when: false + +- name: Display all variables/facts known for a host + ansible.builtin.debug: + var: ai_infraenv_id + +- name: Pause until you can verify updates to an application were successful + ansible.builtin.pause: + + - name: Patch infra-env for bastion registry with ignition config overrides uri: url: "http://{{ assisted_installer_host }}:{{ assisted_installer_port }}/api/assisted-install/v2/infra-envs/{{ ai_infraenv_id }}" diff --git a/ansible/roles/hv-vm-create/tasks/main.yml b/ansible/roles/hv-vm-create/tasks/main.yml index cd7dde58..a3150724 100644 --- a/ansible/roles/hv-vm-create/tasks/main.yml +++ b/ansible/roles/hv-vm-create/tasks/main.yml @@ -20,6 +20,21 @@ shell: | virsh define {{ hv_kvm_def_path }}/{{ inventory_hostname }}.xml +- name: set arp proxy entries + shell: | + /usr/sbin/ip neighbour add {{ hostvars[inventory_hostname]['ip'] }} lladdr {{ hostvars[inventory_hostname]['mac_address'] }} nud permanent dev ens1f0 + when: false + +- name: flush arp nup entries + shell: /usr/sbin/ip neighbour flush nud permanent + + +- name: set arp proxy entries + shell: | + /usr/sbin/ip neighbour add {{ hostvars[inventory_hostname]['ip'] }} lladdr {{ hostvars[inventory_hostname]['mac_address'] }} nud permanent dev br0 + + #/usr/sbin/arp -i ens1f0 -sD {{ hostvars[inventory_hostname]['ip'] }} ens1f0 pub + - name: Set bmc url ipv4 set_fact: bmc_url: "http://{{ hostvars[inventory_hostname]['hv_ip'] }}:{{ hv_bmc_port }}/redfish/v1/Systems/{{ hostvars[inventory_hostname]['domain_uuid'] }}" diff --git a/ansible/roles/wait-hosts-discovered/tasks/main.yml b/ansible/roles/wait-hosts-discovered/tasks/main.yml index be4c092d..1a1df236 100644 --- a/ansible/roles/wait-hosts-discovered/tasks/main.yml +++ b/ansible/roles/wait-hosts-discovered/tasks/main.yml @@ -55,44 +55,6 @@ loop_control: loop_var: discovered_host -- name: Patch cluster network settings - uri: - url: "http://{{ assisted_installer_host }}:{{ assisted_installer_port }}/api/assisted-install/v2/clusters/{{ ai_cluster_id }}" - method: PATCH - status_code: [201] - return_content: true - body_format: json - body: { - "cluster_networks": [ - { - "cidr": "{{ cluster_network_cidr }}", - "cluster_id": "{{ ai_cluster_id }}", - "host_prefix": "{{ cluster_network_host_prefix }}" - } - ], - "service_networks": [ - { - "cidr": "{{ service_network_cidr }}", - "cluster_id": "{{ ai_cluster_id }}", - } - ] - } - -- name: Patch cluster ingress/api vip addresses - uri: - url: "http://{{ assisted_installer_host }}:{{ assisted_installer_port }}/api/assisted-install/v2/clusters/{{ ai_cluster_id }}" - method: PATCH - status_code: [201] - return_content: true - body_format: json - body: { - "cluster_network_host_prefix": "{{ cluster_network_host_prefix }}", - "vip_dhcp_allocation": "{{ vip_dhcp_allocation }}", - "ingress_vips": [{"ip": "{{ controlplane_network_ingress }}"}], - "api_vips": [{"ip": "{{ controlplane_network_api }}"}], - "network_type": "{{ networktype }}" - } - - name: Wait for cluster to be ready uri: url: "http://{{ assisted_installer_host }}:{{ assisted_installer_port }}/api/assisted-install/v2/clusters/{{ ai_cluster_id }}"