创建 yml 文件:
vim play.yml
---
- name: ansible playbook
hosts: all
remote_user: root
become: yes
tasks:
- name: "测试连接"
ping:
执行:
ansible-playbook play.yml -v
创建 yml 文件:
vim play.yml
---
- name: ansible playbook
hosts: all
remote_user: root
become: yes
tasks:
- name: "测试连接"
ping:
执行:
ansible-playbook play.yml -v