From 71c316e7aeed834b8667a05e3c8de94dc7d35a1e Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sat, 10 Feb 2024 15:37:24 +1100 Subject: [PATCH] feat: cleanup reposync conf files - add feature to /etc/reposync/conf.d to ensure the subfiles are cleaned up when they are not defined --- site/profiles/manifests/reposync/syncer.pp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/site/profiles/manifests/reposync/syncer.pp b/site/profiles/manifests/reposync/syncer.pp index 6f20996..a670679 100644 --- a/site/profiles/manifests/reposync/syncer.pp +++ b/site/profiles/manifests/reposync/syncer.pp @@ -14,10 +14,13 @@ class profiles::reposync::syncer { mode => '0755', } file { '/etc/reposync/conf.d': - ensure => directory, - owner => 'root', - group => 'root', - mode => '0755', + ensure => directory, + owner => 'root', + group => 'root', + mode => '0755', + purge => true, + recurse => true, + force => true, } # get a list of repos as a hash, and iterate through them