Skip to content

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

@anthosz

Description

@anthosz

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,

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