Reg : Pushing files from Puppet Master to Agent node

3,275 views
Skip to first unread message

krishna bhaskara rao

unread,
Jan 28, 2014, 7:09:07 AM1/28/14
to puppet...@googlegroups.com
Hi,

I have installed puppetmaster in ubuntu machine and i have installed puppet in all my clients using apt-get. I have joined all my puppet clients with puppet master. Is it possible to copy a file to all these puppet clients from puppet master instead of going into agent and issue the command to pull?

Please any one can response as early as possible.

With Regards,
Krishna Bhaskar.


SHARNIND...@dell.com

unread,
Jan 28, 2014, 7:16:45 AM1/28/14
to puppet...@googlegroups.com

Dell - Internal Use - Confidential

Read up about the built-in file resource type.

 

http://docs.puppetlabs.com/references/latest/type.html#file

 

--

Sharninder

 

 

--
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 puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/efa13350-1ff8-40c4-af3f-31e5a114d487%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Dirk Heinrichs

unread,
Jan 28, 2014, 7:21:05 AM1/28/14
to puppet...@googlegroups.com
Am 28.01.2014 08:09, schrieb krishna bhaskara rao:

I have installed puppetmaster in ubuntu machine and i have installed puppet in all my clients using apt-get. I have joined all my puppet clients with puppet master. Is it possible to copy a file to all these puppet clients from puppet master instead of going into agent and issue the command to pull?

No. The master does not actively push stuff to the agents. However, you also don't need to "go into agent and issue the command to pull". The agent runs as a daemon and queries the master every 30 minutes, so all you need to do is to provide a manifest containing a "file" resource which puts your file in place.

For example, a simple approach to change the agents puppet.conf could look like this:

/etc/puppet/modules/puppetconf/manifests/init.pp

class puppetconf {

  service { 'PuppetAgent':
    name => 'puppet',
    ensure => 'running',
    enable => 'true',
    subscribe => File['puppet.conf'],
  }

  file { 'puppet.conf':
    path => '/etc/puppet/puppet.conf',
    ensure => file,
    source => 'puppet:///modules/puppetconf/puppet.conf',
  }
}

You would then put the puppet.conf file that should be copied to your agents into /etc/puppet/modules/puppetconf/files.

HTH...

    Dirk
--

Dirk Heinrichs, Senior Systems Engineer, Engineering Solutions
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Tel: +49 2226 1596666 (Ansage) 1149
Email: d...@recommind.com
Skype: dirk.heinrichs.recommind
www.recommind.com

Jose Luis Ledesma

unread,
Jan 28, 2014, 7:41:29 AM1/28/14
to puppet...@googlegroups.com
In fact puppetmaster cannot force a push, but mcollective can force a puppet run. And that with a file resource would make the job.

Regards,

krishna bhaskara rao

unread,
Jan 28, 2014, 8:57:36 AM1/28/14
to puppet...@googlegroups.com
Hi,

Can I use Mcollective with puppet open source ?

Jose Luis Ledesma

unread,
Jan 28, 2014, 9:09:30 AM1/28/14
to puppet...@googlegroups.com
Yes. I recommend the puppetlabs/mcollective module to make the configuration easier.

Regards

krishna bhaskara rao

unread,
Jan 28, 2014, 9:14:12 AM1/28/14
to puppet...@googlegroups.com
Hi,

I am new to puppet. I am using Puppet open source version. I could not find how to configure MCollective with Puppet open source.
If you have any documentation for this configuration, Please share me.
With Regards,
Krishna.

Jose Luis Ledesma

unread,
Jan 28, 2014, 9:21:09 AM1/28/14
to puppet...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages