【发布时间】:2020-04-08 22:24:41
【问题描述】:
我需要在 Ansible 中以并发模式运行一些角色。
我通过以下方式运行 ansible:
ansible-playbook install_full.yml --tags "10_clean_up,20_pull_images,30_install_postgres_11,40_install_jboss-eap-7.0" --extra-vars "ansible_user=user ansible_password=password"
剧本 install_full.yml 看起来像:
- hosts: localhost
vars_files:
- "vars/build.yml"
roles:
- { role: 10_clean_up, tags: 10_clean_up }
- { role: 20_pull_images, tags: 20_pull_images }
- { role: 30_install_postgres_11, tags: 30_install_postgres_11 }
- { role: 40_install_jboss-eap-7.0, tags: 40_install_jboss-eap-7.0 }
30 和 40 角色可以同时运行(以节省一些时间),是否可以并行运行几个角色,而不是像现在一样 - 按订单列表?
提前感谢!
【问题讨论】:
标签: parallel-processing ansible