Version information
This version is compatible with:
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'jlondon-phpmyadmin', '1.3.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-phpmyadmin
This is the puppet phpMyAdmin module which allows you to install and manage phpMyAdmin. Additionally you can use resources to specify a group of servers to add to a phpMyAdmin server.
The reason to use this to manage your phpMyAdmin rather than simply installing a package is that this module allow you to use stored resources to automatically generate a list of servers to use.
With this you don't need to worry about manually adding server entries to phpmyadmin or similar. Instead you can add a server similar to below:
Usage
node 'phpmyadminserver' {
class { 'phpmyadmin': }
phpmyadmin::server{ 'default': }
phpmyadmin::vhost { 'internal.domain.net':
vhost_enabled => true,
priority => '20',
docroot => $phpmyadmin::params::doc_path,
ssl => true,
ssl_cert => 'puppet:///modules/phpmyadmin/sslkey/internal.domain.net.crt',
ssl_key => 'puppet:///modules/phpmyadmin/sslkey/internal.domain.net.private.key',
}
phpmyadmin::vhost { 'external.domain.org':
vhost_enabled => true,
priority => '30',
docroot => $phpmyadmin::params::doc_path,
ssl => true,
ssl_cert => 'puppet:///modules/phpmyadmin/sslkey/external.domain.org.crt',
ssl_key => 'puppet:///modules/phpmyadmin/sslkey/external.domain.org.private.key',
}
}
node 'mysqlserver' {
@@phpmyadmin::servernode { "${::ipaddress}":
server_group => 'default',
}
}
SSL Certificates
You can specify SSL certificates in two ways, either by using the ssl_cert
and ssl_key
parameters to point to the source files in Puppet:
phpmyadmin::vhost { 'external.domain.org':
vhost_enabled => true,
priority => '30',
docroot => $phpmyadmin::params::doc_path,
ssl => true,
ssl_cert => 'puppet:///modules/phpmyadmin/sslkey/external.domain.org.crt',
ssl_key => 'puppet:///modules/phpmyadmin/sslkey/external.domain.org.private.key',
}
Or, if you have already transferred the certificates to the target node by some other means, by using the ssl_cert_file
and ssl_key_file
parameters which point to paths on the host machine:
phpmyadmin::vhost { 'external.domain.org':
vhost_enabled => true,
priority => '30',
docroot => $phpmyadmin::params::doc_path,
ssl => true,
ssl_cert_file => '/etc/ssl/certs/external.domain.org.crt',
ssl_key_file => '/etc/ssl/certs/external.domain.org.private.key',
}
SSL Redirection
Using the ssl_redirect
parameter (default: false
), you can force redirects for the domain from port 80 to port 443.
License
You are free to fork, modify, burn, break, twist or twine this module. If you do re-use the code, please give me credit for it though.
Contact
Justice London jlondon@syrussystems.com
Support
Please log tickets and issues at our Projects site
2017-07-11 - Version 1.3.0
- Addition of test suite for unit testing of module (Markus Opolka) 2016-01-07 - Version 1.2.1
- Bugfix to resolve issues with CentOS apache data-directory (Chris Edester)
2016-01-06 - Version 1.2.0
- Moved Blowfish secret to separate config file to prevent secret leaking (Joe Ray)
- SSL CA can be defined in vhost (Joe Ray)
- Small bugfix to force template file link (Simon Tremblay)
- Added option to disable mod_security for phpMyAdmin in Hiera
2014-11-03 - Version 1.0.1
Summary: Added ability to specify using a local SSL file instead of puppet master content and added SSL redirect ability.
Bugfixes:
- Removed string validation of aliases, can be array.
- Added bool to allow user to install/not install apache.
Contributions/Thanks: Joe Ray (Thanks!)
2014-09-19 - Version 0.2.2
Summary: Small bug-fixes and greater support for hiera integration with module.
Bugfixes:
- Added string/bool checks for all variables
- A couple small lint fixes
- Moved several variables from inner class to parameters to allow for greater hiera support.
2014-09-15 - Version 0.2.0
Summary: Re-engaging support for this module. Please submit any bug reports or pull requests directly to the github project!
Bugfixes:
- Properly support direct installation of module without needing to define apache or php configuration on node.
- Lots of lint fixes and param-level cleanup
- Re-factorization of codebase to resolve issues with missing variables and similar made over many conflicting pull requests. Will be more careful with what is accepted as a pull in the future.
Summary:
Lots of things fixed, but no new features
Dependencies
- puppetlabs/apache (>= 0.6.0)
- puppetlabs/concat (>= 1.0.0)
- puppetlabs/stdlib (>= 3.2.0)