kubespray-defaults: Check for boostrap-os FQDN (#10590)

When installed as an ansible collection, roles in
ansible_play_role_names will be designated by their FQDN (i.e
'kubernetes-sigs.kubespray.<role-name>).

It means we need to check for both when checking for roles in the play.
pull/10661/head
Max Gautier 2023-11-28 09:23:46 +01:00 committed by GitHub
parent 21e8b96e22
commit c2e3071a33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -9,15 +9,18 @@
- name: Set fallback_ips
import_tasks: fallback_ips.yml
when:
- "'bootstrap-os' not in ansible_play_role_names"
- "'bootstrap-os' not in ansible_play_role_names or
'kubernetes-sigs.kubespray.bootstrap-os' not in ansible_play_role_names"
- fallback_ips is not defined
tags:
- always
- name: Set no_proxy
import_tasks: no_proxy.yml
when:
- "'bootstrap-os' not in ansible_play_role_names"
- "'bootstrap-os' not in ansible_play_role_names or
'kubernetes-sigs.kubespray.bootstrap-os' not in ansible_play_role_names"
- http_proxy is defined or https_proxy is defined
- no_proxy is not defined
tags: