- From: Ranjib Dey <
>
- To: "
" <
>
- Subject: [chef] Re: Re: Re: xslt templates
- Date: Tue, 1 Jul 2014 09:35:03 -0700
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' do
mappings('//adminlist' => @github_users.join("\n"))
source 'ghprb_config.xml.erb'
notifies :restart, 'service[jenkins]'
end
internally 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.
regards
ranjib
Archive powered by MHonArc 2.6.16.