Skip to content

Commit 73709c2

Browse files
committed
[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 <cursoragent@cursor.com> Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
1 parent b2d59cb commit 73709c2

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

deploy-edpm.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,13 @@
9595
- cifmw_architecture_scenario is defined
9696
ansible.builtin.meta: end_play
9797

98-
- name: Gather facts for NFS deployment
99-
ansible.builtin.setup:
100-
10198
- name: Run cifmw_nfs role
10299
vars:
103100
nftables_path: /etc/nftables
104101
nftables_conf: /etc/sysconfig/nftables.conf
105102
when:
106103
- cifmw_edpm_deploy_nfs | default(false) | bool
107-
ansible.builtin.include_role:
104+
ansible.builtin.import_role:
108105
name: cifmw_nfs
109106

110107
- name: Clear ceph target hosts facts to force refreshing in HCI deployments

0 commit comments

Comments
 (0)