mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
Add the start of a graphviz doc to illustrate variable precedence graphically.
This commit is contained in:
parent
7c3dbd3cc6
commit
f247b93212
2 changed files with 42 additions and 0 deletions
|
@ -10,6 +10,10 @@ docs: clean modules staticmin
|
||||||
-(cp *.jpg htmlout/)
|
-(cp *.jpg htmlout/)
|
||||||
-(cp *.png htmlout/)
|
-(cp *.png htmlout/)
|
||||||
|
|
||||||
|
variables:
|
||||||
|
(mkdir -p htmlout/)
|
||||||
|
dot variables.dot -Tpng -o htmlout/variables.png
|
||||||
|
|
||||||
viewdocs: clean staticmin
|
viewdocs: clean staticmin
|
||||||
./build-site.py view
|
./build-site.py view
|
||||||
|
|
||||||
|
|
38
docsite/variables.dot
Normal file
38
docsite/variables.dot
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
digraph G {
|
||||||
|
|
||||||
|
subgraph cluster_0 {
|
||||||
|
"command line variables" -> "--extra-args"
|
||||||
|
}
|
||||||
|
|
||||||
|
subgraph cluster_1 {
|
||||||
|
"role variables" -> "roles/rolename/vars.yml" -> "parameters passed to role" -> "parameters from dependent roles"
|
||||||
|
}
|
||||||
|
|
||||||
|
subgraph cluster_2 {
|
||||||
|
"top-level playbook variables" -> "vars: directives" -> "vars_files: directives";
|
||||||
|
}
|
||||||
|
|
||||||
|
subgraph cluster_3 {
|
||||||
|
"inventory variables" -> "group_vars/all" -> "group_vars/grandparent1" -> "group_vars/parent1" -> "host_vars/myhostname";
|
||||||
|
"group_vars/all" -> "group_vars/grandparent2";
|
||||||
|
"group_vars/grandparent1" -> "group_vars/parent2"
|
||||||
|
"group_vars/grandparent2" -> "host_vars/myhostname";
|
||||||
|
"group_vars/parent2" -> "host_vars/myhostname"
|
||||||
|
}
|
||||||
|
|
||||||
|
subgraph cluster_4 {
|
||||||
|
"facts" -> "gathered host facts"
|
||||||
|
"facts" -> "host facts from /etc/ansible/facts.d"
|
||||||
|
"facts" -> "set_fact"
|
||||||
|
"facts" -> "include_vars"
|
||||||
|
}
|
||||||
|
|
||||||
|
subgraph cluster_5 {
|
||||||
|
"role defaults" -> "roles/rolename/defaults.yml"
|
||||||
|
}
|
||||||
|
|
||||||
|
"command line variables" -> "role variables" -> "top-level playbook variables" -> "inventory variables" -> "role defaults" -> "facts"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue