给远程机器添加用户

Ansbile命令:

# ansible elk06 -m user -a "name=elastic uid=4000 state=present"

PlayBook(YAML):

# ansible-playbook user.yml
# cat user.yml
---
- name: Configure important user consistently
hosts: elk06
tasks:
- name: elastic exists with UID 5000
user:
name: elastic
uid: 4000
state: present

  



相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2022-12-23
  • 2021-09-20
  • 2022-02-25
  • 2021-06-23
  • 2021-06-21
猜你喜欢
  • 2021-06-25
  • 2021-06-10
  • 2021-10-15
  • 2021-09-13
  • 2022-02-27
  • 2021-07-14
  • 2022-02-12
相关资源
相似解决方案