--- - hosts: host become: yes tasks: - name: 判断用户是否存在 shell: "grep llldb /etc/passwd" register: result failed_when: " 'llldb' in result.stdout" - debug: var: result.stdout
参考文档:https://blog.csdn.net/qq_36417677/article/details/105342211
--- - hosts: host become: yes tasks: - name: 判断用户是否存在 shell: "grep llldb /etc/passwd" register: result failed_when: " 'llldb' in result.stdout" - debug: var: result.stdout
参考文档:https://blog.csdn.net/qq_36417677/article/details/105342211