Skip to content

Commit 7160609

Browse files
committed
fixup
1 parent 975553f commit 7160609

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

.github/workflows/integration_test.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -84,29 +84,17 @@ jobs:
8484
FILE='spec/fixtures/litmus_inventory.yaml'
8585
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
8686
87-
- name: Inject PE vars into inventory (Ruby, safe)
87+
- name: Inject PE postgres_version into inventory (Ruby, minimal)
8888
shell: bash
8989
run: |
9090
FILE='spec/fixtures/litmus_inventory.yaml'
91-
92-
# Use Ruby to safely modify YAML: redact ssh.password and add PE Postgres version under vars
9391
ruby - "$FILE" <<'RUBY'
9492
require 'yaml'
9593
file = ARGV[0]
9694
inv = YAML.load_file(file)
9795
98-
unless inv.is_a?(Hash) && inv.key?('groups')
99-
raise "Unexpected inventory structure: #{inv.class}"
100-
end
101-
10296
(inv['groups'] || []).each do |g|
10397
(g['targets'] || []).each do |t|
104-
# Redact SSH password if present
105-
if (ssh = t.dig('config', 'ssh'))
106-
ssh['password'] = '[redacted]' if ssh.key?('password')
107-
end
108-
109-
# Ensure vars exist and inject desired PE param
11098
t['vars'] ||= {}
11199
t['vars']['puppet_enterprise::params::postgres_version'] = '13'
112100
end
@@ -115,10 +103,6 @@ jobs:
115103
File.write(file, inv.to_yaml)
116104
RUBY
117105
118-
echo "::group::litmus_inventory.yaml (after injection)"
119-
cat "$FILE"
120-
echo "::endgroup::"
121-
122106
- name: Install PE
123107
run: |
124108
bundle exec bolt --modulepath spec/fixtures/modules -i ./spec/fixtures/litmus_inventory.yaml plan run ntp::acceptance::pe_server

0 commit comments

Comments
 (0)