forked from metal3-io/metal3-dev-env
-
Notifications
You must be signed in to change notification settings - Fork 5
/
ansible.cfg
33 lines (31 loc) · 1.22 KB
/
ansible.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[defaults]
callbacks_enabled=ansible.posix.profile_tasks
stdout_callback=community.general.diy
show_task_path_on_failure=true
[callback_profile_tasks]
task_output_limit = 3
[callback_diy]
; Note that the action can be both k8s_info and community.kubernetes.k8s_info
runner_retry_msg='{% if ansible_callback_diy.result.output.attempts == 1 %}
FAILED retry: {{ 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 %}
{% else %}
{% if ansible_callback_diy.result.output | to_nice_yaml | length > 5000 %}
{{ ansible_callback_diy.result.output }}
{% else %}
{{ ansible_callback_diy.result.output | to_nice_yaml(indent=2) }}
{% endif %}
{% endif %}
{% endif %}
RETRYING: {{ ansible_callback_diy.task.name }} {{ ansible_callback_diy.result.output.attempts }}/{{ ansible_callback_diy.task.retries }}'