-1
我試圖尋找「命令」和「殼」 ansible模塊,但一直沒能成功地使用它。如何使用輸入參數作爲變量Ansible劇本
我使用的腳本是未定製的,並且必須使用變量「RESPONSE_FILE =」作爲標準輸入。
我的代碼是:
- host: all
gather_facts: no
tasks:
- name: Run Config Tool
environment:
response_file: /opt/config/cfg.properties
shell: /apps/opt/configtool {{ response_file }}
如果你的腳本需要'RESPONSE_FILE'(大寫)你爲什麼要設置'response_file'(小寫)?你的腳本是尋找一個環境變量,還是一個命令行參數,或者......? – larsks
我試過upper/lower_cases,沒有工作。是的,它尋找一個VAR = –