From a0ca07c3ab8472ed43f5cfdeb85893acc63c34ab Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Fri, 14 Jul 2017 23:05:30 +0200 Subject: [PATCH] initial commit --- tasks/config.yml | 6 ++++++ tasks/install.yml | 14 ++++++++++++++ tasks/main.yml | 3 +++ 3 files changed, 23 insertions(+) create mode 100644 tasks/config.yml create mode 100644 tasks/install.yml create mode 100644 tasks/main.yml diff --git a/tasks/config.yml b/tasks/config.yml new file mode 100644 index 0000000..dd330e3 --- /dev/null +++ b/tasks/config.yml @@ -0,0 +1,6 @@ +--- +- name: enable mongodb service + service: + name: mongod + enabled: yes + state: started diff --git a/tasks/install.yml b/tasks/install.yml new file mode 100644 index 0000000..8f1e659 --- /dev/null +++ b/tasks/install.yml @@ -0,0 +1,14 @@ +--- +- name: add mongodb repo + yum-repository: + name: mongodb-org-3.4 + description: MongoDB Repository + baseurl: https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/ + gpgcheck: yes + enabled: yes + gpgkey: https://www.mongodb.org/static/pgp/server-3.4.asc + +- name: install mongodb package + package: + name: 'mongodb-org' + state: latest diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..8570db6 --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,3 @@ +--- +- include: install.yml +- include: config.yml