1分钟
command_warnings
New in version 1.8.
从Ansible 1.8 开始,当shell和命令行模块被默认模块简化的时,Ansible 将默认发出警告. 这个包含提醒使用’git’但不是通过命令行执行.使用模块调用比冒然使用命令行调用可以使playbook工作更具有一致性也更加可靠同时也更加便于维护:
command_warnings = False我们可以通过在命令行末尾添加 warn=yes 或者 warn=no选项来控制是否开启警告提示:
- name: usage of git that could be replaced with the git module
shell: git update foo warn=yes
学员评价