Skip to content
Snippets Groups Projects
Verified Commit 7060be15 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

Allow zpool configuration to be undefined for specific nodes

This does not impact existing nodes with the configuration already set (be it manually
or through puppet).

This will allow to configure storage1.staging as a rancher agent.

Refs. swh/infra/sysadm-environment#5164
parent 556a86eb
No related branches found
No related tags found
1 merge request!661Allow zpool configuration to be undefined for specific nodes
......@@ -79,3 +79,4 @@ swh::deploy::storage::backend::workers: 40
swh::deploy::storage::backend::max_requests: 5000
swh::deploy::storage::backend::max_requests_jitter: 500
zfs::common::zpool_configuration: {}
class profile::zfs::common {
$zpool_configuration = lookup('zfs::common::zpool_configuration')
# Allow zpool configuration to be undefined (that allows to bypass the manual
# configuration on some nodes e.g. storage1.staging)
$zpool_configuration = lookup('zfs::common::zpool_configuration', {default_value => {}})
# zpool create -f data /dev/vdb
zpool { 'data':
ensure => 'present',
* => $zpool_configuration,
if $zpool_configuration {
# When provided, let's create the pool of data out of it
# zpool create -f data /dev/vdb
zpool { 'data':
ensure => 'present',
* => $zpool_configuration,
}
} else { # Otherwise, do nothing but ensure it's already configured
zpool { 'data':
ensure => 'present',
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment