Skip to content

clarify PATH expectations tasks should have  #114

@ripienaar

Description

@ripienaar

At present there is no mention of what should and should not be in the PATH for tasks to rely on, the Apache task has this:

https://github.com/puppetlabs/puppetlabs-apache/blob/e587f2af793111adab04bb776808f99a09ca092b/tasks/init.rb#L8

Here it relies on facter being in the path which only works in PE because apparently PE links facter to /usr/local/bin - something puppet-agent does not do.

It probably works under ssh bolt because that reads the profile files that may or may not exist on the node

It all kind of seems to work by accident rather than clear specification.

A quick chat on Slack about this suggested that probably tasks should not expect PATH to have anything and should use full paths for most things like here:

https://github.com/puppetlabs/puppetlabs-facter_task/blob/32658a05a6080c35505267184b9a14a1ef6d8768/tasks/init.rb#L21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions