]> gitweb.fluxo.info Git - puppet-bootstrap.git/commitdiff
Hiera: use facts variable
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 18 Jun 2020 18:20:59 +0000 (15:20 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 18 Jun 2020 18:20:59 +0000 (15:20 -0300)
config/hiera.yaml

index c52eeb37e328334f7959f440c487ee49d4565d91..14e393dcf8945ec55b1ce440e1ac2f15a129d5fc 100644 (file)
@@ -11,7 +11,7 @@ hierarchy:
   # We also recommend to leave only encrypted data in your hiera config.
   #
   - name: "encrypted secrets"
-    path: "secrets/node/%{::fqdn}.yaml"
+    path: "secrets/node/%{facts.fqdn}.yaml"
     lookup_key: eyaml_lookup_key
     options:
       # If using the pkcs7 encryptor (default)
@@ -20,19 +20,19 @@ hierarchy:
 
   - name: "regular secrets"
     paths:
-      - "secrets/role/%{::role}.yaml"
-      - "secrets/location/%{::location}.yaml"
-      - "secrets/domain/%{::domain}.yaml"
+      - "secrets/role/%{facts.role}.yaml"
+      - "secrets/location/%{facts.location}.yaml"
+      - "secrets/domain/%{facts.domain}.yaml"
 
   #
   # All other stuff goes in regular YAML files.
   #
   - name: "public"
     paths:
-      - "node/%{::fqdn}.yaml"
-      - "role/%{::role}.yaml"
-      - "virtual/%{::virtual}.yaml"
-      - "location/%{::location}.yaml"
-      - "domain/%{::domain}.yaml"
+      - "node/%{facts.fqdn}.yaml"
+      - "role/%{facts.role}.yaml"
+      - "virtual/%{facts.virtual}.yaml"
+      - "location/%{facts.location}.yaml"
+      - "domain/%{facts.domain}.yaml"
       - "compiled.yaml"
       - "common.yaml"