I created my first module using your python boilerplates. How do I get my Ansible Playbook to find it? According to the docs, I placed it in ./library/env_checks.py but I still get “ERROR: enviro_checks_ansmodule is not a legal parameter in an Ansible task or handler” What steps am I missing?
Ah, yeah that’s needed so that ansible can tell this is a module written in python vs ruby or perl or another language. The second line is nice boilerplate but not strictly needed. It tells python what encoding to use when it reads the file. It’s usually only needed when you embed a non-ascii literal in the file. (For instance, someone puts their name in a comment and their name has accents)