我想弄清楚如何創建一個Ansible列表,它是將listB中的每個字符串附加到listA中的每個字符串上的結果,它將兩個字符串列表有效地相乘。 在Python中我應該這樣做: ["-".join((x, y)) for x in listA for y in listB]
在其他語言中我倒是窩內另一個for循環。 我不能在Ansible中找到類似的東西。 我這樣做的理由是允許一個角色自動確定一
我必須刪除某個目錄並在複製到遠程之前在本地創建它們。無論如何刪除和創建本地? 目前我使用「命令」 command: rm -r directory
但警告顯示爲 Consider using file module with state=absent rather than running rm
有沒有我們可以使用本地文件夾改變任何選項?