One of the main uses of Augeas in Puppet is to edit XML nodes. The typical use identifies a node and sets its text and/or attributes, so I'd suggest an xml_node type like so:
xml_node { 'some node':
ensure => present, # or absent, maybe positioned as well
target => '/path/to/file.xml',
path => '/path/to/node', # allow to pass an Augeas expression to filter out node
text => 'my text value', # maybe a way to remove the value
attributes => {
attr1 => 'val1',
attr2 => 'val2',
},
attr_append => true, # should we not replace the attributes?
}
One of the main uses of Augeas in Puppet is to edit XML nodes. The typical use identifies a node and sets its text and/or attributes, so I'd suggest an
xml_node
type like so:Would that be useful? Is it missing something?