3 ms·
I'm looking for an alternative to ansible and fabric 2, some kind of middleground, and pyinfra looks like something I want to give a try to. Is there any way t
by BiteCode_dev 6y ago
I'm looking for an alternative to ansible and fabric 2, some kind of middleground, and pyinfra looks like something I want to give a try to.
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?
- Fizzadar 6y ago> Is there any way to attach the deployement scenario in a Python object ? 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_deploy.py 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 https://pyinfra.readthedocs.io/en/v0.14.5/api/deploys.html, an example: https://github.com/Fizzadar/pyinfra-docker https://github.com/Fizzadar/pyinfra-docker.
- BiteCode_dev 6y agoThanks. I like the fact you can do a quick and dirty script, but the wrap it up in tasks if you want.