Hi Denny,

> * Hiera role includes: hieradata/role/mon.yaml
> 
> ---
> classes:
>   - role::mysql_server
>   - role::icinga2_server
>   - role::webserver
>   - role::web::icingaweb2

The usual role/profile pattern for Puppet says one node => one role.
What you could do, though I wouldn't recommend it, because it might
become confusing, would be to have your icinga2_server role inherit from
a webserver role, but as I said, it's not really logic.

What would interesting me though, would be to know how you assign this
role hierarchy to your nodes? Can you show your hiera.yaml file?


> icinga2::features::api:
>   bind_host:  '127.0.0.1'
>   accept_config: true
>   ca_path:  '/etc/ssl/certs/ca.crt'
>   cert_path:  '/etc/ssl/certs/bla.cert'
>   key_path:  '/etc/ssl/certs/bla.key'


The rule of thumb for automatic lookup of variables is:

$var in class icinga2::features::api => icinga2::features::api::var in
your hiera file.

You cannot use a hash as you did, because api is the class, not the
hash/variable key. So it should look like this:


> icinga2::features::api::bind_host: '127.0.0.1'
> icinga2::features::api::accept_config: true
> icinga2::features::api::ca_path:  '/etc/ssl/certs/ca.crt'
> icinga2::features::api::cert_path:  '/etc/ssl/certs/bla.cert'
> icinga2::features::api::key_path:  '/etc/ssl/certs/bla.key'


You can take a look at this PR which introduces a working set-up using
hiera for configuration for most aspects:
https://github.com/Icinga/puppet-icinga2-rewrite/pull/32

Best regards,
David


-- 
TenTwentyFour S.à r.l.
W: www.tentwentyfour.lu
T: +352 20 211 1024
F: +352 20 211 1023
9, avenue des Hauts-Fourneaux
L-4362 Esch/Alzette

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to