According to ansible-lint the correct value for become_method su and sudo are the fully qualified names ansible.builtin.su and ansible.builtin.sudo (https://github.com/ansible/ansible-lint/blob/main/src/ansiblelint/schemas/ansible.json#L48)
Making the switch to these fully qualified names while using the Mitogen connection strategy produces the following error :
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'ansible.builtin.sudo'
fatal: [REDACTED]: FAILED! =>
msg: 'Unexpected failure during module execution: ''ansible.builtin.sudo'''
stdout: ''
Here is an example playbook that will reproduce the bug:
# test-playbook.yml
- hosts: localhost
tasks:
- name: Run a shell command
ansible.builtin.command: /bin/echo $(id -un)
become: true
become_user: nobody
become_method: ansible.builtin.sudo
PR is here: #1072