Ansible

root@899a18f055c8:/ansible# ansible-playbook k3s_deploy.yml
[WARNING]: While constructing a mapping from /ansible/k3s_deploy.yml, line 32, column 7, found a duplicate dict key (no_log). Using last defined value only.

PLAY [Server prep] ******************************************************************************************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **************************************************************************************************************************************************************************************************************************************************************************************************************************************
[WARNING]: Platform linux on host api.k3s1.ujstor.com is using the discovered Python interpreter at /usr/bin/python3.11, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible-core/2.17/reference_appendices/interpreter_discovery.html for more information.
ok: [api.k3s1.ujstor.com]
[WARNING]: Platform linux on host api.k3s0.ujstor.com is using the discovered Python interpreter at /usr/bin/python3.11, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible-core/2.17/reference_appendices/interpreter_discovery.html for more information.
ok: [api.k3s0.ujstor.com]

TASK [common : Update package lists] ************************************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com]
changed: [api.k3s0.ujstor.com]

TASK [common : Upgrade all packages] ************************************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]
changed: [api.k3s1.ujstor.com]

TASK [common : Install public AuthorizedKeysFile] ***********************************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s0.ujstor.com]
ok: [api.k3s1.ujstor.com]

TASK [common : Install required packages] *******************************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]
changed: [api.k3s1.ujstor.com]

TASK [common : Enable UFW] **********************************************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]
changed: [api.k3s1.ujstor.com]

TASK [common : Allow incoming traffic on specified ports] ***************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com] => (item=22)
changed: [api.k3s1.ujstor.com] => (item=22)
changed: [api.k3s0.ujstor.com] => (item=80)
changed: [api.k3s1.ujstor.com] => (item=80)
changed: [api.k3s1.ujstor.com] => (item=443)
changed: [api.k3s0.ujstor.com] => (item=443)
changed: [api.k3s1.ujstor.com] => (item=6443)
changed: [api.k3s0.ujstor.com] => (item=6443)
changed: [api.k3s1.ujstor.com] => (item=25)
changed: [api.k3s0.ujstor.com] => (item=25)
changed: [api.k3s1.ujstor.com] => (item=465)
changed: [api.k3s0.ujstor.com] => (item=465)
changed: [api.k3s0.ujstor.com] => (item=587)
changed: [api.k3s1.ujstor.com] => (item=587)
changed: [api.k3s0.ujstor.com] => (item=993)
changed: [api.k3s1.ujstor.com] => (item=993)

TASK [common : Configure Fail2Ban] **************************************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]
changed: [api.k3s1.ujstor.com]

TASK [common : Restart fail2ban] ****************************************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]
changed: [api.k3s1.ujstor.com]

TASK [common : Ensure no conflicting PermitRootLogin in sshd_config] ****************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]
changed: [api.k3s1.ujstor.com]

TASK [common : SSH Hardening for root user] *****************************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]
changed: [api.k3s1.ujstor.com]

TASK [common : Restart sshd] ********************************************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]
changed: [api.k3s1.ujstor.com]

TASK [Check for existing token] *****************************************************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s1.ujstor.com]
ok: [api.k3s0.ujstor.com]

TASK [Read existing token if present] ***********************************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]
skipping: [api.k3s1.ujstor.com]

TASK [Generate random token if no existing token] ***********************************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s0.ujstor.com]
ok: [api.k3s1.ujstor.com]

TASK [Set token fact] ***************************************************************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s0.ujstor.com]
ok: [api.k3s1.ujstor.com]

PLAY [Setup K3S server k3s0] ********************************************************************************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **************************************************************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Enforce minimum Ansible version] *******************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s0.ujstor.com] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [k3s.orchestration.prereq : Install Dependent Ubuntu Packages] *****************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Enable IPv4 forwarding] ****************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Enable IPv6 forwarding] ****************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Populate service facts] ****************************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Get ufw status] ************************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : If ufw enabled, open api port] *********************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : If ufw enabled, open etcd ports] *******************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : If ufw enabled, allow default CIDRs] ***************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com] => (item=10.42.0.0/16)
skipping: [api.k3s0.ujstor.com] => (item=10.43.0.0/16)
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : If firewalld enabled, open api port] ***************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : If firewalld enabled, open etcd ports] *************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : If firewalld enabled, open inter-node ports] *******************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com] => (item=5001/tcp)
skipping: [api.k3s0.ujstor.com] => (item=8472/udp)
skipping: [api.k3s0.ujstor.com] => (item=10250/tcp)
skipping: [api.k3s0.ujstor.com] => (item=51820/udp)
skipping: [api.k3s0.ujstor.com] => (item=51821/udp)
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : If firewalld enabled, allow node CIDRs] ************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com] => (item=188.245.179.200)
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : If firewalld enabled, allow default CIDRs] *********************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com] => (item=10.42.0.0/16)
skipping: [api.k3s0.ujstor.com] => (item=10.43.0.0/16)
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Add br_netfilter to /etc/modules-load.d/] **********************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Load br_netfilter] *********************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Set bridge-nf-call-iptables (just to be sure)] *****************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com] => (item=net.bridge.bridge-nf-call-iptables)
skipping: [api.k3s0.ujstor.com] => (item=net.bridge.bridge-nf-call-ip6tables)
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Check for Apparmor existence] **********************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Check if Apparmor is enabled] **********************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Install Apparmor Parser [Suse]] ********************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Install Apparmor Parser [Debian]] ******************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Gather the package facts] **************************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : If iptables v1.8.0-1.8.4, warn user] ***************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Add /usr/local/bin to sudo secure_path] ************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Make rancher directory] ****************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Create symlink] ************************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Make manifests directory] **************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Copy manifests] ************************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Make k3s config directory] *************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.prereq : Copy config values] ********************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Get k3s installed version] *********************************************************************************************************************************************************************************************************************************************************************************************
fatal: [api.k3s0.ujstor.com]: FAILED! => {"changed": false, "cmd": "k3s --version", "msg": "[Errno 2] No such file or directory: b'k3s'", "rc": 2, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
...ignoring

TASK [k3s.orchestration.k3s_server : Set k3s installed version] *********************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Download K3s install script] *******************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Download K3s binary] ***************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Add K3s autocomplete to user bashrc] ***********************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Make config directory] *************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Copy config values] ****************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Copy K3s service file [Single]] ****************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Copy K3s service file [HA]] ********************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Add service environment variables] *************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Delete any existing token from the environment if different from the new one] ******************************************************************************************************************************************************************************************************************************************
ok: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Add token as an environment variable] **********************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Restart K3s service] ***************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Enable and check K3s service] ******************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Pause to allow first server startup] ***********************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Check whether kubectl is installed on control node] ********************************************************************************************************************************************************************************************************************************************************************
fatal: [api.k3s0.ujstor.com -> 127.0.0.1]: FAILED! => {"changed": false, "cmd": "kubectl", "msg": "[Errno 2] No such file or directory: b'kubectl'", "rc": 2, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
...ignoring

TASK [k3s.orchestration.k3s_server : Copy k3s.yaml to second file] ******************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Copy kubeconfig to control node] ***************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Change server address in kubeconfig on control node] *******************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Setup kubeconfig context on control node - k3s-ansible] ****************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Merge with any existing kubeconfig on control node] ********************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Wait for token] ********************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Read node-token from master] *******************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Store Master node-token] ***********************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Get the token from the first server] ***********************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Delete any existing token from the environment if different from the new one] ******************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Add the token for joining the cluster to the environment] **************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com] => (item=None)
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Copy K3s service file [HA]] ********************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Copy K3s service file [External DB]] ***********************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Restart K3s service] ***************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Enable and check K3s service] ******************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Verify that all server nodes joined] ***********************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Create directory .kube] ************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Copy config file to user home directory] *******************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Configure default KUBECONFIG for user] *********************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]

TASK [k3s.orchestration.k3s_server : Configure kubectl autocomplete] ****************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]

PLAY [Setup K3S server k3s1] ********************************************************************************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **************************************************************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Enforce minimum Ansible version] *******************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s1.ujstor.com] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [k3s.orchestration.prereq : Install Dependent Ubuntu Packages] *****************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Enable IPv4 forwarding] ****************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Enable IPv6 forwarding] ****************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Populate service facts] ****************************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Get ufw status] ************************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : If ufw enabled, open api port] *********************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : If ufw enabled, open etcd ports] *******************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : If ufw enabled, allow default CIDRs] ***************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com] => (item=10.42.0.0/16)
skipping: [api.k3s1.ujstor.com] => (item=10.43.0.0/16)
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : If firewalld enabled, open api port] ***************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : If firewalld enabled, open etcd ports] *************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : If firewalld enabled, open inter-node ports] *******************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com] => (item=5001/tcp)
skipping: [api.k3s1.ujstor.com] => (item=8472/udp)
skipping: [api.k3s1.ujstor.com] => (item=10250/tcp)
skipping: [api.k3s1.ujstor.com] => (item=51820/udp)
skipping: [api.k3s1.ujstor.com] => (item=51821/udp)
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : If firewalld enabled, allow node CIDRs] ************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com] => (item=49.13.159.158)
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : If firewalld enabled, allow default CIDRs] *********************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com] => (item=10.42.0.0/16)
skipping: [api.k3s1.ujstor.com] => (item=10.43.0.0/16)
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Add br_netfilter to /etc/modules-load.d/] **********************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Load br_netfilter] *********************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Set bridge-nf-call-iptables (just to be sure)] *****************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com] => (item=net.bridge.bridge-nf-call-iptables)
skipping: [api.k3s1.ujstor.com] => (item=net.bridge.bridge-nf-call-ip6tables)
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Check for Apparmor existence] **********************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Check if Apparmor is enabled] **********************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Install Apparmor Parser [Suse]] ********************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Install Apparmor Parser [Debian]] ******************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Gather the package facts] **************************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : If iptables v1.8.0-1.8.4, warn user] ***************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Add /usr/local/bin to sudo secure_path] ************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Make rancher directory] ****************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Create symlink] ************************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Make manifests directory] **************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Copy manifests] ************************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Make k3s config directory] *************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.prereq : Copy config values] ********************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Get k3s installed version] *********************************************************************************************************************************************************************************************************************************************************************************************
fatal: [api.k3s1.ujstor.com]: FAILED! => {"changed": false, "cmd": "k3s --version", "msg": "[Errno 2] No such file or directory: b'k3s'", "rc": 2, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
...ignoring

TASK [k3s.orchestration.k3s_server : Set k3s installed version] *********************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Download K3s install script] *******************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Download K3s binary] ***************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Add K3s autocomplete to user bashrc] ***********************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Make config directory] *************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Copy config values] ****************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Copy K3s service file [Single]] ****************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Copy K3s service file [HA]] ********************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Add service environment variables] *************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Delete any existing token from the environment if different from the new one] ******************************************************************************************************************************************************************************************************************************************
ok: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Add token as an environment variable] **********************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Restart K3s service] ***************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Enable and check K3s service] ******************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Pause to allow first server startup] ***********************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Check whether kubectl is installed on control node] ********************************************************************************************************************************************************************************************************************************************************************
fatal: [api.k3s1.ujstor.com -> 127.0.0.1]: FAILED! => {"changed": false, "cmd": "kubectl", "msg": "[Errno 2] No such file or directory: b'kubectl'", "rc": 2, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
...ignoring

TASK [k3s.orchestration.k3s_server : Copy k3s.yaml to second file] ******************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Copy kubeconfig to control node] ***************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Change server address in kubeconfig on control node] *******************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Setup kubeconfig context on control node - k3s-ansible] ****************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Merge with any existing kubeconfig on control node] ********************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Wait for token] ********************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Read node-token from master] *******************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Store Master node-token] ***********************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Get the token from the first server] ***********************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Delete any existing token from the environment if different from the new one] ******************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Add the token for joining the cluster to the environment] **************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com] => (item=None)
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Copy K3s service file [HA]] ********************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Copy K3s service file [External DB]] ***********************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Restart K3s service] ***************************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Enable and check K3s service] ******************************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Verify that all server nodes joined] ***********************************************************************************************************************************************************************************************************************************************************************************
skipping: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Create directory .kube] ************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Copy config file to user home directory] *******************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Configure default KUBECONFIG for user] *********************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com]

TASK [k3s.orchestration.k3s_server : Configure kubectl autocomplete] ****************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com]
[WARNING]: Could not match supplied host pattern, ignoring: k3s2

PLAY [Setup K3S server k3s2] ********************************************************************************************************************************************************************************************************************************************************************************************************************************
skipping: no hosts matched

PLAY [Fetch and configure kubeconfigs] **********************************************************************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **************************************************************************************************************************************************************************************************************************************************************************************************************************************
ok: [api.k3s1.ujstor.com]
ok: [api.k3s0.ujstor.com]

TASK [Fetch kubeconfig file from remote server] *************************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s0.ujstor.com]
changed: [api.k3s1.ujstor.com]

TASK [Replace server IP in kubeconfig] **********************************************************************************************************************************************************************************************************************************************************************************************************************
changed: [api.k3s1.ujstor.com -> localhost]
changed: [api.k3s0.ujstor.com -> localhost]

PLAY RECAP **************************************************************************************************************************************************************************************************************************************************************************************************************************************************
api.k3s0.ujstor.com        : ok=40   changed=25   unreachable=0    failed=0    skipped=46   rescued=0    ignored=2
api.k3s1.ujstor.com        : ok=40   changed=25   unreachable=0    failed=0    skipped=46   rescued=0    ignored=2

root@899a18f055c8:/ansible# ls -la
total 40
drwxr-xr-x 1 root root 4096 Dec 25 19:21 .
drwxr-xr-x 1 root root 4096 Dec 25 19:17 ..
-rw-r--r-- 1 root root  459 Dec  8 20:35 Dockerfile
-rw-r--r-- 1 root root  239 Dec  8 20:35 ansible.cfg
-rw-r--r-- 1 root root 2112 Dec 25 06:59 k3s_deploy.yml
-rw-r--r-- 1 root root  207 Dec  8 20:35 k3s_remove.yml
-rw------- 1 root root 2971 Dec 25 19:21 kubeconfig_k3s0
-rw------- 1 root root 2971 Dec 25 19:21 kubeconfig_k3s1
-rw-r--r-- 1 root root  169 Dec  8 20:35 requirements.yml
drwx------ 3 root root 4096 Dec  8 20:35 roles