Skip to content

Commit 01d8f1f

Browse files
committed
tasks: replace os_identification with facts
the facts task is vendored into bolt. It supports gathering facts from systems with and without facter installed.
1 parent 4743ffd commit 01d8f1f

File tree

5 files changed

+3
-48
lines changed

5 files changed

+3
-48
lines changed

plans/util/retrieve_and_upload.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
|-HEREDOC
3030
# lint:endignore
3131

32-
$operating_system = run_task('peadm::os_identification', 'local://localhost')
33-
$os_string =$operating_system.first.value['_output']
32+
$operating_system = run_task('facts', 'local://localhost')
33+
$os_string =$operating_system.first.value['os']['family']
3434

3535
if 'windows' in $os_string {
3636
$exists = run_command("[System.IO.File]::Exists('${local_path}')", 'local://localhost')

spec/plans/util/retrieve_and_upload_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
include BoltSpec::Plans
66

77
it 'file needs downloaded and needs uploaded' do
8-
expect_task('peadm::os_identification')
8+
expect_task('facts')
99
expect_command("test -e '/tmp/download'").error_with('kind' => 'nope', 'msg' => 'The command failed with exit code 1')
1010
expect_task('peadm::download')
1111
expect_task('peadm::filesize').be_called_times(2).return_for_targets(

tasks/os_identification.json

-9
This file was deleted.

tasks/os_identification.ps1

-18
This file was deleted.

tasks/os_identification.sh

-18
This file was deleted.

0 commit comments

Comments
 (0)