Ansible - 1.9.3
使用动态库存。
引导 EC2 实例并使用 add-host 将实例添加到主机,但它会跳过新创建的主机的播放。但是下次运行play时,它找到了主机并开始执行。
这是片段,
hosts: localhost
tasks:
- name: something
ec2: this module will create instances
- name: adding hosts
add host: name=(name of the new instance)
hosts: new host
tasks:
- something
以上只是一个例子。这是场景。