fix(ansible): update fact references to remove deprecation warnings (#715)

* chore(ansible): use ansible_facts

* fix(ansible): satisfy lint for fact migration

- wrap nested fact expressions to meet YAML line length limits
- update the bootstrap regression assertion for ansible_facts

* fix(pre-commit): install shellcheck for host architecture

- install shellcheck-py from PyPI in the local hook environment
- pin the platform-aware shellcheck package version

---------

Co-authored-by: Timothy Stewart <timothystewart6@gmail.com>
This commit is contained in:
FedelloandTimothy Stewart authored and GitHub committed 2026-09-21 17:04:30 +00:00
1 parent ee3a4a126e
commit 8fb1e26c63
15 files changed
+68 -49

No files matched your search

+2 -1
View File
@@ -1,6 +1,7 @@
---
- name: Deploy Calico to cluster
when: ansible_hostname == hostvars[groups[group_name_master | default('master')][0]]['ansible_hostname']
when: >-
ansible_facts.hostname == hostvars[groups[group_name_master | default('master')][0]]['ansible_facts']['hostname']
run_once: true
block:
- name: Create manifests directory on first master
+2 -2
View File
@@ -184,7 +184,7 @@
--helm-set loadBalancer.mode={{ bpf_lb_mode }}
{% endif %}
environment:
KUBECONFIG: "{{ ansible_user_dir }}/.kube/config"
KUBECONFIG: "{{ ansible_facts['user_dir'] }}/.kube/config"
register: cilium_install_result
changed_when: cilium_install_result.rc == 0
# cilium install/upgrade fetches the Helm chart from helm.cilium.io, which is
@@ -227,7 +227,7 @@
- name: Wait for Cilium status to be healthy
ansible.builtin.command: cilium status --wait
environment:
KUBECONFIG: "{{ ansible_user_dir }}/.kube/config"
KUBECONFIG: "{{ ansible_facts['user_dir'] }}/.kube/config"
register: cilium_status
changed_when: false
until: cilium_status.rc == 0
+2 -2
View File
@@ -3,7 +3,7 @@
ansible.builtin.file:
path: /tmp/k3s
state: directory
owner: "{{ ansible_user_id }}"
owner: "{{ ansible_facts['user_id'] }}"
mode: "0755"
with_items: "{{ groups[group_name_master | default('master')] }}"
run_once: true
@@ -33,7 +33,7 @@
ansible.builtin.template:
src: metallb.crs.j2
dest: /tmp/k3s/metallb-crs.yaml
owner: "{{ ansible_user_id }}"
owner: "{{ ansible_facts['user_id'] }}"
mode: "0755"
with_items: "{{ groups[group_name_master | default('master')] }}"
run_once: true