dummy_state:
cmd.run:
- name: echo nothing
If I run the state, the output will look something like this:
salt 'minion_id' state.sls dummy
minion_id:
----------
ID: dummy_state
Function: cmd.run
Name: echo nothing
Result: True
Comment: Command "echo nothing" run
Changes:
----------
pid:
28198
retcode:
0
stderr:
stdout:
nothing
Summary
------------
Succeeded: 1
Failed: 0
------------
Total: 1
Note the Salt-generated `Comment` key in the output. It definitively
clarifies what's going on, but it is not controlled by user (author of SLS).
It doesn't solve any technical issue, but it would be nice to have a
possibility to add some description (i.e. `desc` key) which will become
part of resulted output. For example:
dummy_state:
cmd.run:
- desc: run dummy command without side effect
- name: echo nothing
The output of such state could be like this:
salt 'minion_id' state.sls dummy
minion_id:
----------
ID: dummy_state
Function: cmd.run
Name: echo nothing
Result: True
Description: run dummy command without side effect
Comment: Command "echo nothing" run
Changes:
----------
pid:
28198
retcode:
0
stderr:
stdout:
nothing
Summary
------------
Succeeded: 1
Failed: 0
------------
Total: 1
Simple need and simple implementation.
There is always a way to look up state id in the SLS files and figure out
what's going on.
However, this simple feature makes reports save-able and read-able for
documenting/auditing point of view.
For example, to provide hints about tests run through Salt (i.e. in CI
platform), or appendix for some formal documents about site deployments
between vendor and customer, etc.
Any comments before I submit a feature request?
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.