K3s Ansible Playbook - Define multiple ansible_users
Try to configure your host.ini
like this:
master ansible_port=22 hostname=master.example.com ansible_host=192.168.xxx.xxx ansible_user=antonisnode1 ansible_port=22 hostname=node1.example.com ansible_host=192.168.xxx.xxx ansible_user=pinode2 ansible_port=22 hostname=node2.example.com ansible_host=192.168.xxx.xxx ansible_user=pi[master]master[node]node1node2[k3s_cluster:children]masternode
Important keys for you are ansible_user
, ansible_host
. Others ansible_port
, hostname
are optional, so only if you need them.