I’ve personally created several Ansible modules, and to share this expertise, I’ve written a helpful blog post that may inspire others. I’ll walk you through the process of creating an Ansible module step by step. Here’s the link to the blog post I wrote.
@Opvolger hello, thanks for the blog post!
I would suggest running ansible-test sanity <you-module-file> --docker against your module: I see a few things to improve.
Thanks
I didn’t know that command. remove the 1ste line #!/usr/bin/python and format the code with the autopep8 plugin in vs-code and all the errors are gone.
@Opvolger sure, you’re welcome!
You can also check this post out for more ideas for your blog, in particular, a next step could be how to cover your module with integration tests to make sure it works as expected and how to run them locally. It’s in p. 3 Creating an Ansible collection with a simple module step-by-step.