Improved ways to get raw output from the shell.
See original GitHub issueIs your feature request related to a problem? Please describe
So I’m often needing ways to branch python code based on actual raw output from a shell command (Use case: in-depth system audits).
host.fact.command()
does this fairly well, but it lacks any ability to switch users or permissions on the fly. Operations have plenty of ways to do this using parameters such as sudo=
use_sudo_password=
su_user=
… etc.
Describe the solution you’d like
One or more of the following would be ideal.
- Give
host.fact.command()
some form of equivalent to the user switching parameters enjoyed by Operations. - Allow us to get raw output from the
server.shell()
Operation.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How can I get the raw formatting output of commands?
Use script /tmp/output to start recording in a new shell, then type your commands and look in the /tmp/output file, e.g. with an...
Read more >How to Upgrade a Dumb Shell to a Fully Interactive ... - Null Byte
Step 2Spawn a Bash Shell ... One of the easiest and most reliable ways to upgrade a dumb shell to a fully interactive...
Read more >shell script: convert raw output (from dict lines into csv) [closed]
Can anyone help me to convert below raw output to csv or a key value pair . i have tried awk , sed...
Read more >Upgrading Simple Shells to Fully Interactive TTYs - ropnop blog
Generating reverse shell commands. Everyone is pretty familiar with the traditional way of using netcat to get a reverse shell: ...
Read more >Improving shell workflows with fzf - Sebastian Jambor's blog
One way to improve shell workflows is finding patterns in the execution order of commands and extracting those into little scripts; this can ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Update on this: have implemented the change in https://github.com/Fizzadar/pyinfra/pull/516/commits/bc9d1182c8a76eb4171c4fb1ba5509e2ed2d1b66; need to add some tests and then should be good to go for
1.4
release shortly!I think this is an absolute must-have; I’m going to implement this alongside the new explicit fact imports functionality, so can do:
Will have the neat side effect of allowing operations to customise fact global arguments they use (by default facts called by an operation inherit the operation args).