test: fix fdo mac address test issue

This commit is contained in:
Xiaofeng Wang 2023-12-15 22:13:21 +08:00 committed by Achilleas Koutsou
parent a4ebf53ad8
commit 3c3445c832
2 changed files with 7 additions and 5 deletions

View file

@ -26,7 +26,7 @@ do
done
# Prepare service api server config filef
sudo /usr/local/bin/yq -iy '.service_info.diskencryption_clevis |= [{disk_label: "/dev/vda4", reencrypt: true, binding: {pin: "tpm2", config: "{}"}}]' /etc/fdo/aio/configs/serviceinfo_api_server.yml
if [[ "$VERSION_ID" == "9.3" || "$VERSION_ID" == "9" ]]; then
if [[ "$VERSION_ID" == "9.4" || "$VERSION_ID" == "9" ]]; then
# Modify manufacturing server config to process fdo
# guest interface during onboarding
sudo sed -i 's/SerialNumber/MACAddress/g' /etc/fdo/aio/configs/manufacturing_server.yml
@ -618,7 +618,7 @@ manufacturing_server_url="http://${FDO_SERVER_ADDRESS}:8080"
diun_pub_key_insecure="true"
EOF
if [[ "$VERSION_ID" == "9.3" || "$VERSION_ID" == "9" ]]; then
if [[ "$VERSION_ID" == "9.4" || "$VERSION_ID" == "9" ]]; then
tee -a "$BLUEPRINT_FILE" > /dev/null << EOF
di_mfg_string_type_mac_iface="${MFG_GUEST_INT_NAME}"
EOF
@ -803,7 +803,7 @@ manufacturing_server_url="http://${FDO_SERVER_ADDRESS}:8080"
diun_pub_key_hash="${DIUN_PUB_KEY_HASH}"
EOF
if [[ "$VERSION_ID" == "9.3" || "$VERSION_ID" == "9" ]]; then
if [[ "$VERSION_ID" == "9.4" || "$VERSION_ID" == "9" ]]; then
tee -a "$BLUEPRINT_FILE" > /dev/null << EOF
di_mfg_string_type_mac_iface="${MFG_GUEST_INT_NAME}"
EOF
@ -1136,7 +1136,7 @@ diun_pub_key_root_certs="""
${DIUN_PUB_KEY_ROOT_CERTS}"""
EOF
if [[ "$VERSION_ID" == "9.3" || "$VERSION_ID" == "9" ]]; then
if [[ "$VERSION_ID" == "9.4" || "$VERSION_ID" == "9" ]]; then
tee -a "$BLUEPRINT_FILE" > /dev/null << EOF
di_mfg_string_type_mac_iface="${MFG_GUEST_INT_NAME}"
EOF

View file

@ -1028,7 +1028,9 @@
- name: failed count + 1
set_fact:
failed_counter: "{{ failed_counter | int + 1 }}"
when: fdo_credential == "true"
when:
- fdo_credential == "true"
- (ansible_facts['distribution_version'] is version('9.4', '>=')) or (ansible_facts['distribution_version'] is version('9', '=='))
# case: checking firewall customizations
- name: Check applied firewall customizations