[Feature Request] Ansible collection
Hello, I know API access is still in preview so I'm asking that for a relatively distant future
I'd love to get a first party Ansible collection to manage the accounts, so pretty much get 1 module per API endpoint 😁
Note: I might find time to create a POC of such collection if someone is interested
Started development on https://github.com/vic1707/ansible-collection-purelymail Still in the very early stages, atm only account credit retrieval is implemented
Routing rules related modules are done 🥳 Starting development on domain related modules.
Just finished domain's crud modules. I'll start working on the idempotent domain module asap.
Hi @alicethefemme, @ScottPeterJohnson (sorry for the ping), I’ve also been wondering whether you might be interested in taking ownership of the collection.
And if possible, could you take a look at pushing forward #344 (or something similar)? To ensure the Ansible modules work correctly, I need to run a large number of requests against my account, many of which involve deleting or updating my own settings/configuration. That’s manageable for now, but it might become a real issue once I start working on user-related functionality. At the moment, for example, I can’t even create routing rules because the tests keep interfering with my setup. 😓
I’d prefer not to create a separate dummy account solely for testing. While it would make things easier for me (and safer once tests run in CI), I’m not sure how long the free initial credit would last, I'm not sure I want to put credit on that account solely for testing purposes, not to mention your infra having to support another account that wouldn't really do anything.
Domain module is done, but untested via integration tests as it would nuke my personal account
@vic1707 If you have a guide to the setup available, then I can have a go at testing this on our demo account if that would help?
@alicethefemme I didn't write the integration test for now as I would take the risk of running it on my main account during development 😓.
If I may ask for a bit much, would it be possible to get access to a test account's API key (one you don't depend on as I would nuke its state quite often)? Ideally I'd want to have GitHub CI run these tests unsupervised. (Obviously I wouldn't use that account for anything else, you can disable sending and receiving emails if you want.)
To see what the tests are doing you can read the content of the tests/integration folder (the yaml files describe what they're doing). I'm calling every endpoint, checking their outputs and nuking state so I only need access to the API.
by the way, if you need help for the API or would like to take ownership of the Ansible collection, I can help 👍
@alicethefemme Quick not to say I'll be adding a readme and a contributing guide so you can test on your end if you want, the release of the collection will have to wait for me to finish implementing the current version of the API
Just added https://github.com/vic1707/ansible-collection-purelymail/blob/main/CONTRIBUTING.md if you want to take a look @alicethefemme.