Skip to content

Commit

Permalink
document ansible inventory for linux node kinds and ansible_docker_ho…
Browse files Browse the repository at this point in the history
…st behaviour
  • Loading branch information
Toby Archer committed Feb 21, 2022
1 parent 851371a commit 5dc4791
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/manual/inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ Lab nodes are grouped under their kinds in the inventory so that the users can s
ansible_host: <mgmt-ipv4-address>
```

When a lab node is of `kind: linux`, container additionally generates a `ansible_docker_host` variable for the inventory. This is useful when using the [Ansible Docker connection](https://docs.ansible.com/ansible/latest/collections/community/docker/docker_connection.html) plugin.


=== "ansible docker host inventory file"
``` yaml
all:
children:
linux:
hosts:
clab-ansible-linux-host:
ansible_host: <mgmt-ipv4-address>
ansible_docker_host: clab-ansible-linux-host
```

## User-defined groups
Users can enforce custom grouping of nodes in the inventory by adding the `ansible-inventory` label to the node definition:

Expand Down

0 comments on commit 5dc4791

Please sign in to comment.