Skip to content

Commit

Permalink
Added Ansible playbook for testing and docs on how to run it.
Browse files Browse the repository at this point in the history
  • Loading branch information
russjones committed Mar 30, 2017
1 parent 835a754 commit e9b1754
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@ To setup Ansible:
"ping": "pong"
}
```

1. Run an simple playbook:

```bash
# cd to directory that contains playbook
cd /root/go/src/github.com/gravitational/teleport/docker/ansible
# run playbook
ansible-playbook playbook.yaml
```

### Interactive Usage

Expand Down
26 changes: 26 additions & 0 deletions docker/ansible/playbook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
- hosts: all
tasks:
- name: "simple copy"
copy:
src: /root/go/src/github.com/gravitational/teleport/docker/ansible/simple.txt
dest: /tmp/simple.txt.out
owner: root
group: root
mode: 0644

- name: recursive copy
copy:
src: /root/go/src/github.com/gravitational/teleport/docker/ansible/rdir
dest: /tmp"
owner: root
group: root
mode: 0644

- name: simple template
template:
src: /root/go/src/github.com/gravitational/teleport/docker/ansible/template.j2
dest: /tmp/template.out
owner: root
group: root
mode: 0644
1 change: 1 addition & 0 deletions docker/ansible/rdir/rdir/rdir
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rdir
1 change: 1 addition & 0 deletions docker/ansible/simple.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello, world
2 changes: 2 additions & 0 deletions docker/ansible/template.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
template_host: {{ template_host }}
template_uid: {{ template_uid }}

0 comments on commit e9b1754

Please sign in to comment.