Ask Your Question
0

how to install a puppet module?

asked 2016-03-02 05:45:13 -0500

viki gravatar image

Hi All,

Is there a way to install a puppet module locally?

Thanks, viki

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-03-02 06:14:58 -0500

rajeevsharma gravatar image

If you mean not installing a module from puppet forge then you can create/generate/install module locally using following command:

puppet module generate <modulename>

For more details: https://docs.puppetlabs.com/puppet/latest/reference/modules_fundamentals.html

I hope, this is your expected answer.

edit flag offensive delete link more
0

answered 2016-03-02 07:33:04 -0500

viki gravatar image

updated 2016-03-02 07:41:56 -0500

puppet module generate mvikra-awstats then i have edited init.pp under manisfests:- package { 'awstats': ensure => 'present', }

package { 'GeoIP': ensure => 'installed', require => Package['awstats'], } package { 'perl-Geo-IP': ensure => 'installed', require => Package['awstats'], } package { 'perl-libwww-perl': ensure => 'installed', require => Package['awstats'], }

and now i am trying to install that module with command:- puppet module install mvikra-awstats

Notice: Preparing to install into /etc/puppet/modules ... Notice: Downloading from https://forge.puppetlabs.com ... Error: Could not find release information for this module (mvikra/awstats) (HTTP 410) Error: Try 'puppet help module install' for usage

dono what i am missing here.

edit flag offensive delete link more

Comments

why you are installing it if you have it already? installing a module directly fetches the module from forge and keeps it under modules dir. Follow the link I mentioned earlier. Just keep your module name awstats. Again, follow the document you'll get to know what next.

rajeevsharma gravatar imagerajeevsharma ( 2016-03-02 08:33:14 -0500 )edit

I am completely bowled out. I dont see awstats log analyzer installed on my machine. where as when i do "puppet apply init.pp" .. it installs awstats. To be specific i wanted to build a module to install awstats on vagrant machine.

viki gravatar imageviki ( 2016-03-02 09:42:35 -0500 )edit

Can you please check what your module path is? "puppet config print modulepath --section master" you can find you module in the given path of the output.

rajeevsharma gravatar imagerajeevsharma ( 2016-03-02 09:59:25 -0500 )edit

# puppet config print modulepath /etc/puppet/modules:/usr/share/puppet/modules # pwd /etc/puppet/modules # ls firewall mymodule stdlib mymodule is awstats module, but still i dnt see awstats installed on my machine.

viki gravatar imageviki ( 2016-03-03 04:31:35 -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

Stats

Asked: 2016-03-02 05:45:13 -0500

Seen: 162 times

Last updated: Mar 02 '16