Skip to content
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

XML types #150

Open
raphink opened this issue Nov 20, 2017 · 0 comments
Open

XML types #150

raphink opened this issue Nov 20, 2017 · 0 comments
Labels
enhancement New feature or request

Comments

@raphink
Copy link
Member

raphink commented Nov 20, 2017

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?
}

Would that be useful? Is it missing something?

@raphink raphink added the enhancement New feature or request label Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant