- name: pre-install-common include_role: name: pre-install-common when: - ansible_connection is defined - ansible_connection == "ssh" - name: pre-install-host include_role: name: pre-install-host when: - ansible_connection is defined - ansible_connection == "ssh" - name: TCP Configuration include_role: name: tcp when: k8s_node_as_oc_controller|default(false)|bool == true - name: construct k8s_controlplane_host set_fact: k8s_controlplane_host: "{{groups['primary_master_node'][0]}}" when: k8s_controlplane_host is not defined or k8s_controlplane_host|length == 0 - name: Add controlplane host add_host: hostname: '{{ k8s_controlplane_host }}' ansible_host: '{{ k8s_controlplane_host }}' ansible_ssh_host: '{{ k8s_controlplane_host }}' ansible_user: '{{ ansible_user }}' ansible_ssh_user: '{{ ansible_user }}' ansible_port: '{{ k8s_controlplane_ssh_port | default(22) }}' ansible_ssh_port: '{{ k8s_controlplane_ssh_port | default(22) }}' - name: include some {{ k8s_or_k3s }} tasks include_tasks: "{{ k8s_or_k3s }}.yml" - name: Include worker-node/lbagent tasks include_role: name: worker-node/lbagent when: enable_lbagent