【发布时间】:2014-03-10 10:11:52
【问题描述】:
从 1.3 版开始,Ansible 支持角色依赖,以鼓励重用角色定义。为了审计和维护更大的编排,最好有某种方法来轻松生成哪些角色依赖于哪些其他角色的依赖关系图。
一个依赖定义的例子可能是roles/app_node/meta/main.yml:
---
dependencies:
- { role: common, some_parameter: 3 }
- { role: apache, port: 80 }
- { role: postgres_client,
dbname: blarg,
other_parameter: 12 }
roles/postgres_client/meta/main.yml 可能包含类似的东西
---
dependencies:
- { role: postgres_common }
- { role: stunnel,
client: yes,
local_port: 5432
remote_host: db_host
remote_port: 15432
}
当编排中的角色数量增加时,这种嵌套的依赖关系可能会变得难以维护。因此,我想知道是否有人找到了一种简单的方法来生成这种依赖关系的图表,无论是图形方式(点还是整洁?)或只是作为缩进文本图?这样的工具可以帮助降低维护的复杂性。
【问题讨论】:
标签: scalability administration ansible orchestration