LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-12-2011, 05:43 PM   #1
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Question Transfer files in Puppet


Hi All,

I have setup a Puppet Server on my Cent OS 5.5 machines.

I have box1.test.com as Puppet Server
and
box2.test.com as Puppet Client

These are the packages involved :
puppet-server v0.22.4-1
puppet v0.22.4-1
facter v1.3.7-1
ruby v1.8.5


I am looking a class to transfer files from my Pupper Server to Puppet Clients.

I have used this code in /etc/puppet/manifests/nodes.pp
Code:
 
file { "/tmp/abc.sh":
        source => "puppet:///var/lib/puppet/files",
    }
Below, is my /etc/puppet/fileserver.conf
Code:
[files]
path /var/lib/puppet/files/
allow *.test.com


When, I try to use the above file syntax in Puppet Client, I get below errors.
Code:
 
#  puppetd --test --server=box1.test.com
notice: Ignoring cache
info: Caching configuration at /var/lib/puppet/localconfig.yaml
err: //box2/File[/tmp/abc.sh]/source: Could not describe /var/lib/puppet/files: Fileserver module 'var' not mounted
notice: Finished configuration run in 0.33 seconds
#
I have googled it but could not find anything which worked for me. I can make a shell script and run it, but I am looking to use this file syntax.
 
Old 01-12-2011, 08:13 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
You really should read the doco, puppet is not the simplest application. Your config should look more like :

Code:
file { "abc.sh":
        path => "/tmp/abc.sh",
        source => "puppet:///files/abc.sh",
    }
Ref: http://docs.puppetlabs.com/guides/file_serving.html
 
Old 01-23-2011, 01:07 AM   #3
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by kbp View Post
You really should read the doco, puppet is not the simplest application. Your config should look more like :

Code:
file { "abc.sh":
        path => "/tmp/abc.sh",
        source => "puppet:///files/abc.sh",
    }
Ref: http://docs.puppetlabs.com/guides/file_serving.html
This did not worked for me for some reasons

Anyways, I made an alternative to run shell script for transferring file.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameter to execute shell script on puppet client through Puppet server niraj.kumar Linux - Server 3 02-08-2011 09:01 PM
So who has installed Puppet 0.25.0? DaveQB Linux - Enterprise 4 10-02-2009 02:20 AM
Puppet/facter anomalies DaveQB Linux - Software 1 08-28-2009 01:42 AM
Batch files to execute and transfer files via sftp cm67 Linux - General 5 08-13-2009 09:59 AM
LXer: Servers Dance on a String With Puppet LXer Syndicated Linux News 0 03-04-2007 09:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration