Skip to content

Commit

Permalink
Merge pull request #971 from lsst-it/IT-4872/facts.os
Browse files Browse the repository at this point in the history
(hiera) use %{facts.os.*} instead of %{os.*}
  • Loading branch information
jhoblitt authored Nov 9, 2023
2 parents f16f45c + a63b42a commit 577fcba
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 46 deletions.
62 changes: 31 additions & 31 deletions hiera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,71 +7,71 @@ hierarchy:
datadir: "/etc/puppetlabs/code/hieradata/private/%{environment}"
paths: &paths
- "node/%{fqdn}.yaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}/%{os.family}/major/%{os.release.major}.yaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}.yaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/%{os.family}/major/%{os.release.major}.yaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}.yaml"
- "site/%{site}/cluster/%{cluster}/role/%{role}/osfamily/%{os.family}/major/%{os.release.major}.yaml"
- "site/%{site}/cluster/%{cluster}/role/%{role}/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "site/%{site}/cluster/%{cluster}/role/%{role}/osfamily.yaml"
- "site/%{site}/cluster/%{cluster}/role/%{role}.yaml"
- "site/%{site}/cluster/%{cluster}.yaml"
- "cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}/%{os.family}/major/%{os.release.major}.yaml"
- "cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}.yaml"
- "cluster/%{cluster}/variant/%{variant}/%{os.family}/major/%{os.release.major}.yaml"
- "cluster/%{cluster}/variant/%{variant}/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "cluster/%{cluster}/variant/%{variant}.yaml"
- "cluster/%{cluster}/role/%{role}.yaml"
- "cluster/%{cluster}/osfamily/%{os.family}/major/%{os.release.major}.yaml"
- "cluster/%{cluster}/osfamily/%{os.family}.yaml"
- "cluster/%{cluster}/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "cluster/%{cluster}/osfamily/%{facts.os.family}.yaml"
- "cluster/%{cluster}.yaml"
- "site/%{site}/variant/%{variant}/subvariant/%{subvariant}/%{os.family}/major/%{os.release.major}.yaml"
- "site/%{site}/variant/%{variant}/subvariant/%{subvariant}/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "site/%{site}/variant/%{variant}/subvariant/%{subvariant}.yaml"
- "site/%{site}/variant/%{variant}/%{os.family}/major/%{os.release.major}.yaml"
- "site/%{site}/variant/%{variant}/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "site/%{site}/variant/%{variant}.yaml"
- "site/%{site}/role/%{role}/osfamily/%{os.family}/major/%{os.release.major}.yaml"
- "site/%{site}/role/%{role}/osfamily/%{os.family}.yaml"
- "site/%{site}/role/%{role}/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "site/%{site}/role/%{role}/osfamily/%{facts.os.family}.yaml"
- "site/%{site}/role/%{role}.yaml"
- "site/%{site}.yaml"
- "role/%{role}/osfamily/%{os.family}/major/%{os.release.major}.yaml"
- "role/%{role}/osfamily/%{os.family}.yaml"
- "role/%{role}/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "role/%{role}/osfamily/%{facts.os.family}.yaml"
- "role/%{role}.yaml"
- "common/osfamily/%{os.family}/major/%{os.release.major}.yaml"
- "common/osfamily/%{os.family}.yaml"
- "common/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "common/osfamily/%{facts.os.family}.yaml"
- "common/virtual/%{virtual}.yaml"
- "common.yaml"
- name: "private hiera eyaml"
lookup_key: "eyaml_lookup_key" # eyaml backend
datadir: "/etc/puppetlabs/code/hieradata/private/%{environment}"
paths:
- "node/%{fqdn}.eyaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}/%{os.family}/major/%{os.release.major}.eyaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}/%{facts.os.family}/major/%{facts.os.release.major}.eyaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}.eyaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/%{os.family}/major/%{os.release.major}.eyaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/%{facts.os.family}/major/%{facts.os.release.major}.eyaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}.eyaml"
- "site/%{site}/cluster/%{cluster}/role/%{role}/osfamily/%{os.family}/major/%{os.release.major}.eyaml"
- "site/%{site}/cluster/%{cluster}/role/%{role}/osfamily/%{os.family}.eyaml"
- "site/%{site}/cluster/%{cluster}/role/%{role}/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.eyaml"
- "site/%{site}/cluster/%{cluster}/role/%{role}/osfamily/%{facts.os.family}.eyaml"
- "site/%{site}/cluster/%{cluster}/role/%{role}.eyaml"
- "site/%{site}/cluster/%{cluster}.eyaml"
- "cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}/%{os.family}/major/%{os.release.major}.eyaml"
- "cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}/%{facts.os.family}/major/%{facts.os.release.major}.eyaml"
- "cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}.eyaml"
- "cluster/%{cluster}/variant/%{variant}/%{os.family}/major/%{os.release.major}.eyaml"
- "cluster/%{cluster}/variant/%{variant}/%{facts.os.family}/major/%{facts.os.release.major}.eyaml"
- "cluster/%{cluster}/variant/%{variant}.eyaml"
- "cluster/%{cluster}/role/%{role}.eyaml"
- "cluster/%{cluster}/osfamily/%{os.family}/major/%{os.release.major}.eyaml"
- "cluster/%{cluster}/osfamily/%{os.family}.eyaml"
- "cluster/%{cluster}/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.eyaml"
- "cluster/%{cluster}/osfamily/%{facts.os.family}.eyaml"
- "cluster/%{cluster}.eyaml"
- "site/%{site}/variant/%{variant}/subvariant/%{subvariant}/%{os.family}/major/%{os.release.major}.eyaml"
- "site/%{site}/variant/%{variant}/subvariant/%{subvariant}/%{facts.os.family}/major/%{facts.os.release.major}.eyaml"
- "site/%{site}/variant/%{variant}/subvariant/%{subvariant}.eyaml"
- "site/%{site}/variant/%{variant}/%{os.family}/major/%{os.release.major}.eyaml"
- "site/%{site}/variant/%{variant}/%{facts.os.family}/major/%{facts.os.release.major}.eyaml"
- "site/%{site}/variant/%{variant}.eyaml"
- "site/%{site}/role/%{role}/osfamily/%{os.family}/major/%{os.release.major}.eyaml"
- "site/%{site}/role/%{role}/osfamily/%{os.family}.eyaml"
- "site/%{site}/role/%{role}/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.eyaml"
- "site/%{site}/role/%{role}/osfamily/%{facts.os.family}.eyaml"
- "site/%{site}/role/%{role}.eyaml"
- "site/%{site}.eyaml"
- "role/%{role}/osfamily/%{os.family}/major/%{os.release.major}.eyaml"
- "role/%{role}/osfamily/%{os.family}.eyaml"
- "role/%{role}/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.eyaml"
- "role/%{role}/osfamily/%{facts.os.family}.eyaml"
- "role/%{role}.eyaml"
- "common/osfamily/%{os.family}/major/%{os.release.major}.eyaml"
- "common/osfamily/%{os.family}.eyaml"
- "common/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.eyaml"
- "common/osfamily/%{facts.os.family}.eyaml"
- "common/virtual/%{virtual}.eyaml"
- "common.eyaml"
options:
Expand Down
30 changes: 15 additions & 15 deletions spec/fixtures/hiera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,34 @@ hierarchy:
datadir: "../../hieradata"
paths:
- "node/%{fqdn}.yaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}/%{os.family}/major/%{os.release.major}.yaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}.yaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/%{os.family}/major/%{os.release.major}.yaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "site/%{site}/cluster/%{cluster}/variant/%{variant}.yaml"
- "site/%{site}/cluster/%{cluster}/role/%{role}/osfamily/%{os.family}/major/%{os.release.major}.yaml"
- "site/%{site}/cluster/%{cluster}/role/%{role}/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "site/%{site}/cluster/%{cluster}/role/%{role}/osfamily.yaml"
- "site/%{site}/cluster/%{cluster}/role/%{role}.yaml"
- "site/%{site}/cluster/%{cluster}.yaml"
- "cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}/%{os.family}/major/%{os.release.major}.yaml"
- "cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "cluster/%{cluster}/variant/%{variant}/subvariant/%{subvariant}.yaml"
- "cluster/%{cluster}/variant/%{variant}/%{os.family}/major/%{os.release.major}.yaml"
- "cluster/%{cluster}/variant/%{variant}/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "cluster/%{cluster}/variant/%{variant}.yaml"
- "cluster/%{cluster}/role/%{role}.yaml"
- "cluster/%{cluster}/osfamily/%{os.family}/major/%{os.release.major}.yaml"
- "cluster/%{cluster}/osfamily/%{os.family}.yaml"
- "cluster/%{cluster}/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "cluster/%{cluster}/osfamily/%{facts.os.family}.yaml"
- "cluster/%{cluster}.yaml"
- "site/%{site}/variant/%{variant}/subvariant/%{subvariant}/%{os.family}/major/%{os.release.major}.yaml"
- "site/%{site}/variant/%{variant}/subvariant/%{subvariant}/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "site/%{site}/variant/%{variant}/subvariant/%{subvariant}.yaml"
- "site/%{site}/variant/%{variant}/%{os.family}/major/%{os.release.major}.yaml"
- "site/%{site}/variant/%{variant}/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "site/%{site}/variant/%{variant}.yaml"
- "site/%{site}/role/%{role}/osfamily/%{os.family}/major/%{os.release.major}.yaml"
- "site/%{site}/role/%{role}/osfamily/%{os.family}.yaml"
- "site/%{site}/role/%{role}/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "site/%{site}/role/%{role}/osfamily/%{facts.os.family}.yaml"
- "site/%{site}/role/%{role}.yaml"
- "site/%{site}.yaml"
- "role/%{role}/osfamily/%{os.family}/major/%{os.release.major}.yaml"
- "role/%{role}/osfamily/%{os.family}.yaml"
- "role/%{role}/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "role/%{role}/osfamily/%{facts.os.family}.yaml"
- "role/%{role}.yaml"
- "common/osfamily/%{os.family}/major/%{os.release.major}.yaml"
- "common/osfamily/%{os.family}.yaml"
- "common/osfamily/%{facts.os.family}/major/%{facts.os.release.major}.yaml"
- "common/osfamily/%{facts.os.family}.yaml"
- "common/virtual/%{virtual}.yaml"
- "common.yaml"

0 comments on commit 577fcba

Please sign in to comment.