Trouble serving files using puppet:///modules

asked 2015-04-17 13:46:28 -0500

dpstrxr gravatar image

updated 2015-04-17 14:21:05 -0500

csharpsteen gravatar image

I'm attempting to copy a file down to the node using the following:

 file {'/var/cache/yum/elasticsearch-1.5.1.noarch.rpm':
       source => 'puppet:///modules/elasticsearch/elasticsearch-1.5.1.noarch.rpm',
     }

On the node side i get:

  Error: /Stage[main]//Node[esdata01-9.prod.mh.bos.gazint]/File[/var/cache/yum/elasticsearch-1.5.1.noarch.rpm]: Could not evaluate: Could not retrieve information from environment mh_prod source(s) puppet:///modules/elasticsearch/elasticsearch-1.5.1.noarch.rpm

I have confirmed the following on the master:

  • the file exists at : /etc/puppet/environments/mh_prod/modules/elasticsearch/files/elasticsearch-1.5.1.noarch.rpm

  • /etc/puppet/puppet.conf has the contains: modulepath = $confdir/modules:$confdir/environments/$environment/modules:$confdir/environments/gameops/modules templatedir = $confdir/environments/$environment/templates

    • the owner of /etc/puppet/environments/mh_prod/modules/elasticsearch/files is puppet:puppet

    I'm new to puppet and I can't find any logging info.

    Many thanks!

edit retag flag offensive close merge delete

Comments

1

try running the node with `puppet agent --debug` and see if that provides any additional information?

JohnsonEarls gravatar imageJohnsonEarls ( 2015-04-17 15:18:02 -0500 )edit

First you have to write the modulepath=/etc/puppet/modules in puppet.conf file in [main] section. then whatever file you have to transfer on agent side, this file first present in your module i.e in files directory and then write. source => "puppet:///module_name/file_name",

akshay gravatar imageakshay ( 2015-04-21 01:35:46 -0500 )edit