ansible: include role in a role?

后端 未结 3 1287
我寻月下人不归
我寻月下人不归 2021-02-01 00:10

Is it possible to reuse a role in a role? I do not mean via defining a dependency in the meta/main.yml file of a role but by including the role in the tasks/mai

3条回答
  •  Happy的楠姐
    2021-02-01 00:47

    Old question BUT for the record: use Ansible 2.2+ and you're good to go with include_role. Exactly for this very purpose... see documentation here.

    Check out import_role as well... see documentation here

提交回复
热议问题