The user you connect as ('becomeuser' - I suppose that's obfuscated)
isn't allowed to do sudo.
If you fix that things are likely to start working.
On a related note, you can remove become_user as that it set to its
default (root), as well as become_method, which default to sudo.
So basically just "become: true" is needed.
its working, but thats not more than a workarround…
I think the problem is, that the sudo-template exactly contains the command “/usr/bin/systemctl * filebeat.service filebeat.service” an ansible uses any other command to start/stop the service
the sudo-configuration in our enviroment is pretty strict, so i´m sure, that we couldn´t work with ansible in this cases. “Sudo su” to become root isn´t allowed.
ih´ve already seen this page and think that become_exe is what i´m searching for. But i´m not able to download this plugin, the github-page is not available.
Thats how i log in and use sudo-commands manuel on this system:
→ Login with my personal user (No Sudo-privileges)
→ Sudo su - sudouser
→ Type sudo /usr/bin/systemctl start filebeat.service
ansible uses the sudouser directly to execute commands on the remote servers…
Well, when you're not allowed to "become" root then you are not allowed to
configure the system and as result you can´t "work with ansible in this
cases".