Closed gajus closed 9 years ago
The question is: Why is the install.pp executed twice? ;-)
You should call the main class redis::install
only once. Its a class, not a defined type.
Any chance of this getting sorted before the end of the day? I am using https://vagrantcloud.com/puppetlabs/boxes/centos-7.0-64-puppet, if thats helps.
Did you also open an Issue for the puppet nodejs maintainers? They seem to have the same issue by not using ensure_packages
. I will see to it. Or you can send me a PR ;)
So try it with this master. It should work now.
Getting:
==> default: Error: Could not find dependent Anchor['redis::prepare_build'] for Package[make]
Change:
'Debian', 'Ubuntu': {
ensure_packages('build-essential', {'before' => Anchor['redis::prepare_build']} )
}
'Fedora', 'RedHat', 'CentOS', 'OEL', 'OracleLinux', 'Amazon': {
ensure_packages(['make', 'gcc', 'glibc-devel'], {'before' => Anchor['redis::prepare_build']})
}
Why is this closed if it has not been released yet?
because it it fixed in the master. But dont worry, there will be a new release soon.
Sadly, the 'before' => Anchor
part of this:
ensure_packages('build-essential', {'before' => Anchor['redis::prepare_build']} )
makes it throw a duplicate declaration error because I also use ensure_packages in a different module like this:
ensure_packages([
'atop',
'bc',
'build-essential',
'curl',
'git-core',
'glances',
'htop',
'libpam-cracklib',
'locate',
'logrotate',
'lsof',
'mailutils',
'ncdu',
'nethogs',
'nscd',
'ntp',
'psmisc',
'rsync',
'silversearcher-ag',
'snmpd',
'sysstat',
'tmpreaper',
'unzip',
'vim',
'wget',
'zsh',
]
)
If you remove that, then the catalog compiles fine. Just putting this here for anyone else who runs into it.
Consider using https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/lib/puppet/parser/functions/ensure_packages.rb or manually checking that packages are not already installed.