Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@ip-172-31-20-152 modules]# cat foo/manifests/params.pp
- class foo::params {
- $bar = 'baz'
- }
- [root@ip-172-31-20-152 modules]# cat foo/manifests/something.pp
- class foo::something {
- # this does NOT resolve up to $foo::bar because it has no parent class
- notify { $bar: }
- }
- [root@ip-172-31-20-152 modules]# cat foo/manifests/init.pp
- class foo inherits foo::params {
- notify { $bar: }
- include foo::something # Scope does NOT follow down to this class
- }
- [root@ip-172-31-20-152 modules]# puppet apply -e 'include foo'
- Warning: Unknown variable: 'bar'. at /opt/puppetlabs/puppet/modules/foo/manifests/something.pp:3:12
- Error: Evaluation Error: Missing title. The title expression resulted in undef at /opt/puppetlabs/puppet/modules/foo/manifests/something.pp:3:12 on node ip-172-31-20-152.us-west-2.compute.internal[root@ip-172-31-20-152 modules]# puppet --version
- 5.1.0
Add Comment
Please, Sign In to add comment