见 https://stackoverflow.com/questions/47244834/how-to-join-a-list-of-strings-in-ansible
使用函数
# 使用 '\n' 将 my_list 中的元素连接为字符串
- name: Concatenate the public keys
set_fact:
my_joined_list: "{{ my_list | join('\n') }}"
见 https://stackoverflow.com/questions/47244834/how-to-join-a-list-of-strings-in-ansible
使用函数
# 使用 '\n' 将 my_list 中的元素连接为字符串
- name: Concatenate the public keys
set_fact:
my_joined_list: "{{ my_list | join('\n') }}"