Skip to content

How salt cmd.run Works with OS ENV? #19776

@Colstuwjx

Description

@Colstuwjx

As I see in the source-code, salt cmd.run seems using python subprocess to run a shell cmd, but I strangely find that:

salt 'test' cmd.run 'service zabbix-agent restart;'   \# it works but LC_ALL=C, it use different delimtor etc.
salt 'test' service.restart zabbix-agent  \# it works but LC_ALL unset

How to set os env var in salt cmd.run?
help~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    Corerelates to code central or existential to Saltbugbroken, incorrect, or confusing behaviorpending-discussionThe issue or pull request needs more discussion before it can be closed or mergedstale

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions