Guest User

Untitled

a guest
Jul 20th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. [root@ip-172-31-20-152 modules]# cat foo/manifests/params.pp
  2. class foo::params {
  3. $bar = 'baz'
  4. }
  5.  
  6. [root@ip-172-31-20-152 modules]# cat foo/manifests/something.pp
  7. class foo::something {
  8. # this does NOT resolve up to $foo::bar because it has no parent class
  9. notify { $bar: }
  10. }
  11.  
  12. [root@ip-172-31-20-152 modules]# cat foo/manifests/init.pp
  13. class foo inherits foo::params {
  14. notify { $bar: }
  15.  
  16. include foo::something # Scope does NOT follow down to this class
  17. }
  18.  
  19. [root@ip-172-31-20-152 modules]# puppet apply -e 'include foo'
  20. Warning: Unknown variable: 'bar'. at /opt/puppetlabs/puppet/modules/foo/manifests/something.pp:3:12
  21. 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
  22. 5.1.0
Add Comment
Please, Sign In to add comment