Skip to content

Commit 2c48381

Browse files
committed
๐Ÿ“ƒ Add readme example
1 parent 260a554 commit 2c48381

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

โ€ŽREADME.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,31 @@
66

77
## Documentation
88

9-
TBD
9+
The image includes a default inventory *(`/etc/ansible/hosts`)* named `controller` that
10+
runs on `localhost` without root privileges.
11+
12+
To use it, copy the following example playbook:
13+
14+
```yaml
15+
- name: Run something
16+
gather_facts: false
17+
hosts: controller
18+
19+
tasks:
20+
- name: Just saying hello
21+
ansible.builtin.debug:
22+
msg: Hello world! ๐Ÿ‘‹
23+
```
24+
25+
### Run
26+
27+
```sh
28+
docker run --rm \
29+
-v ./playbooks:/workspace \
30+
ghcr.io/kloudkit/ansible-controller \
31+
-e FOO=bar \
32+
/workspace/play.yaml
33+
```
1034

1135
## License
1236

โ€Žsrc/rootfs/etc/ansible/hosts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
workspace:
2+
controller:
33
hosts:
44
localhost:
55
vars:
66
ansible_connection: local
7-
ansible_become: true
7+
ansible_become: false

0 commit comments

Comments
ย (0)