lablabs / ansible-role-rke2

Ansible Role to install RKE2 Kubernetes.
https://galaxy.ansible.com/ui/standalone/roles/lablabs/rke2/
MIT License
318 stars 153 forks source link

sudo: a password is required #10

Closed todeb closed 2 years ago

todeb commented 2 years ago

I'm using the user with paswordless sudo,

TASK [lablabs.rke2 : Replace loopback IP by master server IP] ** fatal: [rke-test-3-dc3-mgmt -> localhost]: FAILED! => {"changed": false, "module_stderr": "sudo: a password is required\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1} fatal: [rke-test-1-dc1-mgmt -> localhost]: FAILED! => {"changed": false, "module_stderr": "sudo: a password is required\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

MonolithProjects commented 2 years ago

Hi @todeb thanks for this issue. The task which failed for you is running on local host. So, probably if you don't have passwordless sudo there, the task will fail with error you mentioned above. However, there is no need to use privilege escalation on this task. I will fix it in next patch release.

todeb commented 2 years ago

What does this task is doing? Im also seeing that I do not have a kubeconfig copied to localhost. Maybe that is a reason.

MonolithProjects commented 2 years ago

This task replaces the localhost IP address by the IP address of the master server (or keepalived VIP) in the file ../../rke2.yaml .

In the release 1.2.0 the default path where the kubeconfig is downloaded is /tmp/rke2.yaml. You can specify custom path with variable rke2_download_kubeconf_path.

MonolithProjects commented 2 years ago

Closing due to inactivity.