F
F
FlashHaos2019-11-12 01:22:47
Ansible
FlashHaos, 2019-11-12 01:22:47

How to write ansible modules to control external hardware?

I'm just learning ansible and I absolutely can't find clear examples of modules that control external hardware via SSH without the ability to install local python.
I mastered playbooks with the raw module, everything is clear, but I would like to hide the complex and repetitive logic in the module. But I can't figure out how to work correctly with the equipment through the terminal. run_command pushes a Python script to the host and is not applicable here.
View modules from the storage section - they all use external libraries to work with arrays. This is not a stylish solution. The module should work out of the box.
I tried to adapt something from the network modules - but I could not understand them.
Please help with advice, or at least direct me to a specific file for reading.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question