From a0b1ade755ead73b8cd33a226a8f2b8c8ec50288 Mon Sep 17 00:00:00 2001 From: troymc Date: Fri, 26 Aug 2016 14:28:19 +0200 Subject: [PATCH] initial tasks to install RethinkDB --- ntools/one-m/ansible/one-m-node.yml | 1 + .../roles/install_rethinkdb/tasks/main.yml | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 ntools/one-m/ansible/roles/install_rethinkdb/tasks/main.yml diff --git a/ntools/one-m/ansible/one-m-node.yml b/ntools/one-m/ansible/one-m-node.yml index 2c1ddb34..0df6dbe2 100644 --- a/ntools/one-m/ansible/one-m-node.yml +++ b/ntools/one-m/ansible/one-m-node.yml @@ -9,3 +9,4 @@ - bcdb_base - ntp - db_storage + - install_rethinkdb diff --git a/ntools/one-m/ansible/roles/install_rethinkdb/tasks/main.yml b/ntools/one-m/ansible/roles/install_rethinkdb/tasks/main.yml new file mode 100644 index 00000000..fe6063fb --- /dev/null +++ b/ntools/one-m/ansible/roles/install_rethinkdb/tasks/main.yml @@ -0,0 +1,22 @@ +--- +# ansible/roles/install_rethinkdb/tasks/main.yml + +# Note: the .list extension will be added to the rethinkdb filename automatically +- name: Ensure RethinkDB's APT repository for Ubuntu trusty is present in /etc/apt/sources.list.d/rethinkdb.list + apt_repository: + repo='deb http://download.rethinkdb.com/apt trusty main' + filename=rethinkdb + state=present + become: true + +- name: Ensure RethinkDB's public GPG key is in the set of APT keys + apt_key: url=http://download.rethinkdb.com/apt/pubkey.gpg state=present + become: true + +- name: Ensure the latest rethinkdb Ubuntu package is installed + apt: name=rethinkdb state=latest update_cache=yes + become: true + +- name: Ensure the /data directory's owner and group are both 'rethinkdb' + file: path=/data state=directory owner=rethinkdb group=rethinkdb + become: true