我想運行一個命令:外殼模塊:<與ansible
- name: install pip
shell: "python <(curl https://bootstrap.pypa.io/get-pip.py)"
但實現一個錯誤
failed: [default] => {"changed": true, "cmd": "python <(curl https://bootstrap.pypa.io/get-pip.py)", "delta": "0:00:00.002073", "end": "2014-12-03 15:52:01.780837", "rc": 2, "start": "2014-12-03 15:52:01.778764", "warnings": []}
stderr: /bin/sh: 1: Syntax error: "(" unexpected
我試圖改變它的東西,如:
python <$(curl https://bootstrap.pypa.io/get-pip.py)
但它不起作用。有什麼想法嗎?
注:約在外殼模塊使用<
運營商,這個問題我知道,最好使用apt
用於安裝的東西
'shell'幾乎可以肯定使用'/ bin/sh'運行命令。 '/ bin/sh'不支持進程替換。取而代之的是使用'bash',或者你可以嘗試用curl輸出到python。 – 2014-12-03 16:04:56