while trying to setup a remote machine using ansible, I am running into the following issue:
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}
I am already escalating privileges in the playbook using the following method:
become: yes
become_method: community.general.sudosu
two of the tasks are successfully being executed with escalated privileges as well. i am running into this error when I run the following task:
- name: Pushing Nebula configs to node
synchronize:
src: <local dir>
dest: "/etc/<target_dir>/"
dest_port: "{{ ssh_port }}"
mode: push
delegate_to: localhost
the user I am using does not require a sudo password.