puppetlabs-apache | Puppet module for the Apache httpd server | Configuration Management library
kandi X-RAY | puppetlabs-apache Summary
kandi X-RAY | puppetlabs-apache Summary
Apache HTTP Server (also called Apache HTTPD, or simply Apache) is a widely used web server. This Puppet module simplifies the task of creating configurations to manage Apache servers in your infrastructure. It can configure and manage a range of virtual host setups and provides a streamlined way to install and configure Apache modules.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of puppetlabs-apache
puppetlabs-apache Key Features
puppetlabs-apache Examples and Code Snippets
Community Discussions
Trending Discussions on puppetlabs-apache
QUESTION
Many areas in the puppetlabs/apache module such as vhost.pp you can see error handling that requires the base class to be included first because the class in question uses the base class in its' parameter defaults.
Here in dev.pp there are no parameters though you can see the reference to $::apache::dev_packages
which is declared by the ::apache::params
class when ::apache
is initialized.
However, in vhosts.pp you can see that the base class is included explicitly without an expectation that it was previously included.
My understanding of this is that apache::vhosts
is designed to be used as a standalone class and it's inclusion of ::apache
initializes Apache's default configuration as determined by the module. However, if Apache is declared elsewhere such as:
ANSWER
Answered 2020-Apr-03 at 12:26Why would a Puppet module's main class be included by a sub-class?
First of all, these are not base and subclasses. Puppet does have class inheritance, but apache::dev
does not use it, and apache::vhost
isn't even a class (it's a defined type). The apache
class is the module's "main" class, and apache::dev
is simply another class in the same module.
Pretty much the only good use for class inheritance is to support obtaining class parameter defaults from another class's variables, but evidently, the people in control of Puppet's online docs no longer think that's a good idea either (though you can still see an example in class apache
). Hiera support for data in modules is a decent alternative, but I sometimes think that Puppet, Inc. is too fascinated with their shiny new goodies, and too dismissive of older features that work fine when used as documented, but break unfortunately when misused.
Here in dev.pp there are no parameters
... and no inclusion of class apache
. But there is code that will cause catalog building to fail in the event that apache
has not already been declared, separately.
However, in vhosts.pp you can see that the base class is included explicitly without an expectation that it was previously included.
Yes, that's fairly normal. More normal, indeed, than apache::dev
's behavior. apache::vhost
is intended for public use, so if you declare an instance then it ensures that everything it needs is included in the catalog, too.
My understanding of this is that
apache::vhosts
is designed to be used as a standalone class and it's inclusion of::apache
initializes Apache's default configuration as determined by the module.
Not exactly. apache::vhost
is intended to be a public type, and it does declare ::apache
to ensure that everything needed to support it is indeed managed. You can characterize that as "standalone" if you like. But the inclusion of ::apache
there is no different from the same anywhere else. If that class has already been added to the catalog then it it has no additional effect. Otherwise, it is added, with parameters drawn from Hiera data where such parameter data are defined, and hard-coded defaults where not. Hiera is how one should, generally, customize class parameters, and where that is done, the resulting apache configuration is not accurately characterized as "default" or defined by the module.
However, if Apache is declared elsewhere such as:
QUESTION
I am just learning Puppet (we have Puppet Enterprise locally). I am trying to understand the "roles and profiles" pattern. Please pardon any nomenclature slip ups.
How do I create a role with multiple instances of a profile, where the profile instances differ only by parameter? I'm guessing Hiera fits into this somewhere but I'm not exactly sure how.
For example:
Puppetfile:
...ANSWER
Answered 2017-Nov-24 at 11:42You actually can't use classes like that in Puppet; a class can only be declared once-per-node.
You probably need some of the defined types in the puppetlabs/apache module. Defined types are used when you need to declare a user-defined "resource" more than once on a single node.
E.g. profile might be:
QUESTION
Puppetfile of Control repo
...ANSWER
Answered 2017-Oct-23 at 17:37modify environment.conf
in your development
environment and update modulepath as below
QUESTION
I'm relatively new to puppet and currently working on 'puppetlabs-apache' module. I'm missing something while setting both ssl and non-ssl on a virtual-host.
Manifest applied:
...ANSWER
Answered 2017-Feb-14 at 15:35To configure a virtual host to redirect unencrypted connections to SSL, declare them with separate apache::vhost
defined types and redirect unencrypted requests to the virtual host with SSL enabled:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install puppetlabs-apache
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page