ansible role 执行顺序

the dependencies of the 'openshift-master' role.
- docker
- openshif_common
  - os_firewall
  - openshift_facts
  - openshift_repos
  - docker#2
- openshift_cli
  - docker#3
  - openshif_common#2
the executed order is: docker-> os_firewall -> openshift_facts ->  openshift_repos -> docker#2(skip, duplicated with docker) -> openshif_common -> docker#3(skip, duplicated with docker) -> openshif_common#2(skip, duplicated with openshif_common) -> openshift_cli -> openshift_master

By default, roles can also only be added as a dependency once - if another role also lists it as a dependency it will not be run again. This behavior can be overridden by adding allow_duplicates: yes to themeta/main.yml file.

playbool 执行顺序:

pre_task -> roles -> tasks -> post-tasks

原文地址:https://www.cnblogs.com/v394435982/p/5344084.html