mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-20 15:27:56 -02:30
Convert OS specific packages to new format
Uses the logic introduced in the previous patch to convert all kubernetes/preinstall/vars/* os specific files to the `pkgs` dictionary. Some niceties for devs: - always validate the `pkgs` variable to catch mistakes in CI. - ensure that `pkgs` is always sorted. This makes it easier to find the packages you're looking for.
This commit is contained in:
@@ -316,3 +316,15 @@
|
||||
when:
|
||||
- kube_apiserver_enable_admission_plugins is defined
|
||||
- kube_apiserver_enable_admission_plugins | length > 0
|
||||
|
||||
- name: Verify that the packages list structure is valid
|
||||
ansible.utils.validate:
|
||||
criteria: "{{ lookup('file', 'pkgs-schema.json') }}"
|
||||
data: "{{ pkgs }}"
|
||||
|
||||
- name: Verify that the packages list is sorted
|
||||
vars:
|
||||
pkgs_lists: "{{ pkgs.keys() | list }}"
|
||||
assert:
|
||||
that: "pkgs_lists | sort == pkgs_lists"
|
||||
fail_msg: "pkgs is not sorted: {{ pkgs_lists | ansible.utils.fact_diff(pkgs_lists | sort) }}"
|
||||
|
||||
Reference in New Issue
Block a user