xml
Collection: community.general
Full Name: parallax.community.general.xml
Aliases: community.general.xml, xml
Synopsis
Manage xml
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| path | string | yes | Path to the XML file to manage | |
| xpath | string | yes | XPath expression to select elements | |
| value | string | The value to set for the selected element | ||
| attribute | string | The attribute to set on the selected element | ||
| state | string | present | Whether the element should be present or absent Choices: present, absent | |
| content | string | text | Type of content to set: text or attribute Choices: text, attribute | |
| namespaces | string | Namespace mappings as comma-separated prefix=uri pairs | ||
| pretty_print | bool | true | Pretty print the XML output | |
| backup | bool | false | Create a backup file before modifying |
Example
- name: Example xml task
xml:
path: <your_path>
xpath: <your_xpath>