Skip to content

Commit

Permalink
Fix for the Issue-283 (#290)
Browse files Browse the repository at this point in the history
Encountering 'dict object' has no attribute 'bridge_name' and
'mac_address' in Ansible Playbook For ABI

Signed-off-by: Sumit Solanki <[email protected]>
Co-authored-by: Sumit Solanki <[email protected]>
  • Loading branch information
isumitsolanki and Sumit Solanki authored Jun 18, 2024
1 parent 52e5a1b commit 4712107
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions roles/boot_abi_agents/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
--ram {{ env.cluster.nodes.control.ram }} \
{{ env.cluster.nodes.control.vcpu_model_option }} \
--vcpus {{ env.cluster.nodes.control.vcpu }} \
--network network={{ env.bridge_name }}{{ (',mac=' + env.cluster.nodes.control.mac_address[i]) }} \
--network network={{ env.vnet_name }}{{ (',mac=' + env.cluster.nodes.control.mac_address[i]) }} \
--location "http://{{ env.bastion.networking.ip }}:8080/,kernel={{ env.cluster.networking.metadata_name }}.{{ ansible_architecture }}-kernel.img,initrd={{ env.cluster.networking.metadata_name }}.{{ ansible_architecture }}-initrd.img" \
--extra-args "coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/{{ env.cluster.networking.metadata_name }}.{{ ansible_architecture }}-rootfs.img" \
{% if (env.cluster.nodes.control.mac_address[i] is defined and env.use_dhcp) %}
Expand Down Expand Up @@ -59,7 +59,7 @@
--ram {{ env.cluster.nodes.compute.ram }} \
{{ env.cluster.nodes.compute.vcpu_model_option }} \
--vcpus {{ env.cluster.nodes.compute.vcpu }} \
--network network={{ env.bridge_name }}{{ (',mac=' + env.cluster.nodes.compute.mac_address[i]) }} \
--network network={{ env.vnet_name }}{{ (',mac=' + env.cluster.nodes.compute.mac_address[i]) }} \
--location "http://{{ env.bastion.networking.ip }}:8080/,kernel={{ env.cluster.networking.metadata_name }}.{{ ansible_architecture }}-kernel.img,initrd={{ env.cluster.networking.metadata_name }}.{{ ansible_architecture }}-initrd.img" \
--extra-args "coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/{{ env.cluster.networking.metadata_name }}.{{ ansible_architecture }}-rootfs.img" \
{% if (env.cluster.nodes.compute.mac_address[i] is defined and env.use_dhcp) %}
Expand Down
8 changes: 4 additions & 4 deletions roles/prepare_configs/templates/agent-config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ hosts:
role: master
interfaces:
- name: eth0
macAddress: "{{ env.cluster.nodes.control.mac_address[item] }}"
macAddress: "{{ env.cluster.nodes.control.mac[item] }}"
networkConfig:
interfaces:
- name: eth0
type: ethernet
state: up
mac-address: "{{ env.cluster.nodes.control.mac_address[item] }}"
mac-address: "{{ env.cluster.nodes.control.mac[item] }}"
ipv4:
enabled: true
address:
Expand All @@ -40,13 +40,13 @@ hosts:
role: worker
interfaces:
- name: eth0
macAddress: "{{ env.cluster.nodes.compute.mac_address[item] }}"
macAddress: "{{ env.cluster.nodes.compute.mac[item] }}"
networkConfig:
interfaces:
- name: eth0
type: ethernet
state: up
mac-address: "{{ env.cluster.nodes.compute.mac_address[item] }}"
mac-address: "{{ env.cluster.nodes.compute.mac[item] }}"
ipv4:
enabled: true
address:
Expand Down

0 comments on commit 4712107

Please sign in to comment.