티스토리 뷰

공부

[airflow] jinja2 join

승가비 2024. 2. 4. 18:57
728x90
{{ mylist | map('quote') | join(', ') }}

https://stackoverflow.com/questions/29537684/add-quotes-to-elemens-of-the-list-in-jinja2-ansible

 

Add quotes to elemens of the list in jinja2 (ansible)

I have very simple line in the template: ip={{ip|join(', ')}} And I have list for ip: ip: - 1.1.1.1 - 2.2.2.2 - 3.3.3.3 But application wants IPs with quotes (ip='1.1.1.1', '2.2.2.2'). I ca...

stackoverflow.com

 

728x90
댓글