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

Install the configuration required for agent registration to work

It's actually taken care of for the vm provisioning part but not for bare metal
machines. So this aims at fixing them both by installing the required yaml by puppet.

Refs. swh/infra/sysadm-environment#5032
parent 39c6630b
No related branches found
No related tags found
1 merge request!641Install the configuration required for agent registration to work
......@@ -4323,3 +4323,6 @@ preseeding::vhost::docroot::mode: "2775"
preseeding::vhost::ssl_protocol: "%{hiera('apache::ssl_protocol')}"
preseeding::vhost::ssl_honorcipherorder: "%{hiera('apache::ssl_honorcipherorder')}"
preseeding::vhost::ssl_cipher: "%{hiera('apache::ssl_cipher')}"
rancher::rke2::agent::config:
snapshotter: native
......@@ -11,4 +11,40 @@ class profile::zfs::rancher {
mountpoint => '/var/lib/rancher',
require => Zpool['data'],
}
# Install the necessary 50-snapshotter.yaml configuration so rke2-agent.service
# actually starts.
$config_content = lookup('rancher::rke2::agent::config')
file {"/etc/rancher":
ensure => directory,
owner => "root",
group => "root",
mode => '0755',
}
file {"/etc/rancher/rke2":
ensure => directory,
owner => "root",
group => "root",
mode => '0755',
require => File["/etc/rancher"],
}
file {"/etc/rancher/rke2/config.yaml.d":
ensure => directory,
owner => "root",
group => "root",
mode => '0755',
require => File["/etc/rancher/rke2"],
}
file {"/etc/rancher/rke2/config.yaml.d/50-snapshotter.yaml":
owner => "root",
group => "root",
mode => '0644',
content => inline_yaml($config_content),
# content => "{\n \"snapshotter\": \"native\"\n}",
require => File["/etc/rancher/rke2/config.yaml.d"],
}
}
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