From ab73512f6f684a6e532581cef8cc11806ffb22c0 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 18 Sep 2020 09:52:57 +0900 Subject: [PATCH] Allow keeping repo files since initially created This change allows us to keep the file initially created, to avoid unexepcted changes caused by update in source repository. Change-Id: Ib7fd9de5ee4d355f3b34430d37963ed8f8325498 --- manifests/repo/redhat/redhat.pp | 12 +++++++++--- .../notes/repo-redhat-replace-9d475450f304ad94.yaml | 6 ++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/repo-redhat-replace-9d475450f304ad94.yaml diff --git a/manifests/repo/redhat/redhat.pp b/manifests/repo/redhat/redhat.pp index 3786aef..014873a 100644 --- a/manifests/repo/redhat/redhat.pp +++ b/manifests/repo/redhat/redhat.pp @@ -35,6 +35,10 @@ # (optional) A hash of repo files # Defaults to {} # +# [*repo_replace*] +# (optional) Replace repo files when their contents are changed +# Defaults to true +# # [*repo_defaults*] # (optional) The defaults for the yumrepo resources that will be # created using create_resource. @@ -81,6 +85,7 @@ class openstack_extras::repo::redhat::redhat( $manage_epel = false, $repo_hash = {}, $repo_source_hash = {}, + $repo_replace = true, $repo_defaults = {}, $gpgkey_hash = {}, $gpgkey_defaults = {}, @@ -182,9 +187,10 @@ class openstack_extras::repo::redhat::redhat( $repo_source_hash.each | $filename, $url | { file { $filename: - path => "/etc/yum.repos.d/${filename}", - source => $url, - notify => Exec['yum_refresh'], + path => "/etc/yum.repos.d/${filename}", + source => $url, + notify => Exec['yum_refresh'], + replace => $repo_replace, } } diff --git a/releasenotes/notes/repo-redhat-replace-9d475450f304ad94.yaml b/releasenotes/notes/repo-redhat-replace-9d475450f304ad94.yaml new file mode 100644 index 0000000..99495fc --- /dev/null +++ b/releasenotes/notes/repo-redhat-replace-9d475450f304ad94.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + The new ``openstack_extras::repo::redhat::redhat::repo_replace`` parameter + has been added to enable or disable file replacement when original repo + files are updated.