Skip to content

Commit 4e72a7e

Browse files
authored
Merge pull request #75 from EncoreTechnologies/hotfix/ubuntu-puppet-facts
Patching facts
2 parents 68313a4 + 4bb9065 commit 4e72a7e

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@ All notable changes to this project will be documented in this file.
44

55
## Development
66

7-
- Bumped module `puppetlabs/puppet_agent` to `< 5.0.0`
7+
* Fixed issue where puppet facts were not in the expected spot causing
8+
puppet_facts plan to fail. We added a conditional to check for the facts
9+
in both places
10+
11+
Contributed by Bradley Bishop (@bishopbm1)
12+
13+
* Bumped module `puppetlabs/puppet_agent` to `< 5.0.0`
814

915
Contributed by @fetzerms
1016

11-
- Added module `puppetlabs/reboot` to `>= 3.0.0 < 5.0.0`
17+
* Added module `puppetlabs/reboot` to `>= 3.0.0 < 5.0.0`
1218

1319
Contributed by @fetzerms
1420

plans/puppet_facts.pp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@
2323
#
2424
# We only want to set the "values" as facts on the node
2525
$result_set.each |$result| {
26-
add_facts($result.target, $result.value['values'])
26+
# Debian systems to not have values param they are just in the value return
27+
if 'values' in $result.value {
28+
$target_fact_values = $result.value['values']
29+
} else {
30+
$target_fact_values = $result.value
31+
}
32+
33+
add_facts($result.target, $target_fact_values)
2734
}
2835
return $result_set
2936
}

0 commit comments

Comments
 (0)