Skip to content

How to Use magic_shell_environment Idempotently? #11

@kevinmeredith

Description

@kevinmeredith

Could you please tell me how to use the magic_shell_environment resource idempotently?

Example:

install tomcat using ark cookbook (using put action that doesn't affect $PATH)
add tomcat to the $PATH

Here's how I'm doing the second part:

tomcat_bin = tomcat_path + '/tomcat/bin'
magic_shell_environment "PATH" do
    value tomcat_bin + ":$PATH"
end

However, if I provision this script n times, then my PATH contains n tomcat instances added to the $PATH.

Thanks

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