-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
I run netbox in two data centers - one active and the other standby. PostgreSQL replication mirrors the DB from the active to the standby DC, and the DB is read-only in the standby DC. Because of this, I only want the netbox service to be running in the active colo - it should be stopped in the standby colo.
The active parameters of the systemd services are set statically right now:
ash-netbox/manifests/service.pp
Lines 37 to 47 in f887d1b
| systemd::unit_file { 'netbox-rq.service': | |
| content => epp('netbox/netbox-rq.service.epp', $service_params_netbox_rq), | |
| enable => true, | |
| active => true, | |
| } | |
| systemd::unit_file { 'netbox.service': | |
| content => epp('netbox/netbox.service.epp', $service_params_netbox), | |
| enable => true, | |
| active => true, | |
| } |
Please add a class parameter so it may be overridden. I'm doing it manually like this right now:
# override some so services are stopped in the standby DC
$active = custom_function::am_i_in_the_active_dc() ? {
'yes' => true,
default => false,
}
Systemd::Unit_file <| title == 'netbox.service' |> {
active => $active,
}
Systemd::Unit_file <| title == 'netbox-rq.service' |> {
active => $active,
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels