--- kubernetes: children: controllers: hosts: #% for item in bootstrap_node_inventory %# #% if item.controller %# "#{ item.name }#": ansible_user: "#{ item.ssh_user }#" ansible_host: "#{ item.address }#" #% if item.ssh_key %# ansible_ssh_private_key_file: "#{ item.ssh_key }#" #% endif %# #% endif %# #% endfor %# #% if bootstrap_node_inventory | selectattr('controller', 'equalto', False) | list | length %# workers: hosts: #% for item in bootstrap_node_inventory %# #% if not item.controller %# "#{ item.name }#": ansible_user: "#{ item.ssh_user }#" ansible_host: "#{ item.address }#" #% if item.ssh_key %# ansible_ssh_private_key_file: "#{ item.ssh_key }#" #% endif %# #% endif %# #% endfor %# #% endif %#