Is there any way to attach the deployement scenario in a Python object ?
All the examples I see are global functions called at a root of a module.
How do I make a scenario pluggable? Reusable? Introspectable?
It is possible to use pyinfra as a Python API, but this is not currently officially supported/may not follow semver, example: https://github.com/Fizzadar/pyinfra/blob/master/examples/api....
> How do I make a scenario pluggable? Reusable? Introspectable?
pyinfra comes with builtin support for packaging "deploys" as Python packages, see: https://pyinfra.readthedocs.io/en/v0.14.5/api/deploys.html, an example: https://github.com/Fizzadar/pyinfra-docker.
The use of Python for the inventory + deploy code makes it possible to integrate pyinfra with almost any external tool, without specific support in pyinfra (that's the theory, at least!).
How is it executing remote commands ?
Is it uploading a script like ansible, or just executing remote commands ? The latter seems to be the case glancing at the source code, nice one !
Seems like a much more modern Ansible to me, more precise but more targeting Python users instead of trying to attract non-coders too, it's very promising. I wish I had found your project before I started my own too, it's shitty compared to yours but i'll swallow my shame and share it with you just in case you find an idea that you like yourlabs.io/oss/shlax