I've created a file resource that is using a template file as content which is generated from a automatic hiera lookup.
$source_list_template = template($sources['list.template'])
file { 'sources.list':
ensure => file,
...
content => template($source_list_template),
notify => Exec['apt_update'],
}
I've already figured how to set the :params to make it available to the context:
let(:params) { {
:sources => {
'list.template' => 'puppet:///files/sources.list.erb',
}
} }
I now need to know how I can create a virtual template file or the content of this file to test how the final file should look like.
I've not found this in the documentation on http://rspec-puppet.com and https://github.com/rodjek/rspec-puppet.
↧