diff --git a/README.md b/README.md index aa273bfb..64c5ecae 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,7 @@ An alternative method of access exists on MacOS and Linux, if using `--no-autoex * [Utility scripts](docs/utility_scripts/index.md) * [Volume usage examples](docs/volume-examples.md) * [WebUI Hosted Mode](docs/webui.md) +* [Ansible dynamic inventory with aerolab](usage/basic/ansible.md) ## Changelog diff --git a/docs/README.md b/docs/README.md index bd02ad11..be802234 100644 --- a/docs/README.md +++ b/docs/README.md @@ -38,3 +38,4 @@ * [Utility scripts](utility_scripts/index.md) * [Volume usage examples](volume-examples.md) * [WebUI Hosted Mode](webui.md) +* [Ansible dynamic inventory with aerolab](usage/basic/ansible.md) \ No newline at end of file diff --git a/docs/usage/basic/ansible.md b/docs/usage/basic/ansible.md new file mode 100644 index 00000000..63a0170c --- /dev/null +++ b/docs/usage/basic/ansible.md @@ -0,0 +1,19 @@ +# Exporting Inventory to Ansible + +AeroLab supports exporting the cluster/client/agi inventory into ansible. To see the inventory in ansible format, simply run `aerolab inventory ansible`. + +## Recommended method: Dynamic inventory + +Running `aerolab showcommands` will install a command called `aerolab-ansible`. Ansible can then be used with dynamic inventory as so: + +```bash +ansible-playbook -i aerolab-ansible playbook.yaml +``` + +## Dynamic inventory without installation + +Alternatively, to avoid installing the command, run `ln -s ./aerolab ./aerolab-ansible` and then use `ansible-playbook -i ./aerolab-ansible playbook.yaml` + +## Footnote + +The concept and implementation are explained [on the ansible website](https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html#developing-inventory-scripts).