I would like to provision a system on AWS using Ansible, recreate my ~8000 users and establish user quotas… edquota opens an interactive editor, so it’s not particularly Ansible-friendly. Has anyone here set user filesystem quotas via Ansible?
IIRC the `quota` command can be used to set/modify/remove user quotas
w/o interactive prompts, its been years since i set user quotas so
things might have changed.
So far I have found that quota seems to only display quota information. I could use edquota with -p flag to point to an account as a prototype, but that still leaves me needing to set up at least one account manually. As far as I know, the files (aquota.user and aquota.group) are not stored in plain text, leaving me without the option to use lineinfile.
If anyone is using Ansible to manage quotas, they are keeping it quiet.
there is an workaround about edquota problem I used some long time ago. You can override editor taht is called for quota editing. It is using standard EDITOR environment variable. What I done was supply my own script to EDITOR, that returned quota in proper formatting and without user interaction.
Okay, it looks like there is a module for managing GlusterFS volumes…and it has a ‘quota’ option. I’m not sure if that applies to users, groups, or files/directories.