Hi everybody!
I've the task to migrate our existing puppet installation from Puppet 3.8 to Puppet 6.x and my colleague gave me the following tasks to do this:
- Hiera: all nodes should be configurable via hiera --> as with our currently installed version which has the following configuration:
---
:hierarchy:
- "nodes/%{::fqdn}"
- common
:backends:
- yaml
:yaml:
:datadir: "/etc/puppet/environments/%{::environment}/hieradata"
- integrate to hiera-levels: 1. One for "common" (valid for all nodes of the env) ---> have a look at the code above
2. One per Client-Name
- NTP should be configured - the IP addresses of the NTP servers on the "common" should be taken over and overwritten by the "Node-Config" if necessary
- under /var/tmp/ the directory "common" should be created uniformly
- For each node, create a file under "/var/tmp/common" that has the hostname (FQDN) of the respective node. The content of the file should be the configured NTP-server.
Especially at the last point I have problems to implement this with puppet.
So far I've done the following:
- Created the site.pp under /etc/puppetlabs/code/environments/production/manifests with the following content:
- Create an
hiera.yaml under
/etc/puppetlabs/puppet with the following content:
---
# Hiera 5 Global configuration file
version: 5
defaults:
datadir: "/etc/puppet/environments/%{::environment}/hieradata"
data_hash: yaml_data
hierarchy:
- name: "Common"
path: "common.yaml"
data_hash: yaml_data
- name: "Clients"
path: "nodes/%{::fqdn}"
# hierarchy: []
Hope, all of you can give me good tipps how I can solve my taks!
Thanks a lot for your help :)