Hi,

I was wondering if it's possible to use an existing resource type say file, 
e.g. 
lets say following is all I need to do:

    file {'testfile':
      path    => '/tmp/testfile',
      ensure  => present,
      mode    => 0640,
      content => "I'm a test file.",
    }


Normally,
OPTION1

   - Put the resource declaration above in my site.pp. Inside a node 
   definition like:

node my_host {    file {'testfile':
      path    => '/tmp/testfile',
      ensure  => present,
      mode    => 0640,
      content => "I'm a test file.",
    }
}


or OPTION2

   - I would create .../my_module/manifests/init.pp and put the resource 
   declaration in it.
   - Create my_host.yaml in appropriate directory with:
   
    classes:
      my_module


   - In my site.pp I will put:
   
    hiera_include('classes')


   - Assuming standard hiera.yaml hierarchy.
   
I'm wondering if there is a third option that allows me to get the best of 
both options:

   - No hardcoding in site.pp for my node name, catalog is decided via 
   hiera yaml config files.
   - No separate module/class manifest containing just a 'single liner' 
   resource declaration.

Thanks..

-- 
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/c8b8eef1-897f-4ea2-a8bf-2a6066637e3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to