Skip to content

Instantly share code, notes, and snippets.

@domcleal
Created January 21, 2012 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domcleal/1654201 to your computer and use it in GitHub Desktop.
Save domcleal/1654201 to your computer and use it in GitHub Desktop.
Puppet/Augeas quoting workaround with ERB templates (#7529)
quoting.pp:
$node = "foo"
augeas { "set-entry":
context => "/files/etc/sysconfig/network",
changes => [
"set INLINE[. = '\"$node\"'] '\"$node\"'",
],
}
augeas { "set-erb":
context => "/files/etc/sysconfig/network",
changes => template("quoting.erb"),
}
quoting.erb:
set ERB[. = '"<%= node %>"'] '"<%= node %>"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment