Skip to content

Commit

Permalink
kubespray-defaults: Check for boostrap-os FQDN
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
VannTen committed Nov 3, 2023
1 parent 8700655 commit 8a62b5e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions roles/kubespray-defaults/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
ansible_collection_name + '.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
ansible_collection_name + '.bootstrap-os' not in ansible_play_role_names"
- http_proxy is defined or https_proxy is defined
- no_proxy is not defined
tags:
Expand Down

0 comments on commit 8a62b5e

Please sign in to comment.