mirror of
https://github.com/PyratLabs/ansible-role-k3s
synced 2024-11-05 13:23:30 +01:00
fix: avoid failure with jinja2_native=true
If you run the role on an ansible configured with that setting, it will fail with: fatal: [vm0]: FAILED! => {"msg": "Unexpected templating type error occurred on ({% for host in ansible_play_hosts_all %}\n{% filter string %}\n{% filter replace('\\n', ' ') %}\n{{ host }}\n@@@\n{{ hostvars[host].ansible_host | default(hostvars[host].ansible_fqdn) }}\n@@@\nC_{{ hostvars[host].k3s_control_node }}\n@@@\nP_{{ hostvars[host].k3s_primary_control_node | default(False) }}\n{% endfilter %}\n{% endfilter %}\n@@@ END:{{ host }}\n{% endfor %}): sequence item 4: expected str instance, bool found"}
This commit is contained in:
parent
0c084531d2
commit
05e62b6344
1 changed files with 3 additions and 3 deletions
|
@ -69,11 +69,11 @@
|
|||
{% filter replace('\n', ' ') %}
|
||||
{{ host }}
|
||||
@@@
|
||||
{{ hostvars[host].ansible_host | default(hostvars[host].ansible_fqdn) }}
|
||||
{{ hostvars[host].ansible_host | default(hostvars[host].ansible_fqdn) | string }}
|
||||
@@@
|
||||
C_{{ hostvars[host].k3s_control_node }}
|
||||
C_{{ hostvars[host].k3s_control_node | string }}
|
||||
@@@
|
||||
P_{{ hostvars[host].k3s_primary_control_node | default(False) }}
|
||||
P_{{ hostvars[host].k3s_primary_control_node | default(False) | string }}
|
||||
{% endfilter %}
|
||||
@@@ END:{{ host }}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue