Skip to content

Commit 9c8ad93

Browse files
authored
Merge pull request #14 from vchepkov/name
use 'name' instead of 'host' to better represent targets in inventory
2 parents b740550 + 494bd5e commit 9c8ad93

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
44

55
## Development
66

7+
* use 'name' instead of 'host' to better represent targets in inventory
8+
9+
Contributed by Vadym Chepkov (@vchepkov)
710

811
## Release 1.0.0 (2020-02-28)
912

plans/available_updates.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
'csv': {
7373
$csv_header = 'hostname,num_updates,name,version (linux only),kbs (windows only)\n'
7474
$csv = $available_results.reduce($csv_header) |$res_memo, $res| {
75-
$hostname = $res.target.host
75+
$hostname = $res.target.name
7676
$num_updates = $res['updates'].length
7777
$host_updates = $res['updates'].reduce('') |$up_memo, $up| {
7878
$name = $up['name']

plans/ordered_groups.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
$ordered_keys = sort(keys($ordered_hash))
116116
out::message("Groups = ${ordered_keys}")
117117
$ordered_groups = $ordered_keys.map |$o| {
118-
$ordered_targets = $ordered_hash[$o].map |$t| {$t.host}
118+
$ordered_targets = $ordered_hash[$o].map |$t| {$t.name}
119119
out::message("Group '${o}' targets = ${ordered_targets}")
120120
# trust me, we have to assign to a variable here, it's a detail of the puppet
121121
# language parser that gets mad, but only because there is the loop above

plans/update_history.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
'csv': {
6868
$csv_header = "host,action,name,version,kb (windows only)\n"
6969
$report = $_history.reduce($csv_header) |$res_memo, $res| {
70-
$hostname = $res.target.host
70+
$hostname = $res.target.name
7171
$num_updates = $res['upgraded'].length
7272
$host_updates = $res['upgraded'].reduce('') |$up_memo, $up| {
7373
$name = $up['name']

0 commit comments

Comments
 (0)