repo file formatting with puppet yumrepo resource type -
I use puppet to manage my /etc/yum.repos.d/CentOS-Base.repo file I am trying to The built-in puppet yumrepo resource type is adding a base value, which is expected, but this file is keeping the line after the comment for the next repo, [Update].
How do I format puppet [Base] repo more beauty? Ideally, I would like a puppet to change the basural entry with the comment after "#released updates" below, as seen below.
[base] name = CentOS- $ releasever - Base # baseurl = http: //mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck = 1gpgkey = file : /// etc / pki / rpm-gpg / RPM-GPG-Key-CentOS-6 # Release Updates baseurl = http: // SERVERXXX / distros / CentOS / $ releasever / os / $ basearch / [updates]
Here is the puppet code snippet:
class repos { Case $ operating system {"CentOS", "RedHat": {yumrepo {"base": baseurl = Gt; 'Http: // SERVERXXX / distros / CentOS / $ releasever / os / $ basearch /', gpgcheck = & gt; "1", gpgkey => "File: /// etc / pki / rpm-gpg / RPM-GPG-Key-CentOS-6", irraelist = & gt; Absent,}
yumrepo
type (as it stands Is not enabled for any formatting).
You can add it to the augeas
to do some coding, but its probability is not a problem.
> Your mileage will be best if every repository has a file. But the settings will still be ordered in a scandalous manner.
Comments
Post a Comment