3
0

OP#188 create file

This commit is contained in:
2025-12-04 12:15:20 +01:00
parent de0a84737e
commit 3b20a4a566
4 changed files with 27 additions and 0 deletions

View File

@@ -40,11 +40,17 @@ Configurable options:
- `ps_external_url` must be a valid full url
- `ps_auth_ext_user`must be a valid user
- `ps_auth_ext_pass`must be a valid password
- pruning local blocks
- `ps_enable_pruning` true enables it
- `ps_pruning_dir` the directory where the pruning script should live
## Puppet Documentation
See the full Puppet documentation including parameters in `docs/index.html`
# Wiki
[Pruning process](/wiki/pruning.md)
## Dependencies
All dependencies must be included in the catalogue.

View File

@@ -43,5 +43,24 @@ class prometheus_cd::main::files (
content => template('prometheus_cd/web.yml.erb'),
notify => Service[$ps_prom_service],
}
if $ps_enable_pruning == true {
file { $ps_pruning_file:
ensure => file,
owner => 'prometheus',
group => 'prometheus',
mode => '0750',
selrange => s0,
selrole => object_r,
seltype => usr_,
seluser => unconfined_u,
content => template('prometheus_cd/prune_blocks.erb'),
# notify Service ToDo,
}
}
if $ps_enable_pruning == false {
file { $ps_pruning_fir:
ensure => absent,
}
}
}
}

View File

@@ -78,6 +78,7 @@ class prometheus_cd::params (
# pruning script
Boolean $ps_enable_pruning = false,
String $ps_pruning_dir = '/opt/prometheus-prune',
String $ps_pruning_file = "${ps_pruning_dir}/prune_prometheus_pg.sh",
) {
# defaults

1
wiki/pruning.md Normal file
View File

@@ -0,0 +1 @@
# The Pruning Process