1
一個csv字符串我有這樣Ansible |如何構建從字典
customers:
abc:
id: 1
status: active
def:
id: 2
status: inactive
ghi:
id: 3
status: active
jkl:
id: 4
status: active
字典什麼是構建一個字符串像下面只有活動的客戶的最佳方式?
abc,ghi,jkl
還有一個問題,我怎麼能還追加一個字符串(例如cust_),使輸出看起來像這樣? '''cust_abc,cust_ghi,cust_jkl ''' – GMaster
''在'join'前加'map('regex_replace','^','cust _')' –
太棒了!非常感謝。你爲我節省了幾個小時的工作。 – GMaster