what does >- mean ?

31 views
Skip to first unread message

Bruce Auyeung

unread,
Apr 23, 2017, 8:12:35 PM4/23/17
to Ansible Project
there are some tasks like this in kargo project

- name: Register docker images info
  raw: >-
    {{ docker_bin_dir }}/docker images -q | xargs {{ docker_bin_dir }}/docker inspect -f "{{ '{{' }} .RepoTags {{ '}}' }},{{ '{{' }} .RepoDigests {{ '}}' }}"
  no_log: true
  register: docker_images_raw
  failed_when: false
  check_mode: no
  when: not download_always_pull|bool


there is a
>-

after
raw:

i have no idea what does it mean
i know  
>

in yaml can let user write a real single line to multiple lines.

Mikhail Koshelev

unread,
Apr 23, 2017, 11:53:39 PM4/23/17
to Ansible Project
'>-' is the same as '>' but it omits the final newline.  I.e. the last char of the corresponding block of text will be the actual last char of the last line, and not  '\n' as in case of '>'.
Reply all
Reply to author
Forward
0 new messages