Sarath S
Sarath S

Reputation: 383

Puppet install apache ubuntu

I use puppet to install apache with the following code in the manifest.

class{ 'apache':
    docroot           => '/var/www',  # ubu default, ignored
    default_vhost     => false,
    default_ssl_vhost => false,
    service_enable    => false,   # Do not start at boot
    service_ensure    => stopped, # Apache should be stopped if puppet runs
  }

In my puppet.conf I have mentioned like below.

mod "apache",
    :git => 'ssh://git.*.*.com:7999/xyz/jira-apache-puppet-module.git',
    :ref => 'master'

when i checked apache is getting installed with latest version as in my ubuntu repo.So is puppet using ubuntu repo for installing the package or the module as defined in puppet.conf

Upvotes: 0

Views: 478

Answers (2)

Sarath S
Sarath S

Reputation: 383

All the modules in Puppetfile will get installed during r10k run.

r10k deploy environment -pv

Upvotes: 0

John Bollinger
John Bollinger

Reputation: 180058

So is puppet using ubuntu repo for installing the package or the module as defined in puppet.conf[?]

Both.

The declaration in your manifest simply tells Puppet to include a class named 'apache' in the target node's manifest, with the specified parameter values. Puppet itself knows nothing about such a class, or any associated other classes, defined types, files, templates, data, etc. that belong to its module and support it. That's where your puppetfile entry comes in: tells Puppet which module you mean, and where to find it.

The Puppet module contains instructions for how to install and configure Apache, but it will not contain Apache itself. The approach to installation is sure to be to obtain the software from a package repository appropriate for the target system, as determined by the target system and its configuration. Puppet will use the same command-line interface for that purpose that you could use manually.

Upvotes: 2

Related Questions