Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tasks: replace os_identification with facts #459

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
* [`infrastatus`](#infrastatus): Runs puppet infra status and returns the output
* [`mkdir_p_file`](#mkdir_p_file): Create a file with the specified content at the specified location
* [`mv`](#mv): Wrapper task for mv command
* [`os_identification`](#os_identification): Return the operating system runnin gon the target as a string
* [`pe_install`](#pe_install): Install Puppet Enterprise from a tarball
* [`pe_ldap_config`](#pe_ldap_config): Set the ldap config in the PE console
* [`pe_uninstall`](#pe_uninstall): Uninstall Puppet Enterprise
Expand Down Expand Up @@ -1243,12 +1242,6 @@ Data type: `String`

New path of file

### <a name="os_identification"></a>`os_identification`

Return the operating system runnin gon the target as a string

**Supports noop?** false

### <a name="pe_install"></a>`pe_install`

Install Puppet Enterprise from a tarball
Expand Down
4 changes: 2 additions & 2 deletions plans/util/retrieve_and_upload.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
|-HEREDOC
# lint:endignore

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

if 'windows' in $os_string {
$exists = run_command("[System.IO.File]::Exists('${local_path}')", 'local://localhost')
Expand Down
2 changes: 1 addition & 1 deletion spec/plans/util/retrieve_and_upload_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
include BoltSpec::Plans

it 'file needs downloaded and needs uploaded' do
expect_task('peadm::os_identification')
allow_task('facts').be_called_times(1).with_targets('local://localhost').always_return({ 'os' => { 'family' => 'RedHat' } })
expect_command("test -e '/tmp/download'").error_with('kind' => 'nope', 'msg' => 'The command failed with exit code 1')
expect_task('peadm::download')
expect_task('peadm::filesize').be_called_times(2).return_for_targets(
Expand Down
9 changes: 0 additions & 9 deletions tasks/os_identification.json

This file was deleted.

18 changes: 0 additions & 18 deletions tasks/os_identification.ps1

This file was deleted.

17 changes: 0 additions & 17 deletions tasks/os_identification.sh

This file was deleted.

Loading