Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
PUP 3.8.1, PUP 4.1.0
-
osfamily => RedHat
-
1
-
Client 2015-12-30, Client 2016-01-13
-
Reviewed
-
Bug Fix
-
Description
The inifile provider for the Yumrepo type searches various directories when deciding where to create repository definitions. One source of directories is the reposdir setting of /etc/yum.conf. Yum allows this setting to contain a list of directories delimited by either commas or whitespace, however Puppet only uses commas when parsing the setting.
If the reposdir setting contains a whitespace delimited list of directories, then Puppet will almost silently (a DEBUG level message is logged) fall back to creating definitions directly in /etc/yum.conf.
Reproduction Case
- Install Puppet on a Red Hat system.
- Add a reposdir setting to /etc/yum.conf which contains a whitespace-delimited list:
echo 'reposdir=/etc/yum.conf.d /tmp' >> /etc/yum.conf |
- Attempt to create a new repo definition.
Outcome
The definition is added to /etc/yum.conf instead of a new file under /tmp/:
# /opt/puppet/bin/puppet resource yumrepo foo ensure=present descr='foo repo'
|
Notice: /Yumrepo[foo]/ensure: created
|
yumrepo { 'foo':
|
ensure => 'present',
|
descr => 'foo repo',
|
}
|
|
# ls /etc/yum.repos.d/foo.repo
|
ls: cannot access /etc/yum.repos.d/foo.repo: No such file or directory
|
Expected Outcome
The definition is created under /tmp/ as it's the last reposdir specified
# /opt/puppet/bin/puppet resource yumrepo foo ensure=present descr='foo repo'
|
Notice: /Yumrepo[foo]/ensure: created
|
yumrepo { 'foo':
|
ensure => 'present',
|
descr => 'foo repo',
|
}
|
|
# ls /tmp/foo.repo
|
/tmp/foo.repo
|
Attachments
Issue Links
- relates to
-
PUP-2916 yumrepo fails to honour custom reposdir
-
- Closed
-