Merge "Add support to configure pcsd bind address"
This commit is contained in:
commit
80dcc19695
|
@ -79,6 +79,10 @@
|
|||
# (optional) Enable pcsd debugging
|
||||
# Defaults to false
|
||||
#
|
||||
# [*pcsd_bind_addr*]
|
||||
# (optional) List of IP addresses pcsd should bind to
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*tls_priorities*]
|
||||
# (optional) Sets PCMK_tls_priorities in /etc/sysconfig/pacemaker when set
|
||||
# Defaults to undef
|
||||
|
@ -126,6 +130,7 @@ class pacemaker::corosync(
|
|||
$enable_sbd = false,
|
||||
$sbd_watchdog_timeout = '10',
|
||||
$pcsd_debug = false,
|
||||
$pcsd_bind_addr = undef,
|
||||
$tls_priorities = undef,
|
||||
) inherits pacemaker {
|
||||
include ::pacemaker::params
|
||||
|
@ -178,6 +183,29 @@ class pacemaker::corosync(
|
|||
before => Service['pcsd'],
|
||||
notify => Service['pcsd'],
|
||||
}
|
||||
|
||||
if $pcsd_bind_addr != undef {
|
||||
file_line { 'pcsd_bind_addr':
|
||||
path => $::pacemaker::pcsd_sysconfig,
|
||||
line => "PCSD_BIND_ADDR='${pcsd_bind_addr}'",
|
||||
match => '^PCSD_BIND_ADDR=',
|
||||
require => Class['::pacemaker::install'],
|
||||
before => Service['pcsd'],
|
||||
notify => Service['pcsd'],
|
||||
}
|
||||
}
|
||||
else {
|
||||
file_line { 'pcsd_bind_addr':
|
||||
ensure => absent,
|
||||
path => $::pacemaker::pcsd_sysconfig,
|
||||
match => '^PCSD_BIND_ADDR=*',
|
||||
require => Class['::pacemaker::install'],
|
||||
before => Service['pcsd'],
|
||||
notify => Service['pcsd'],
|
||||
match_for_absence => true,
|
||||
}
|
||||
}
|
||||
|
||||
if $tls_priorities != undef {
|
||||
file_line { 'tls_priorities':
|
||||
path => $::pacemaker::pcmk_sysconfig,
|
||||
|
|
|
@ -36,6 +36,10 @@
|
|||
# (optional) Enable pcsd debugging
|
||||
# Defaults to false
|
||||
#
|
||||
# [*pcsd_bind_addr*]
|
||||
# (optional) List of IP addresses pcsd should bind to
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*tls_priorities*]
|
||||
# (optional) Sets PCMK_tls_priorities in /etc/sysconfig/pacemaker when set
|
||||
# Defaults to undef
|
||||
|
@ -47,6 +51,7 @@ class pacemaker::remote (
|
|||
$pcs_password = undef,
|
||||
$manage_fw = true,
|
||||
$pcsd_debug = false,
|
||||
$pcsd_bind_addr = undef,
|
||||
$tls_priorities = undef,
|
||||
) {
|
||||
include ::pacemaker::params
|
||||
|
@ -69,6 +74,7 @@ class pacemaker::remote (
|
|||
provider => 'ip6tables',
|
||||
}
|
||||
}
|
||||
|
||||
$pcsd_debug_str = bool2str($pcsd_debug)
|
||||
file_line { 'pcsd_debug_ini':
|
||||
path => $::pacemaker::params::pcsd_sysconfig,
|
||||
|
@ -78,6 +84,29 @@ class pacemaker::remote (
|
|||
before => Service['pcsd'],
|
||||
notify => Service['pcsd'],
|
||||
}
|
||||
|
||||
if $pcsd_bind_addr != undef {
|
||||
file_line { 'pcsd_bind_addr':
|
||||
path => $::pacemaker::pcsd_sysconfig,
|
||||
line => "PCSD_BIND_ADDR='${pcsd_bind_addr}'",
|
||||
match => '^PCSD_BIND_ADDR=',
|
||||
require => Class['::pacemaker::install'],
|
||||
before => Service['pcsd'],
|
||||
notify => Service['pcsd'],
|
||||
}
|
||||
}
|
||||
else {
|
||||
file_line { 'pcsd_bind_addr':
|
||||
ensure => absent,
|
||||
path => $::pacemaker::params::pcsd_sysconfig,
|
||||
match => '^PCSD_BIND_ADDR=*',
|
||||
require => Class['::pacemaker::install'],
|
||||
before => Service['pcsd'],
|
||||
notify => Service['pcsd'],
|
||||
match_for_absence => true,
|
||||
}
|
||||
}
|
||||
|
||||
if $tls_priorities != undef {
|
||||
file_line { 'tls_priorities':
|
||||
path => $::pacemaker::pcmk_sysconfig,
|
||||
|
@ -87,6 +116,7 @@ class pacemaker::remote (
|
|||
before => Service['pcsd'],
|
||||
}
|
||||
}
|
||||
|
||||
user { $pcs_user:
|
||||
password => pw_hash($pcs_password, 'SHA-512', fqdn_rand_string(10)),
|
||||
groups => 'haclient',
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Add support to configure bind address for pcsd.
|
Loading…
Reference in New Issue