add installation section
This commit is contained in:
@@ -5,8 +5,22 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
class puppet_cd::main::install (
|
class puppet_cd::main::install (
|
||||||
|
|
||||||
) inherits puppet_cd::params {
|
) inherits puppet_cd::params {
|
||||||
|
|
||||||
require puppet_cd::main::yumrepo
|
require puppet_cd::main::yumrepo
|
||||||
|
|
||||||
|
package { $pt_agent_pkg:
|
||||||
|
ensure => $pt_pkg_ensure,
|
||||||
|
}
|
||||||
|
|
||||||
|
if $fqdn == $pt_pm_fqdn {
|
||||||
|
package { $pt_server_pkg:
|
||||||
|
ensure => $pt_pkg_ensure,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if $fqdn == $pt_db_fqdn {
|
||||||
|
package { $pt_db_pkg:
|
||||||
|
ensure => $pt_pkg_ensure,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,26 +2,36 @@
|
|||||||
# Module name: puppet_cd
|
# Module name: puppet_cd
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
# Author: Arne Teuke (arne_teuke@confdroid)
|
||||||
# @summary Class manages parameters for the puppet_cd module.
|
# @summary Class manages parameters for the puppet_cd module.
|
||||||
|
# @param [boolean] pt_manage_fw whether to manage firewall settings
|
||||||
|
# @param [string] pt_pm_fqdn the fqdn for the puppetmaster and master
|
||||||
|
# settings are applied. any other fqdn # will be considered a puppet agent.
|
||||||
|
# @param [string] pt_db_fqdn the fqdn for the puppetdb host.
|
||||||
|
# @param [string] pt_package_url the url for fetching the repo rpm
|
||||||
|
# @param [string] pt_pkg_ensure valid: "present", "latest", "v1.2.3"
|
||||||
|
# @param [string] pt_agent_pkg the packages for agents to install
|
||||||
|
# @param [string] pt_server_pkg the server packages to install
|
||||||
|
# @param [array] pt_db_pkg the packages for puppetdb
|
||||||
###############################################################################
|
###############################################################################
|
||||||
class puppet_cd::params (
|
class puppet_cd::params (
|
||||||
|
|
||||||
$pt_manage_fw = true,
|
Boolean $pt_manage_fw = true,
|
||||||
$pt_puppetmaster = undef,
|
String $pt_pm_fqdn = undef,
|
||||||
|
String $pt_db_fqdn = undef,
|
||||||
|
|
||||||
# installation
|
# installation
|
||||||
$pt_package_url = 'https://yum.puppet.com/puppet8-release-el-9.noarch.rpm',
|
String $pt_package_url = 'https://yum.puppet.com/puppet8-release-el-9.noarch.rpm',
|
||||||
$pt_pkg_ensure = 'present',
|
String $pt_pkg_ensure = 'present',
|
||||||
|
String $pt_agent_pkg = 'puppet-agent',
|
||||||
|
String $pt_server_pkg = 'puppetserver',
|
||||||
|
Array $pt_db_pkg = ['puppetdb','puppetdb-termini'],
|
||||||
|
|
||||||
) {
|
) {
|
||||||
|
$fqdn = $facts['networking']['fqdn']
|
||||||
$fqdn = $facts['networking']['fqdn']
|
|
||||||
|
|
||||||
# service
|
# service
|
||||||
$pt_service = 'puppetserver'
|
$pt_service = 'puppetserver'
|
||||||
|
|
||||||
#
|
#
|
||||||
# includes must be last
|
# includes must be last
|
||||||
include puppet_cd::main::config
|
include puppet_cd::main::config
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class puppet_cd::server::service (
|
|||||||
|
|
||||||
) inherits puppet_cd::params {
|
) inherits puppet_cd::params {
|
||||||
|
|
||||||
if $fqdn == $pt_puppetmaster {
|
if $fqdn == $pt_pm_fqdn {
|
||||||
|
|
||||||
require puppet_cd::firewall::iptables
|
require puppet_cd::firewall::iptables
|
||||||
require puppet_cd::main::files
|
require puppet_cd::main::files
|
||||||
|
|||||||
Reference in New Issue
Block a user