如何运行Ansible命令>>>>> ansible myhost --sudo -m raw -a“ yum install -y python2”

时间:2018-08-06 07:17:04

标签: linux ansible ubuntu-16.04

我正在使用Ansible 2.6版本,此版本无法运行以上命令。有谁知道ansible在运行命令sudo时的替代方法。 给我错误

[DEPRECATION WARNING]: The sudo command line option has been deprecated in favor of the "become" command line arguments. This feature will be 
removed in version 2.6. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
192.168.0.76 | FAILED | rc=1 >>
sudo: a password is required
Shared connection to 192.168.0.76 closed.
non-zero return code

谢谢。

0 个答案:

没有答案