feat: add enc_role_path fact

This commit is contained in:
Ben Vincent 2023-11-11 00:03:12 +11:00
parent 11508f2538
commit f73c16bca2
2 changed files with 10 additions and 5 deletions

View File

@ -5,10 +5,14 @@ defaults:
data_hash: "yaml_data"
hierarchy:
- name: Node-specific data
path: "nodes/%{trusted.certname}.yaml"
- name: "Per-OS & Release Specific Data"
path: "os/%{facts.os.name}/%{facts.os.name}%{facts.os.release.major}.yaml"
- name: "Per-OS Specific Data"
path: "os/%{facts.os.name}/all_releases.yaml"
paths:
- "nodes/%{trusted.certname}.yaml"
- name: Role-specific data
paths:
- "%{facts.enc_role_path}.yaml"
- name: "OS Related"
paths:
- "os/%{facts.os.name}/%{facts.os.name}%{facts.os.release.major}.yaml"
- "os/%{facts.os.name}/all_releases.yaml"
- name: Common data shared across nodes
path: "common.yaml"

View File

@ -1 +1,2 @@
enc_role=<%= @enc_role[0] %>
enc_role_path=<%= @enc_role[0].gsub('::', '/') %>