From 73709c2563ca6f669a342f49bab97993ec736d53 Mon Sep 17 00:00:00 2001 From: Roberto Alfieri Date: Wed, 3 Jun 2026 18:29:08 +0200 Subject: [PATCH] [cifmw_nfs] Fix IPSet hostname lookup regression PR #3930 added an explicit `ansible.builtin.setup` task before the `cifmw_nfs` role invocation and changed `import_role` to `include_role`. Both changes cause `ansible_domain` to resolve incorrectly in the `_nfs_host` variable: - The explicit `setup` gathers fresh facts **after** EDPM deployment has configured the compute's hostname with a domain suffix (`ctlplane.example.com`), causing the IPSet lookup to use `compute-0.ctlplane.example.com` instead of `compute-0`. - `include_role` alters variable scoping so `ansible_domain` no longer resolves from the play target host's facts. **Fix:** - Remove the explicit `setup` task. With `gather_facts: false` and no manual fact gathering, `ansible_domain` remains undefined. The `select()` filter in `_nfs_host` drops it, producing the correct short hostname matching the IPSet name. - Revert `include_role` back to `import_role` to restore play-level variable scoping. Fixes: `component-watcher` and other NFS-based jobs broken after PR #3930 merged. Related-Issue: ANVIL-109 Co-authored-by: Cursor Signed-off-by: Roberto Alfieri --- deploy-edpm.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/deploy-edpm.yml b/deploy-edpm.yml index 6e9b1e624..83ff3bc7e 100644 --- a/deploy-edpm.yml +++ b/deploy-edpm.yml @@ -95,16 +95,13 @@ - cifmw_architecture_scenario is defined ansible.builtin.meta: end_play - - name: Gather facts for NFS deployment - ansible.builtin.setup: - - name: Run cifmw_nfs role vars: nftables_path: /etc/nftables nftables_conf: /etc/sysconfig/nftables.conf when: - cifmw_edpm_deploy_nfs | default(false) | bool - ansible.builtin.include_role: + ansible.builtin.import_role: name: cifmw_nfs - name: Clear ceph target hosts facts to force refreshing in HCI deployments