hiera-eyaml-age 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Makefile +1 -4
- data/README.md +2 -0
- data/lib/hiera/backend/eyaml/encryptors/age/version.rb +1 -1
- data/lib/hiera/backend/eyaml/encryptors/age.rb +7 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ac5587ac5f3381c45ce33c739810dde864afc461f0432345c623bc288d76341f
|
|
4
|
+
data.tar.gz: b7303a828c2ab455323f7727c1cbd21baee76be804ab3afaecc4cd3464623cc6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e5c7b091d59aaa2bb591cdf0f628684b98cab0867fc168a6fe8933003bdab43f0728400879d8bfaf508f9791a22812e3dc47930a73c5822728c3ff799b5569b8
|
|
7
|
+
data.tar.gz: a402ebfbe69fb8e199bc91054ab9a619bd592b05cde1901d496a1201c20361d41c1c2b14789eaa4ebcc76e639c3bb223e15fa2498337bc5c82032513247d0c85
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.2] - 2026-05-27
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Fix option lookup: rename some option keys that still had `age_` prepended, to avoid double-prefixing by eyaml
|
|
13
|
+
- Override `option()` to correctly apply defined defaults when running on a Puppet server
|
|
14
|
+
|
|
8
15
|
## [0.2.1] - 2026-05-27
|
|
9
16
|
|
|
10
17
|
### Fixed
|
data/Makefile
CHANGED
|
@@ -10,11 +10,8 @@ gem: hiera-eyaml-age-$(VERSION).gem
|
|
|
10
10
|
deb: hiera-eyaml-age-$(VERSION).gem
|
|
11
11
|
gem2deb --package hiera-eyaml-age hiera-eyaml-age-$(VERSION).gem
|
|
12
12
|
|
|
13
|
-
targz:
|
|
14
|
-
git archive --output hiera-eyaml-age_$(VERSION).tar.gz --prefix hiera-eyaml-age main
|
|
15
|
-
|
|
16
13
|
.PHONY: packages
|
|
17
|
-
packages: deb gem
|
|
14
|
+
packages: deb gem
|
|
18
15
|
|
|
19
16
|
hiera-eyaml-age-$(VERSION).gem:
|
|
20
17
|
gem build hiera-eyaml-age.gemspec
|
data/README.md
CHANGED
|
@@ -75,11 +75,13 @@ hierarchy:
|
|
|
75
75
|
- name: "Per-node data"
|
|
76
76
|
lookup_key: eyaml_lookup_key
|
|
77
77
|
options:
|
|
78
|
+
age_binary_path: /path/to/age
|
|
78
79
|
age_identity_file: /opt/puppetlabs/server/data/puppetserver/.age/identity.txt
|
|
79
80
|
path: "nodes/%{::trusted.certname}.yaml"
|
|
80
81
|
- name: "Common data"
|
|
81
82
|
lookup_key: eyaml_lookup_key
|
|
82
83
|
options:
|
|
84
|
+
age_binary_path: /path/to/age
|
|
83
85
|
age_identity_file: /opt/puppetlabs/server/data/puppetserver/.age/identity.txt
|
|
84
86
|
path: "common.yaml"
|
|
85
87
|
```
|
|
@@ -13,7 +13,7 @@ class Hiera
|
|
|
13
13
|
self.tag = "AGE"
|
|
14
14
|
|
|
15
15
|
self.options = {
|
|
16
|
-
|
|
16
|
+
binary_path: {
|
|
17
17
|
desc: "Full path to the age executable (use an absolute path in production to avoid PATH-based substitution)",
|
|
18
18
|
type: :string,
|
|
19
19
|
default: "age"
|
|
@@ -40,6 +40,10 @@ class Hiera
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
def self.option(name)
|
|
44
|
+
super || (self.options[name] || {})[:default]
|
|
45
|
+
end
|
|
46
|
+
|
|
43
47
|
def self.encrypt(plaintext)
|
|
44
48
|
recipients = determine_recipients
|
|
45
49
|
debug("Recipients are #{recipients}")
|
|
@@ -54,7 +58,7 @@ class Hiera
|
|
|
54
58
|
|
|
55
59
|
stdout, stderr, status =
|
|
56
60
|
Open3.capture3(
|
|
57
|
-
option(:
|
|
61
|
+
option(:binary_path),
|
|
58
62
|
"--encrypt",
|
|
59
63
|
*recipient_args,
|
|
60
64
|
stdin_data: plaintext,
|
|
@@ -99,7 +103,7 @@ class Hiera
|
|
|
99
103
|
|
|
100
104
|
stdout, stderr, status =
|
|
101
105
|
Open3.capture3(
|
|
102
|
-
option(:
|
|
106
|
+
option(:binary_path),
|
|
103
107
|
"--decrypt",
|
|
104
108
|
"--identity",
|
|
105
109
|
identity_arg,
|