Skip to content
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

Unable to use --state-output=mixed --state-verbose=false with pepper #217

Open
anthosz opened this issue Mar 15, 2021 · 2 comments
Open

Comments

@anthosz
Copy link

anthosz commented Mar 15, 2021

Hi,

I have a custom state with a big number of minion in targets.

My goal is that I try to extract only the states changed to avoid a big output (so to summarize equivalent to --state-output=mixed --state-verbose=false with salt).

After checks, I found: #3 and especially https://gist.github.com/bbinet/d87bf2571652e4dec68df6b280b2af9d done by @bbinet but nothing works:

## Tried with several client also like local_async, sync, etc.. (but outputer need to be json)
$ pepper --fail-any-none --non-interactive -o json "*" state.sls custom | pepper_format
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 137 column 1 (char 6871)
## Extracting only one entry (issue related to the fact it's own json by minion
$ pepper --fail-any-none --non-interactive -o json "minion1" state.sls custom | pepper_format
    ret = json.load(sys.stdin)['return'][0]
KeyError: 'return'

Do you have an idea how to fix it or if it's planned to be implemented in pepper directly?

Best regards,

@ahktenzero
Copy link

I opened a PR to add support for those output options a while back: #209.

@anthosz
Copy link
Author

anthosz commented Apr 2, 2021

@ahktenzero thx, I will test it and patch it directly with the diff of your PR! (this project seems not very active..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants