0

When you have deep nested output data in salt, you will sometimes see that some levels get compacted, like the example below. And this compact format with the pipe delimiter is already in the output datastructures before they hit the outputter. My questions would be

  1. Does anyone know if this behavior or format has a name to it?
  2. And is there a way - I tried (nearly) everything :) - to say I want this, want this always, want this never?

Currently it seems to happen when the nesting reaches a certain level. So you cannot be sure how your output is generated. I want to implement a better analysis for our activities and would love to be it the same way - always. Where I dont care if it is condensed or full. Just constantly the same.

Example:

core.roles:
    ----------
    server.has.name:
        ----------
        grains_|-roles_|-roles_|-present:
            ----------
            __run_num__:
                0
            result:
                None

instead of writing the full yaml:

core.roles:
    ----------
    server.has.name:
        ----------
        grains:
            ----------
            roles:
                ----------
                roles:
                    ----------
                    present:
                        ----------
                        __run_num__:
                            0
                        result:
                            None
0

Salt supports a lot of different output modules - you should use a format like JSON in your case. On top there is a job cache, which you might want to investigate, too.

  • Ehm, yes, said so - 'is already in the output datastructures before they hit the outputter' Whatever output module you choose - its already burned into the data that is beeing send to the outputter. Tried them all. Would not ask if it worked :)) More ideas? – user378016 Sep 30 '16 at 6:29
  • sry, read the question to inattentive... – dahrens Sep 30 '16 at 6:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.