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

How to set parameters with hiera for a class included in default.pp

$
0
0
setup: - no puppetmaster - puppet version 4.3.1 - hiera 1.3.0 currently the default.pp looks like that: node default { class { 'ntp': servers => [ 'ntp.ubuntu.com' ] } } class { 'apt': purge_sources_list => true, purge_sources_list_d => true, purge_preferences_d => true, } hiera_include('roles', []) hiera_include('sites', []) hiera.yaml looks like that: --- :backends: - yaml :hierarchy: - "%{::clientcert}" - "%{::environment}" - "%{::domain}" - "virtual_%{::is_virtual}" - common :yaml: :datadir: "/etc/puppetlabs/code/environments/%{::environment}/hieradata" vagrant.yaml --- roles: - roles::nginx - roles::java8 apt::sources: "openjdk-8": location: "http://ppa.launchpad.net/openjdk-r/ppa/ubuntu" release: trusty repos: main include_src: false include_deb: true key: 'DA1A4A13543B466853BAF164EB9B1D8886F44E2A' everything works like charm but now i would like to remove the three parameters from the apt class and setting them with hiera. `apt::sources:` are correclty looked up via hiera but if i add `apt:` it does nothing adding this to my hiera file does not help: apt:: purge_sources_list: false purge_sources_list_d: false purge_preferences_d: false also tried `apt::init:` as key it it possible to set the parameter via hiera without using ``hiera_include('classes')`?

Viewing all articles
Browse latest Browse all 6104


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