Skip to content

Replace injected Ansible fact variables in node and control-plane roles#13240

Open
NikKumar811 wants to merge 1 commit into
kubernetes-sigs:masterfrom
NikKumar811:fix-ansible-facts-control-plane-node
Open

Replace injected Ansible fact variables in node and control-plane roles#13240
NikKumar811 wants to merge 1 commit into
kubernetes-sigs:masterfrom
NikKumar811:fix-ansible-facts-control-plane-node

Conversation

@NikKumar811
Copy link
Copy Markdown
Contributor

@NikKumar811 NikKumar811 commented May 7, 2026

What type of PR is this?
/kind cleanup

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:

This PR updates the node and control-plane roles to replace usage of injected Ansible fact variables (ansible_*) with ansible_facts[...]. This ensures compatibility with upcoming Ansible 2.24 changes where fact injection will be disabled by default.

Which issue(s) this PR fixes:

Related to #13208

Special notes for your reviewer:

  • Changes are limited to the node and control-plane roles for focused review
  • No changes were made to hostvars, ansible_env, or set_fact usage
  • Existing logic and behavior are preserved
  • Roles reviewed with no required changes:
    - client
    - kubeadm
    - kubeadm_common
    - node-label
    - node-taint

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels May 7, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: NikKumar811
Once this PR has been reviewed and has the lgtm label, please assign ant31 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 7, 2026
@k8s-ci-robot k8s-ci-robot requested review from ErikJiang and mzaian May 7, 2026 17:09
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 7, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @NikKumar811. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 7, 2026
@yankay
Copy link
Copy Markdown
Member

yankay commented May 9, 2026

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 9, 2026
@yankay
Copy link
Copy Markdown
Member

yankay commented May 10, 2026

Thanks! Let's wait for #13232 first. That PR preserves the normalized ansible_facts behavior for redhat_os_family_extensions; once it lands, please rebase this PR so the node/control-plane changes use the normalized facts consistently.

@NikKumar811
Copy link
Copy Markdown
Contributor Author

Thanks! Let's wait for #13232 first. That PR preserves the normalized ansible_facts behavior for redhat_os_family_extensions; once it lands, please rebase this PR so the node/control-plane changes use the normalized facts consistently.

Thanks. I'll wait for #13232 to land first and then rebase this PR accordingly.

@NikKumar811 NikKumar811 force-pushed the fix-ansible-facts-control-plane-node branch from 0fcc753 to 078b8b3 Compare May 14, 2026 18:29
@NikKumar811
Copy link
Copy Markdown
Contributor Author

@yankay Rebased on latest master now that #13232 has merged, so the node/control-plane changes now use the normalized ansible_facts behavior consistently

@yankay
Copy link
Copy Markdown
Member

yankay commented May 18, 2026

Nice work! Clean mechanical replacement, CI is all green, and splitting the migration per-role makes review easy. Looking forward to follow-ups for the remaining roles.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants