基础问题建议自己多动手哈。百度一个资料供参考:https://serverfault.com/questions/1007835/bash-ansible...
[rack6-RR5-sandbox]# pip3 install ansible WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with ...
tasks: - name: Non-root task running a quick node.js script shell: "yarn my-script" args: executable: /bin/bash chdir: "target-dir" become: yes become_user: "my-non-root-user" - name: This task needs ROOT access that's why playbook is invoked with root user shell: "my-executable...