-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reducs Ansible verbosity and use DIY callback
The DIY callback plugin is configured to print only the status of k8s resources instead of everything (but otherwise work as before). Ansible verbosity is turned down to default.
- Loading branch information
Showing
6 changed files
with
54 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[defaults] | ||
stdout_callback=community.general.diy | ||
|
||
[callback_diy] | ||
; Note that the action can be both k8s_info and community.kubernetes.k8s_info | ||
runner_retry_msg=' | ||
FAILED: {{ ansible_callback_diy.task.name }} | ||
{% if ansible_callback_diy.task.action is search("k8s_info") %} | ||
{% for r in ansible_callback_diy.result.output.resources %} | ||
kind: {{ r.kind }} | ||
name: {{ r.metadata.name }} | ||
{% if r.kind == "BareMetalHost" %} | ||
status.provisioning: | ||
{{ r.status.provisioning | to_nice_yaml | indent(2, first=True) }} | ||
{% else %} | ||
status: | ||
{{ r.status | to_nice_yaml | indent(2, first=True) }} | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
RETRYING: {{ ansible_callback_diy.task.name }} {{ ansible_callback_diy.result.output.attempts }}/{{ ansible_callback_diy.task.retries }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters