Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

apt::source, hiera, calling_module, how to combine

$
0
0
I' m struggling for about two weeks to figure out how to implement following scenario: Let' s say I have a module that installs and configures rabbitmq. Since I need package version that is not present in distro repository, I want to add one, by using puppetlabs-apt module, but I want to keep all my variables in hiera and use this repo inly if rabbitmq is installed. hiera.yaml :hierarchy: - "nodes/%{::fqdn}" - "nodes/%{::lsbdistcodename}" - "%{calling_module}" - "common" :backends: - yaml :yaml: :datadir: '/etc/puppet/hiera' package.pp require apt package {'rabbitmq-server': ensure => 'present', } rabbitmq.yaml apt::sources: 'rabbitmq': comment: 'RabbitMQ Official Repository' location: 'http://www.rabbitmq.com/debian/' release: 'testing' repos: 'main' key: source: 'https://www.rabbitmq.com/rabbitmq-release-signing-key.asc' id: '0A9AF2115F4687BD29803A206B73A36E6026DFCA' include: deb: true This doesn't work because calling_module is apt and it doesnt search for variables in rabbitmq.yaml and defaults to common where I define repos for all roles. How can I achieve my goals. Any Ideas?

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>