浅谈 ansible inventory 的那些坑

一号坑:-i参数只能定义一次。

开始话题之前,先看一个调用案例:

有playbook如下:

# deploy.yml

- : '{{host_svr}}'
  max_fail_percentage: 30
  serial: "30%"
  remote_user: common
  become: true
  roles:
    - dubbosvr

- : '{{host_web}}'
  max_fail_percentage: 30
  serial: "30%"
  remote_user: common
  become: true
  roles:
    - websvr

Continue reading “浅谈 ansible inventory 的那些坑”

浅谈 ansible inventory 的那些坑