Ask Your Question

How to create a module with license key requirement.

asked 2017-07-25 08:53:26 -0500

Adamoi gravatar image

updated 2017-07-25 09:27:59 -0500

Hi team, I have a third party application that I need to install on my REDHAT ENTERPRISE LINUX with a module. (rmp)

The manual way is :

$ wget
# already got the rpm on my system
$ su
$ rpm --import
# the license key is a .txt file that I have on my system as well
$ yum install xyz-1.1.x86_64.rpmu

I know how to create a simple module with rpm package , but I am not sure how to create it with the license KEY.

edit retag flag offensive close merge delete


That depends on how you'd like to realize it. I don't think, that's a Puppet question per se, at least AFAIK there's no “Puppet-way” of doing, of creating proprietary Puppet modules. Why do you have to create a non-open Puppet module anyway?

Kai Burghardt gravatar imageKai Burghardt ( 2017-07-25 09:31:49 -0500 )edit

Hey Kai, that's not my choice, my company needs to install the Third party across 300 servers with the License key in place.

Adamoi gravatar imageAdamoi ( 2017-07-25 11:01:17 -0500 )edit

2 Answers

Sort by » oldest newest most voted

answered 2017-07-27 04:18:21 -0500

Tozz gravatar image

updated 2017-07-27 04:19:33 -0500

You do not mention how the license key is to be installed for this RPM, so the question is a bit difficult to answer. But it could be something like:

exec { 'retrieve-xyz':
  command => "wget -O /tmp/xyz.rpm",
  path => "/bin:/sbin:/usr/bin:/usr/sbin",
exec { 'install-gpg':
  command => "rpm --import",
  path => "/bin:/sbin:/usr/bin:/usr/sbin",
exec { 'install-xyz':
  command => "yum install /tmp/xyz.rpm",
  path => "/bin:/sbin:/usr/bin:/usr/sbin",
exec { 'install-license':
  command => "/usr/bin/xyz --install-license ABC-DEF-GHI-JKL-MNO",
  path => "/bin:/sbin:/usr/bin:/usr/sbin",

Ofcourse I dont know the correct way to install the license key, but this could be a possible solution. As mentioned, if the license key is different on each node, you could enter the license key in Hiera and use something like:

exec { 'install-license':
  command => [ "/usr/bin/xyz --install-license ", hiera("xyz-licensekey" ].join(),
  path => "/bin:/sbin:/usr/bin:/usr/sbin",

Additionally, there might be better and neater ways to install GPG keys and third-party packages, using the proper Puppet modules. So again, this is just a simple example. Might not be the best way to do it.

edit flag offensive delete link more


Thank you so much Tozz, I will try that, you help much appreciated

Adamoi gravatar imageAdamoi ( 2017-07-27 13:17:31 -0500 )edit

answered 2017-07-26 04:33:14 -0500

is the license file the same for all nodes? If so why not just add it to each node as a file after you install the rpm? you could do this fairly simply using the puppet file resource.

edit flag offensive delete link more


Even if different per node, you could reference the licenses with hiera per node

DarylW gravatar imageDarylW ( 2017-07-26 22:33:02 -0500 )edit

Thank you for your help, it is the same txt file key

Adamoi gravatar imageAdamoi ( 2017-07-27 13:16:56 -0500 )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

1 follower


Asked: 2017-07-25 08:53:26 -0500

Seen: 36 times

Last updated: Jul 27