Skip to content

Commit

Permalink
docs: add usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
wastrachan committed Jan 30, 2024
1 parent 426dc30 commit 8a9d221
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,27 @@ This project builds a docker image with all of the dependencies required to run

### Users

- `ansible` - This image contains a user for use by ansible. This user enables SSH from inside of the container.
| User | Description |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `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). |

### Mounts

- `/app` - The expected mount location for an ansible project
- `/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.
| Mount | Description |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `/app` | The expected mount path for an ansible project |
| `/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. |

## Usage

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.

```shell
docker run \
--rm -it \
--network host \
--mount type=bind,source=".",target=/app \
--mount type=bind,source="${HOME}/.ssh",target=/home/ansible/.ssh,readonly \
ghcr.io/gamersoutreach/ansible-runner:latest \
ansible-playbook -e "ansible_ssh_user=${USER}" -i inventory.yml site.yml
```
4 changes: 4 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"]
}

0 comments on commit 8a9d221

Please sign in to comment.