Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/manifests/netbox.pp
Show All 23 Lines | class profile::netbox { | ||||
$archive_url = "https://github.com/netbox-community/netbox/archive/v${version}.tar.gz" | $archive_url = "https://github.com/netbox-community/netbox/archive/v${version}.tar.gz" | ||||
$archive_path = "/opt/netbox-v${version}.tar.gz" | $archive_path = "/opt/netbox-v${version}.tar.gz" | ||||
$install_path = "/opt/netbox-${version}" | $install_path = "/opt/netbox-${version}" | ||||
$upgrade_flag_path = "${install_path}/.upgrade_done" | $upgrade_flag_path = "${install_path}/.upgrade_done" | ||||
ensure_packages ('python3-venv') | ensure_packages ('python3-venv') | ||||
::apt::pin {'python3': | |||||
explanation => 'Pin python3.7 version so venv still works after bullseye upgrade', | |||||
packages => ['python3'], | |||||
version => '3.7.3-1', | |||||
priority => 1001, | |||||
notify => Package['python3-venv'], | |||||
vsellier: maybe the `ensure_package` should be replaced by `package` and a dependency apt::pin ->… | |||||
} | |||||
include ::postgresql::server | include ::postgresql::server | ||||
::postgresql::server::db {$db_database: | ::postgresql::server::db {$db_database: | ||||
user => $db_username, | user => $db_username, | ||||
password => postgresql_password($db_username, $db_password), | password => postgresql_password($db_username, $db_password), | ||||
require => [Class['Postgresql::Server']], | require => [Class['Postgresql::Server']], | ||||
} | } | ||||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |
maybe the ensure_package should be replaced by package and a dependency apt::pin -> package added to avoid some flip-flop
The package should probably also notify the netbox service