-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with attributes #27
Comments
For the first issue, this sounds similar to #15 . I've been pondering how to clear up the use of this feature by unit tests & the readme. The register crash is more troubling. What version OS, ansible, lxml, & python are you using? |
It does indeed appear to be similar to #15. I was able to get my desired effect for the given xml: <?xml version='1.0' encoding='UTF-8'?>
<configuration version="11">
<gui enabled="false" tls="false">
<address>0.0.0.0:8080</address>
<apikey>ABCDEFGHI</apikey>
</gui>
</configuration> with the given task: - name: Config | Enable GUI
xml:
file: "{{st_config}}"
xpath: /configuration/gui
attribute: enabled
value: 'true' Two things to notice here:
I was able to add and change attributes with this pattern. |
Opened a separate issue for the register problem. |
I am attempting to write a playbook for Syncthing and use ansible-xml for managing the config file.
However I seem to be having issues when it comes to attributes.
I have the following task, which I would expect to set the
enabled
attribute toyourmom
but it does nothing.I know that
st_config
is correct, because this task works just fine:I am also having trouble extracting attribute values via a
register
command, that will crash the entire run (rather than failing silently). I was going to enter a ticket for it, however I now wonder if my syntax is incorrect.The text was updated successfully, but these errors were encountered: