{% macro badge(status) -%} {{ status_label(status) }} {%- endmacro %} {# for_run=false: a project's defaults — empty = nothing is passed. for_run=true: a run form — empty = the project's default, "0" = explicitly nothing. #} {% macro _secret_empty(for_run, none_label) -%} {% if for_run %} {% else %} {% endif %} {%- endmacro %} {% macro secret_selects(secrets, meta, for_run=false) -%}
{%- endmacro %} {# options and buttons of a playbook run form (project page and playbook page) #} {% macro playbook_run_fields(secrets, meta, disabled=false) -%}
{{ secret_selects(secrets, meta, for_run=true) }}

Каталог дистрибутивов доступен в playbook как {{ '{{ cockpit_distrib_dir }}' }}.

{%- endmacro %} {% macro recap_cells(recap) -%} {% if recap %} {% set ns = namespace(ok=0, ch=0, un=0, fa=0) %} {% for h, r in recap.items() %}{% set ns.ok = ns.ok + r.ok %}{% set ns.ch = ns.ch + r.changed %}{% set ns.un = ns.un + r.unreachable %}{% set ns.fa = ns.fa + r.failed %}{% endfor %} ok {{ ns.ok }} chg {{ ns.ch }} {% if ns.un %}unr {{ ns.un }}{% endif %} {% if ns.fa %}fail {{ ns.fa }}{% endif %} {% endif %} {%- endmacro %}