That's great thanks !! So if I want to pass a param to the template from
the command line would this work ??
1. The command:
bolt plan run profiles::puppet_upgrade servers=hostname.domain.com
location=uk --user root
2. The plan:
plan profiles::puppet_upgrade(
TargetSpec $servers,
) {
apply($servers) {
class { 'profiles::upgrade': location => $location }
}
}
3. The manifest:
class profiles::upgrade ($location = undef) {
file { '/root/my_file.txt':
ensure => file,
content => epp('my_module/my_file.epp', { '$_location' => '$location'
})
}
}
4. The template:
location = <%= $_location %>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/4bf85107-2d24-42f2-a641-e09e8f189fa4%40googlegroups.com.