|
|
|
|
|
by sa46
2202 days ago
|
|
> Ansible has its own set of features that are largely abstracted out by its YAML playbook syntax. I don't understand what YAML has to do with abstraction. The example from pyinfra is pretty much the same as the ansible equivalent. Whether the feature set is comparable is a different question (I agree with you, it's probably nowhere close to ansible). apt.packages(
{'Install iftop'},
'iftop',
sudo=True,
update=True,
)
> If you feel YAML is too complicated for youAnsible YAML is a poor substitute for a real language once you add conditional logic to the mix. Another huge downside is that composition in YAML is much harder than in any programming language. A Python (or dhall, or cue) library that compiled to ansible would be pretty swell. |
|
Given that the average devops person is already stuck with yaml, many of those problems are addressed by jsonnet. But I agree, having it in the language would be preferable. I think it stems from the desire to make infrastructure declarative, which isn't really the case when your declarations are dynamic.