You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found generating valid and neat XML files with Jinja templates a little fiddly. Jinja also felt like the wrong tool. When I experimented with xmltodict, it worked very well. The following code is what I ended up with for firewalld config. I can recommend it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I found generating valid and neat XML files with Jinja templates a little fiddly. Jinja also felt like the wrong tool. When I experimented with xmltodict, it worked very well. The following code is what I ended up with for firewalld config. I can recommend it.
This is how you can install pyinfra with xmltodict:
uv tool install --with xmltodict pyinfra # or pipx install pyinfra pipx inject pyinfra xmltodictAll reactions