Replace injected Ansible fact variables in download and etcd roles - #13338
Replace injected Ansible fact variables in download and etcd roles#13338NikKumar811 wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: NikKumar811 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
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 Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
/ok-to-test |
There was a problem hiding this comment.
Pull request overview
This PR updates select tasks/defaults in the download, etcd, and etcd_defaults roles to avoid deprecated injected Ansible fact variables (ansible_*) and instead read facts via ansible_facts[...], aligning Kubespray with the upcoming Ansible 2.24 default behavior (fact injection disabled).
Changes:
- Replaced
ansible_os_familyusage withansible_facts['os_family']in etcd task conditions and role dependency gating. - Replaced
ansible_date_time.*usage withansible_facts['date_time'].*for etcd backup directory naming. - Replaced
ansible_memtotal_mbusage withansible_facts['memtotal_mb']for etcd docker memory-limit defaulting.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| roles/etcd/tasks/upd_ca_trust.yml | Switches OS-family branching/conditions to ansible_facts['os_family'] for CA trust update logic. |
| roles/etcd/meta/main.yml | Updates dependency when conditions to use ansible_facts['os_family'] (avoids injected fact vars). |
| roles/etcd/handlers/backup.yml | Uses ansible_facts['date_time'] for timestamped backup directory naming. |
| roles/etcd_defaults/defaults/main.yml | Uses ansible_facts['memtotal_mb'] for memory-based default etcd_memory_limit. |
| roles/download/tasks/prep_download.yml | Updates Flatcar OS-family gating to ansible_facts['os_family']. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/retest |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR updates the download, etcd, and etcd_defaults roles to replace usage of injected Ansible fact variables (
ansible_*) withansible_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:
Roles reviewed with no required changes:
Does this PR introduce a user-facing change?: