Would maintainers be open to have facts set for the auth arguments for tasks?

When connecting to hosts through SSH you can set the auth parameters with connection arguments, or ansible can use the generic ones (like ansible_ssh_pass), but every time I use a task from community.proxmox I need to set a handful of values for things that normally don’t change during a playbook (api_host, api_user, api_password and node). Would the maintainers be open to having facts set that would be used in case those arguments were not provided? That would make the tasks more readable by removing boilerplate

I haven’t seen how to do it, but I’m happy to write that code myself and send it out. At this point I’m trying to check if people would be ok with that before spending the time doing it :wink:

There is already functionality in ansible for that - module defaults

And module defaults groups

1 Like

Note that community.proxmox provides a module defaults group group/community.proxmox.proxmox, documented for example here: community.proxmox.proxmox module – Management of instances in Proxmox VE cluster — Ansible Community Documentation

Awesome, thanks for the pointers, I’ll look into this

1 Like