diff options
author | Milo Casagrande <milo@ubuntu.com> | 2014-03-24 14:31:44 +0100 |
---|---|---|
committer | Milo Casagrande <milo@ubuntu.com> | 2014-03-24 14:31:44 +0100 |
commit | bf6fe1afef6ddaca27fac8974ffaa8432a49d8fa (patch) | |
tree | 9137d85cc74a7b0e575d4956c7a4effdf3ff4982 /ansible | |
parent | fa2757047bd4fbce56265b2927f9a87d3d64281a (diff) |
Initial (non-working) ansible playbook.
Diffstat (limited to 'ansible')
-rw-r--r-- | ansible/group_vars/all | 2 | ||||
-rw-r--r-- | ansible/hosts | 1 | ||||
-rw-r--r-- | ansible/roles/install-deps-os/tasks/main.yml | 19 | ||||
-rw-r--r-- | ansible/roles/install-mongo/tasks/main.yml | 21 | ||||
-rw-r--r-- | ansible/site.yml | 8 |
5 files changed, 51 insertions, 0 deletions
diff --git a/ansible/group_vars/all b/ansible/group_vars/all new file mode 100644 index 0000000..4035a1d --- /dev/null +++ b/ansible/group_vars/all @@ -0,0 +1,2 @@ +checkout_dir: /home/ubuntu +install_base: /srv diff --git a/ansible/hosts b/ansible/hosts new file mode 100644 index 0000000..a4a29bb --- /dev/null +++ b/ansible/hosts @@ -0,0 +1 @@ +[all] diff --git a/ansible/roles/install-deps-os/tasks/main.yml b/ansible/roles/install-deps-os/tasks/main.yml new file mode 100644 index 0000000..d6141be --- /dev/null +++ b/ansible/roles/install-deps-os/tasks/main.yml @@ -0,0 +1,19 @@ +--- +- name: Install OS dependencies + apt: name={{ item }} + state=latest + with_items: + - build-essential + - python2.7-dev + - python-pip + - python-simplejson + tags: + - install + +- name: Install OS depencencies to run tests + apt: name={{ item }} + state=latest + with_items: + - python-mock + tags: + - tests diff --git a/ansible/roles/install-mongo/tasks/main.yml b/ansible/roles/install-mongo/tasks/main.yml new file mode 100644 index 0000000..49dac52 --- /dev/null +++ b/ansible/roles/install-mongo/tasks/main.yml @@ -0,0 +1,21 @@ +--- +# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 + +- name: Add MongoDB apt key + apt_key: id=7F0CEB10 + url=hkp://keyserver.ubuntu.com:80 + tags: + - install + +- name: Add MongoDB repository + apt_repository: repo='deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' + state=present + update_cache=yes + tags: + - install + +- name: Install MongoDB + apt: name=mongodb-10gen + state=latest + tags: + - install
\ No newline at end of file diff --git a/ansible/site.yml b/ansible/site.yml new file mode 100644 index 0000000..abfc31b --- /dev/null +++ b/ansible/site.yml @@ -0,0 +1,8 @@ +--- +- hosts: all + sudo: yes + gather_facts: no + roles: + - install-deps-os + - install-mongo +
\ No newline at end of file |