i am using similar logic(xml & xslt) for creating jenkins configs using lwrp. the resource declaration looks like this:xml_file '/var/lib/jenkins/config/org.jenkinsci.plugins.ghprb.GhprbTrigger.xml' domappings('//adminlist' => @github_users.join("\n"))source 'ghprb_config.xml.erb'notifies :restart, 'service[jenkins]'endinternally it uses file resource for content/ownership etc and nokogiri for xml/xslt stuff. mappings is an array of key/value pairs (selector -> expected value) used to pass xslt targets. this is idempotent and why_run compliant.regardsranjibOn Tue, Jul 1, 2014 at 9:13 AM, < " target="_blank"> > wrote:
You are right about the idempotent, and my example does not show that. I use
"action :nothing" and notifications to trigger the generation.
I am not so happy about it, it does not show a diff as "template" does and
xsltproc runs on the target.
I may eventually try to implement your LWRP suggestion
Thanks
Archive powered by MHonArc 2.6.16.