forked from tim/k3s-ansible
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:
1 parent
ee3a4a126e
commit
8fb1e26c63
15 files changed
+68
-49
No files matched your search
@@ -19,7 +19,7 @@
|
||||
cluster_hostnames: >-
|
||||
{{
|
||||
groups['k3s_cluster']
|
||||
| map('extract', hostvars, 'ansible_hostname')
|
||||
| map('extract', hostvars, ['ansible_facts', 'hostname'])
|
||||
| list
|
||||
}}
|
||||
run_once: true
|
||||
@@ -77,9 +77,13 @@
|
||||
hosts: master
|
||||
environment: "{{ proxy_env | default({}) }}"
|
||||
tasks:
|
||||
- name: Copying kubeconfig from {{ hostvars[groups[group_name_master | default('master')][0]]['ansible_hostname'] }}
|
||||
- name: >-
|
||||
Copying kubeconfig from
|
||||
{{ hostvars[groups[group_name_master | default('master')][0]]['ansible_facts']['hostname'] }}
|
||||
ansible.builtin.fetch:
|
||||
src: "{{ ansible_user_dir }}/.kube/config"
|
||||
src: "{{ ansible_facts['user_dir'] }}/.kube/config"
|
||||
dest: ./kubeconfig
|
||||
flat: true
|
||||
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']
|
||||
Reference in new issue
Block a user