puppet-mongodb
puppet-mongodb copied to clipboard
mongodb client resolves to wrong package name
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 4.10.0
- Distribution:centos 7
- Module version: 3.1.0
How to reproduce (e.g Puppet code you use)
class {'mongodb::globals': manage_package_repo => true, version => '4.0', } -> class {'mongodb::client': } -> class {'mongodb::server': port => 27018, verbose => true, }
What are you seeing
Puppet agent tries to install using /bin/yum -d 0 -e 0 -y install mongodb-org-shell-4.0' which obviously fails as package does not exist.
What behaviour did you expect instead
That package name would be "mongodb-org-shell" - not not "mongodb-org-shell-4.0".
Output log
Debug: Executing: '/bin/rpm -q mongodb-org-shell --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'' Debug: Executing: '/bin/rpm -q mongodb-org-shell --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n' --whatprovides' Debug: Executing: '/bin/yum -d 0 -e 0 -y install mongodb-org-shell-4.0' Error: Could not update: Execution of '/bin/yum -d 0 -e 0 -y install mongodb-org-shell-4.0' returned 1: Error: Nothing to do Error: /Stage[main]/Mongodb::Client/Package[mongodb_client]/ensure: change from purged to 4.0 failed: Could not update: Execution of '/bin/yum -d 0 -e 0 -y install mongodb-org-shell-4.0' returned 1: Error: Nothing to do
Any additional information you'd like to impart
It does the same if I don't install mongodb::client - for the server.. it tries to install: mongodb-org-server-4.0
Setting this in hieradata: mongodb::repo::version: '4.0'
and NOT setting version in mongodb::globals - works.