我想运行一个命令:外壳模块:<与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