Ansible stdout Formatting

后端 未结 4 2145
终归单人心
终归单人心 2021-02-14 01:03

Assuming the below tasks:

shell: \"some_script.sh\" register: \"some_script_result\"

debug: msg: \"Output: {{ some_script_result.stdout_li

4条回答
  •  梦如初夏
    2021-02-14 02:01

    Here is bug report about an issue:

    https://github.com/ansible/ansible/issues/27078 - why is ansible's default output not more human readable... stilll?

    The possible answers:

    [defaults]
    nocows = True
    # minimal, debug, yaml
    stdout_callback = yaml
    

    or:

    ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook ....
    

提交回复
热议问题