Ask Your Question

Do we have a packaging mechanisam in puppet ?

asked 2017-03-12 04:13:40 -0600

Suresh300567 gravatar image

I want to package an rpm file and push it to the target servers.. What should be the process involved in this task?

edit retag flag offensive close merge delete


Puppet is the wrong tool for this task.

Kai Burghardt gravatar imageKai Burghardt ( 2017-03-12 20:05:40 -0600 )edit

That is not accurate

puser gravatar imagepuser ( 2017-03-13 06:18:50 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2017-03-13 06:24:02 -0600

puser gravatar image

updated 2017-03-13 06:24:25 -0600

Create the RPM
put the rpm in the module/files directory

Your module directory tree should look like:

|-- examples
|   `-- init.pp
|-- files
|   `-- mypackage.rpm
|-- manifests
|   `-- init.pp
`-- metadata.json

In your manifests/init.pp add:

package { 'mypackage':
  ensure => installed,
  source => 'Puppet:///modules/mymodule/mypackage.rpm',
edit flag offensive delete link more


You would have to make sure that if you 'update' the rpm, that it could properly install the new version if the old one was already installed. I haven't personally tested this workflow, and I would be cautious. Another approach is to host a yum repo on the puppetserver

DarylW gravatar imageDarylW ( 2017-03-14 08:43:33 -0600 )edit

answered 2017-03-13 12:48:37 -0600

smarlow gravatar image

Puppet will work for deploying RPMs to servers, but it has no mechanism by which to do the packaging for you.

If you need to package a bunch of files into an RPM I would recommend using FPM:

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2017-03-12 04:13:40 -0600

Seen: 77 times

Last updated: Mar 13 '17