📜  Ansible playbook 设置无密码 sudo - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:05.597000             🧑  作者: Mango

代码示例1
---
- hosts: all
  tasks:
    - lineinfile:
        path: /etc/sudoers
        state: present
        regexp: '^%sudo'
        line: '%sudo ALL=(ALL) NOPASSWD: ALL'
        validate: 'visudo -cf %s'