You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/declarative.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -308,13 +308,13 @@ Group vars can be set to literal value or to Jinja2 value generators, that will
308
308
- **context_vars** see below
309
309
- **nodes**, list of nodes in the ansible_group to which the group_vars belong
310
310
311
-
Additionally it is possible to set variables for all groups/all hosts, by setting vars for the pre-defined `all_groups:children` group of groups:
311
+
Additionally it is possible to set variables for all groups/all hosts, by setting vars for the pre-defined `all` group of groups:
312
312
313
313
```yaml
314
314
kubernetes:
315
315
...
316
316
ansible_group_vars:
317
-
all_groups:children:
317
+
all:
318
318
var1: ...
319
319
...
320
320
```
@@ -397,7 +397,7 @@ Context vars can be set to literal value or to Jinja2 value generators, that wil
397
397
398
398
> Context_vars generator are always executed before group_vars and host_vars generators; the resulting context, is given in input to group_vars and host_vars generators.
399
399
400
-
> In addition to context vars for groups, it is possible to create context_vars for all groups/all hosts, by setting vars for the pre-defined `all_groups:children` group of groups; in this case, intuitively, the list of nodes whitin the context contains all the nodes.
400
+
> In addition to context vars for groups, it is possible to create context_vars for all groups/all hosts, by setting vars for the pre-defined `all` group of groups; in this case, intuitively, the list of nodes whitin the context contains all the nodes.
401
401
402
402
Then, you can use the above context var when generating group_vars for host vars.
403
403
@@ -414,13 +414,13 @@ kubernetes:
414
414
- kb8-minions
415
415
416
416
ansible_context_vars:
417
-
all_groups:children:
417
+
all:
418
418
var0: "{{ nodes | count }}"
419
419
kb8-master:
420
420
var1: "{{ nodes | count }}"
421
421
422
422
ansible_group_vars:
423
-
all_groups:children:
423
+
all:
424
424
var0_from_context: "{{ context['var0'] }}"
425
425
kb8-master:
426
426
var1_from_context: "{{ context['var1'] }}"
@@ -430,9 +430,7 @@ kubernetes:
430
430
431
431
A useful ansible inventory feature is [group of groups](http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups).
432
432
433
-
By default vagrant-compose will generate a group named `[all_groups:children]` with all the ansible_groups defined in cluster configuration; however:
434
-
- you cannot rename all_groups
435
-
- you cannot exclude any ansible group from all_groups.
433
+
By default ansible has a group named `[all]` with all nodes in the cluster.
436
434
437
435
If you need higher control on groups of groups you can simply add a new item to the variable `config.cluster.ansible_groups` before creating nodes.
> Context_vars generator are always executed before group_vars and host_vars generators; the resulting context, is given in input to group_vars and host_vars generators.
393
393
394
-
> In addition to context vars for groups, it is possible to create context_vars for all groups/all hosts, by setting vars for the pre-defined `all_groups:children` group of groups; in this case, intuitively, the list of nodes whitin the context contains all the nodes.
394
+
> In addition to context vars for groups, it is possible to create context_vars for all groups/all hosts, by setting vars for the pre-defined `all` group of groups; in this case, intuitively, the list of nodes whitin the context contains all the nodes.
395
395
396
396
Then, you can use the above context var when generating group_vars for nodes in the `consul-agent` group.
397
397
@@ -411,9 +411,7 @@ end
411
411
### Group of groups
412
412
A useful ansible inventory feature is [group of groups](http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups).
413
413
414
-
By default vagrant-compose will generate a group named `[all_groups:children]` with all the ansible_groups defined in cluster configuration; however:
415
-
- you cannot rename all_groups
416
-
- you cannot exclude any ansible group from all_groups.
414
+
By default ansible has a group named `[all]` with all the nodes defined in cluster configuration.
417
415
418
416
If you need higher control on groups of groups you can simply add a new item to the variable `config.cluster.ansible_groups` before creating nodes.
0 commit comments