Connection Plugin for Micropython on ESP 8266 / other microcontroller boards

Hi there,
I’m pretty new to Ansible so thought I’d jump in at the deep end and develop a plugin to allow file copy and some execution on microcontrollers running micropython.

I have the bones of it working, but not really properly - only with filenames hardcoded in the plugin!! I have a Connection class based on the ‘local’ plugin example. In there I have changed the _connect method to actually connect and login to the microcontroller.

My issues:

  • In the put_file method, in_path and out_path are radically different to what I’ve specified in my playbook.yml - what am I missing / how do I retrieve them?
  • I haven’t found a diagram of how Ansible makes use of plugins such as the connection type. It’s unclear to me what objects and variables are available for use.
  • If anyone is aware of another project that has done what I’m trying to do, please let me know - a search on Ansible Galaxy didn’t reveal anything (to me at least!)

Any advice would be greatly appreciated.

Best,
Ian