Ansible Playbook 简单示例

给远程机器添加用户

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

  



上一篇:拓端tecdat|R语言高维数据惩罚回归方法:主成分回归PCR、岭回归、lasso、弹性网络elastic net分析基因数据


下一篇:filebeat安装和启动