Skip to content

Commit 5a00b27

Browse files
author
Rafe Colton
committed
Adding an example to the README
1 parent 5dd10ba commit 5a00b27

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,33 @@ ansible-module-etcd
44
Ansible module for operating on etcd keys
55

66
**TODO:** add tests
7+
8+
Example playbook usage:
9+
10+
```yaml
11+
---
12+
- hosts: '{{ server }}'
13+
tasks:
14+
- name: set value in etcd
15+
etcd:
16+
state: present
17+
host: my-etcd-host.example.com
18+
port: 4001
19+
key: /asdf/foo/bar/baz/gorp
20+
value: my-foo-bar-baz-gor-server.prod.example.com
21+
delegate_to: localhost
22+
connection: local
23+
sudo: false
24+
25+
- name: get value from etcd
26+
etcd:
27+
state: retrieved
28+
host: my-etcd-host.example.com
29+
port: 4001
30+
key: /asdf/foo/bar/baz/gorp
31+
register: foo
32+
delegate_to: localhost
33+
connection: local
34+
sudo: false
35+
register: result # use result.value
36+
```

0 commit comments

Comments
 (0)