25 lines
614 B
Markdown
25 lines
614 B
Markdown
## What it does
|
|
The docker compose file creates two linux servers (ubuntu and rocky linux) and one controller with ansible installed.
|
|
|
|
## What it's for
|
|
The idea is to test ansible playbooks on temporary setups.
|
|
The servers are configured with the right SSH key and config to allow connection from the controller to the servers.
|
|
|
|
## How to use it
|
|
Write your ansible playbooks then run this command to start the controller
|
|
|
|
```bash
|
|
docker compose run --build --rm controller bash
|
|
```
|
|
|
|
You can now test ansible ad hoc commands
|
|
|
|
```bash
|
|
ansible -m ping all
|
|
```
|
|
|
|
Or run a playbook
|
|
|
|
```bash
|
|
ansible-playbook test.yml
|
|
``` |