Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Copying a file directoy to agents

HI All, I'm very new to puppet and I'd like to know how I should go about copying a directory with files on to puppet agent nodes. My scenario:

I have a "/var/pupstuff" directory on my puppet server

i'd like to copy the the directory pupstuff and it's content (some files) on to my agent's "/home/bindo" location. Below is my code

 file { '/home/bindo/pupstuff':
    ensure  => directory,
    recurse => true,
    owner   => root,
    group   => root,
    mode    => 0644,
    source  => "puppet:///var/pupstuff",

But throws the below error,

   Error: /Stage[main]/Linux/File[/home/bindo/pupstuff]: Failed to generate additional resources using 'eval_generate': Error 400 on SERVER: Not authorized to call search on /file_metadata/var/pupstuff with {:recurse=>true, :checksum_type=>"md5", :links=>"manage"}
Error: /Stage[main]/Linux/File[/home/bindo/pupstuff]: Could not evaluate: Could not retrieve file metadata for puppet:///var/pupstuff: Error 400 on SERVER: Not authorized to call find on /file_metadata/var/pupstuff with {:source_permissions=>"use", :links=>"manage"}

Please can someone advice? Many thanks in advance