Write data: Set per-node data
The highest level of the example hierarchy uses the value
of $trusted['certname']
to locate its data
file, so you can set data by name for each individual node.
This example supposes
you have a server named jenkins-prod-03.example.com
, and configures it to use SSL and to serve
this application at the hostname ci.example.com
. To try this out, choose the name of a real server that
you can run Puppet on.
- To locate the data file, replace
%{trusted.certname}
with the node name you’re targeting:/etc/puppetlabs/code/environments/production/data/
+nodes/
+jenkins-prod-03.example.com
+.yaml
- Open that file in an editor and add the following
contents:
# /etc/puppetlabs/code/environments/production/data/nodes/jenkins-prod-03.example.com.yaml --- profile::hiera_test::ssl: true profile::hiera_test::site_alias: ci.example.com
- Compile to observe that the override takes effect.
Results Related topics: $trusted[‘certname’].