Add params and ini_settings for node/report/purge ttls
This commit is contained in:
parent
9d4357de7f
commit
9efe80b95a
5 changed files with 46 additions and 2 deletions
|
@ -193,7 +193,7 @@ The password for the database user (defaults to `puppetdb`; ignored for `embedde
|
|||
|
||||
The name of the database instance to connect to (defaults to `puppetdb`; ignored for `embedded` db).
|
||||
|
||||
####`database_package`
|
||||
####`puppetdb_package`
|
||||
|
||||
The puppetdb package name in the package manager.
|
||||
|
||||
|
|
|
@ -42,6 +42,15 @@
|
|||
# (defaults to `puppetdb`; ignored for `embedded` db)
|
||||
# ['database_name'] - The name of the database instance to connect to.
|
||||
# (defaults to `puppetdb`; ignored for `embedded` db)
|
||||
# ['node_ttl'] - The length of time a node can go without receiving
|
||||
# any new data before it's automatically deactivated.
|
||||
# (defaults to '0', which disables auto-deactivation)
|
||||
# ['node_purge_ttl'] - The length of time a node can be deactivated before
|
||||
# it's deleted from the database.
|
||||
# (defaults to '0', which disables purging)
|
||||
# ['report_ttl'] - The length of time reports should be stored before
|
||||
# being deleted.
|
||||
# (defaults to '7d', which is a 7-day period)
|
||||
# ['open_postgres_port'] - If true, open the postgres port on the firewall.
|
||||
# (defaults to true).
|
||||
# ['puppetdb_package'] - The puppetdb package name in the package manager
|
||||
|
@ -83,6 +92,9 @@ class puppetdb(
|
|||
$database_username = $puppetdb::params::database_username,
|
||||
$database_password = $puppetdb::params::database_password,
|
||||
$database_name = $puppetdb::params::database_name,
|
||||
$node_ttl = $puppetdb::params::node_ttl,
|
||||
$node_purge_ttl = $puppetdb::params::node_purge_ttl,
|
||||
$report_ttl = $puppetdb::params::report_ttl,
|
||||
$puppetdb_package = $puppetdb::params::puppetdb_package,
|
||||
$puppetdb_version = $puppetdb::params::puppetdb_version,
|
||||
$puppetdb_service = $puppetdb::params::puppetdb_service,
|
||||
|
|
|
@ -41,6 +41,11 @@ class puppetdb::params {
|
|||
$database_username = 'puppetdb'
|
||||
$database_password = 'puppetdb'
|
||||
|
||||
# These settings manage the various auto-deactivation and auto-purge settings
|
||||
$node_ttl = '0'
|
||||
$node_purge_ttl = '0'
|
||||
$report_ttl = '7d'
|
||||
|
||||
$puppetdb_version = 'present'
|
||||
|
||||
# TODO: figure out a way to make this not platform-specific
|
||||
|
|
|
@ -51,7 +51,16 @@
|
|||
# (defaults to `puppetdb`; ignored for `embedded` db)
|
||||
# ['database_name'] - The name of the database instance to connect to.
|
||||
# (defaults to `puppetdb`; ignored for `embedded` db)
|
||||
# ['database_package'] - The puppetdb package name in the package manager
|
||||
# ['node_ttl'] - The length of time a node can go without receiving
|
||||
# any new data before it's automatically deactivated.
|
||||
# (defaults to '0', which disables auto-deactivation)
|
||||
# ['node_purge_ttl'] - The length of time a node can be deactivated before
|
||||
# it's deleted from the database.
|
||||
# (defaults to '0', which disables purging)
|
||||
# ['report_ttl'] - The length of time reports should be stored before
|
||||
# being deleted.
|
||||
# (defaults to '7d', which is a 7-day period)
|
||||
# ['puppetdb_package'] - The puppetdb package name in the package manager
|
||||
# ['puppetdb_version'] - The version of the `puppetdb` package that should
|
||||
# be installed. You may specify an explicit version
|
||||
# number, 'present', or 'latest'. Defaults to
|
||||
|
@ -93,6 +102,9 @@ class puppetdb::server(
|
|||
$database_username = $puppetdb::params::database_username,
|
||||
$database_password = $puppetdb::params::database_password,
|
||||
$database_name = $puppetdb::params::database_name,
|
||||
$node_ttl = $puppetdb::params::node_ttl,
|
||||
$node_purge_ttl = $puppetdb::params::node_purge_ttl,
|
||||
$report_ttl = $puppetdb::params::report_ttl,
|
||||
$puppetdb_package = $puppetdb::params::puppetdb_package,
|
||||
$puppetdb_version = $puppetdb::params::puppetdb_version,
|
||||
$puppetdb_service = $puppetdb::params::puppetdb_service,
|
||||
|
|
|
@ -113,4 +113,19 @@ class puppetdb::server::database_ini(
|
|||
setting => 'gc-interval',
|
||||
value => $puppetdb::params::gc_interval,
|
||||
}
|
||||
|
||||
ini_setting {'puppetdb_node_ttl':
|
||||
setting => 'node-ttl',
|
||||
value => $puppetdb::params::node_ttl,
|
||||
}
|
||||
|
||||
ini_setting {'puppetdb_node_purge_ttl':
|
||||
setting => 'node-purge-ttl',
|
||||
value => $puppetdb::params::node_purge_ttl,
|
||||
}
|
||||
|
||||
ini_setting {'puppetdb_report_ttl':
|
||||
setting => 'report-ttl',
|
||||
value => $puppetdb::params::report_ttl,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue