This seems like it would be a worthy addition to upstream Ansible. Would you consider submitting this to https://github.com/ansible/ansible-modules-extras ?
If you're not interested in dealing with that process, I'd be happy to submit a PR to ansible-modules-extras myself (maintaining credit to you as Git author and copyright owner).