From cdcfca47b4f3ae05678e7593fc912ce9f6602121 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Tue, 28 Oct 2025 12:38:10 +0100 Subject: [PATCH] add rotes.yaml - https://gitlab.confdroid.com/internal/confdroid_management/-/issues/292 --- manifests/main/files.pp | 11 +++++++++++ manifests/params.pp | 2 ++ templates/puppetdb/routes.yaml.erb | 5 +++++ 3 files changed, 18 insertions(+) create mode 100644 templates/puppetdb/routes.yaml.erb diff --git a/manifests/main/files.pp b/manifests/main/files.pp index b763eaa..6b57620 100644 --- a/manifests/main/files.pp +++ b/manifests/main/files.pp @@ -32,6 +32,7 @@ class puppet_cd::main::files ( } if $pt_use_puppetdb == true { + # puppetdb.conf file { $pt_puppetdb_conf_file: ensure => file, path => $pt_puppetdb_conf_file, @@ -41,6 +42,16 @@ class puppet_cd::main::files ( content => template($pt_puppetdb_conf_erb), notify => Service[$pt_agent_service,$pt_server_service], } + # routes.yaml + file { $pt_routes_file: + ensure => file, + path => $pt_routes_file, + owner => 'root', + group => 'root', + mode => '0644', + content => template($pt_routes_erb), + notify => Service[$pt_server_service], + } } } } diff --git a/manifests/params.pp b/manifests/params.pp index 47457b3..26f9bd8 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -150,6 +150,8 @@ class puppet_cd::params ( $pt_hiera_config = "${pt_puppetdir}/hiera.yaml" $pt_puppetdb_conf_file = "${pt_puppetdir}/puppetdb.conf" $pt_puppetdb_conf_erb = 'puppet_cd/puppetdb/puppetdb.conf.erb' + $pt_routes_file = "${pt_puppetdir}/routes.yaml" + $pt_routes_erb = 'puppet_cd/puppetdb/routes.yaml.erb' ## r10k $pt_r10k_file = "${pt_r10k_dir}/r10k.yaml" diff --git a/templates/puppetdb/routes.yaml.erb b/templates/puppetdb/routes.yaml.erb new file mode 100644 index 0000000..00b4c37 --- /dev/null +++ b/templates/puppetdb/routes.yaml.erb @@ -0,0 +1,5 @@ +--- +master: + facts: + terminus: puppetdb + cache: yaml