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