0
下面的代碼運行正常,直到它的錯誤出在本地保存任務Ansible跳繩任務,因爲未定義的錯誤
- local_action: file dest=firewallinfo.txt state=touch
- name: "Gather firewall information"
script: firewall.sh
register: output
- debug: var=output
- name: Firewall Name
raw: hostname
register: output2
- debug: var=output2
- name: the file
raw: cat "{{item}}".csv
with_items: '{{output2.stdout_lines}}'
register: output3
- debug: var=output3
這是我的代碼停止工作。有人知道爲什麼
- name: save locally
local_action: lineinfile dest=firewallinfo.txt line="{{item}}"
with_items: '{{output3.stdout_lines}}'
你會得到任何輸出嗎? – Railslide
我得到的調試 - 調試:var = output3工作,但當我嘗試採取output3的stdout_lines並把它放入一個文件,它給了我這個錯誤[拒絕警告]:由於未定義的錯誤跳過任務,在未來這將是一個致命錯誤。此功能將在未來版本中刪除。可以通過在ansible.cfg中設置 deprecation_warnings = False來禁用棄用警告。 – ehuck