Ask Your Question

Trasnfer .tar files to from puppet master to agent nodes

asked 2014-09-26 16:16:47 -0600

umairch gravatar image

I would like transfer some tar packages to several nodes (solaris, linux) and then make them execute so that required installation/deployment gets done. What would i have to write to get this done

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-09-27 10:25:48 -0600

llowder gravatar image

I'd suggest you use the nanliu/staging module from the Puppet Forge to do this, rather than creating your own module to do the same thing.

From the readme, staging and extracting a file can be as simple as:

staging::deploy { 'sample.tar.gz':
  source => 'puppet:///modules/staging/sample.tar.gz',
  target => '/usr/local',
edit flag offensive delete link more

answered 2014-09-27 10:24:15 -0600

jonn gravatar image

I've used the staging module for this type of thing in the past. It's really easy to use. It will transfer the files for you and optionally unpack them on the agent side. If you follow the link, there are some examples shown on the Forge page.

I notice that a new module puppet-archive is in development to replace staging, but it doesn't look like it's ready just yet.

edit flag offensive delete link more


I have used the staging module for transferring tar.gz file. It places the original file on target nodes with the specified permissions but the unpacked file ownership gets changed to "user test, group:games". Please advise

umairch gravatar imageumairch ( 2014-11-04 17:59:39 -0600 )edit

My guess is that those are the permissions of the files inside the tarball? If so, you can either fix up the tarball to have the permissions that you require, or you could chain an Exec['/bin/chown'] resource to the staging::deploy to sort out the permissions on the agent side.

jonn gravatar imagejonn ( 2014-11-21 04:05:54 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2014-09-26 16:16:47 -0600

Seen: 700 times

Last updated: Sep 27 '14