How to refer to an existing uid and gid in Ansible?

You should be able to just specify uid=amavis-user,gid=amavis-group in your /etc/fstab. The linux mount program will interpret them correctly.


See the Ansible module getent with database=passwd.