Skip to content

Commit 8a9d221

Browse files
committed
docs: add usage example
1 parent 426dc30 commit 8a9d221

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

README.md

+21-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,27 @@ This project builds a docker image with all of the dependencies required to run
66

77
### Users
88

9-
- `ansible` - This image contains a user for use by ansible. This user enables SSH from inside of the container.
9+
| User | Description |
10+
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
11+
| `ansible` | This is the default user, for use by ansible. This user enables SSH from inside of a container, when used with a SSH bind mount (see "Mounts", below). |
1012

1113
### Mounts
1214

13-
- `/app` - The expected mount location for an ansible project
14-
- `/home/ansible/.ssh` - The ansible user's SSH Directory. Private keys can be mounted inside of this directory for use by ansible-playbook during runs.
15+
| Mount | Description |
16+
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
17+
| `/app` | The expected mount path for an ansible project |
18+
| `/home/ansible/.ssh` | The default ansible user's SSH Directory. Private keys can be mounted inside of this directory for use by ansible-playbook during runs. |
19+
20+
## Usage
21+
22+
This image can be used by any ansible project. If SSH is required, be sure to mount the `~/.ssh` so the local user's keys are available.
23+
24+
```shell
25+
docker run \
26+
--rm -it \
27+
--network host \
28+
--mount type=bind,source=".",target=/app \
29+
--mount type=bind,source="${HOME}/.ssh",target=/home/ansible/.ssh,readonly \
30+
ghcr.io/gamersoutreach/ansible-runner:latest \
31+
ansible-playbook -e "ansible_ssh_user=${USER}" -i inventory.yml site.yml
32+
```

renovate.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["config:recommended"]
4+
}

0 commit comments

Comments
 (0)