GarbageYard

Puppet Params Usage

Apr 6th, 2017
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Puppet 0.81 KB | None | 0 0
  1. Block 1:
  2. class infra::agent_dir_structure (
  3.     $agent_dir_structure_list = $infra::params::agent_dir_structure_list,
  4. ) inherits infra::params {
  5.     $agent_dir_structure_list.each |$dir| {
  6.         file { $dir:
  7.             ensure => directory,
  8.         }
  9.     }
  10. }
  11. ---------------------------------------------------------------------------
  12. Block 2:
  13. class infra::agent_dir_structure () inherits infra::params {
  14.     $agent_dir_structure_list.each |$dir| {
  15.         file { $dir:
  16.             ensure => directory,
  17.         }
  18.     }
  19. }
  20. ---------------------------------------------------------------------------
  21. [tom@peserver manifests]# cat params.pp
  22. class infra::params (
  23.     $agent_dir_structure_list = [
  24.         'c:/puppet',
  25.         'c:/puppet/setups',
  26.         'c:/puppet/builds',
  27.         ...
  28.         ...
  29.     ],
  30. ) {}
Add Comment
Please, Sign In to add comment