- name: pre-install-common include_role: name: pre-install-common when: - ansible_connection is defined - ansible_connection == "ssh" - name: TCP Configuration include_role: name: tcp - 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 {{ k8s_or_k3s }} Master node job include_tasks: "{{ k8s_or_k3s }}.yml"