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
Feature: an action to store a fact/variable/context from the output of a command #272
Comments
Failing that perhaps there's a way to do this in any value? - action: file.link
from: profile.ps1
to: "{{ getEnv('profile') }}" In powershell, Do we have a way to differentiate between |
Thanks for all the issues. Looks like there is a lot of love the windows platform needs. Unfortunately, I don't think any of us on the maintainer ship team main Windows, however, I set up Windows 11 on my secondary disk to work through some of this. Plan to move through this a little bit at a time. For the I have a branch here that hopefully at least addresses some of the issues with the |
I wouldn't assume people are using Additionally, when you run powershell, it dumps to the terminal help text encouraging you to install the latest version of powershell which is then run via So to work with this, it'd be good to leave it up to the user with the following attrs : - action: cmd.run
command: echo
shell: pwsh
args:
- "$env:profile"
stdout:
context: os.user_profile |
Something to note, using
|
I guess this is why ansible (used to? still does?) have a separate action for running a command than for running stuff that can run in a shell. |
Will check this out. We may end up having to do something similar, really hoping to avoid it, but it may be the only reasonable solution. The good news is, we can place this probably behind cfg settings so it doesn't interfere elsewhere. I will also be trying to look more into the internals of shells on windows. |
Why not setting an ENV var with the desired value and hand it over to comtrya? |
Description
Describe the idea / feature request in your own words.
or
🤷🏻
Additional information
Add more context which didn't fit in the fields above.
The text was updated successfully, but these errors were encountered: