Browse Source

mongodb installation

master
parent
commit
0d7c35acfe
2 changed files with 16 additions and 0 deletions
  1. +2
    -0
      defaults/main.yaml
  2. +14
    -0
      tasks/main.yaml

+ 2
- 0
defaults/main.yaml View File

@@ -1 +1,3 @@
---
mongodb_version: '4.2'
mongodb_apt_repo_key_id: E162F504A20CDF15827F718D4B7C549A058F8B6B

+ 14
- 0
tasks/main.yaml View File

@@ -1 +1,15 @@
---
- name: mongodb apt repository key
apt_key:
id: E162F504A20CDF15827F718D4B7C549A058F8B6B
url: https://www.mongodb.org/static/pgp/server-{{mongodb_version}}.asc
keyring: /etc/apt/trusted.gpg.d/mongodb-org-{{mongodb_version}}.gpg

- name: mongodb apt repository
apt_repository:
repo: deb http://repo.mongodb.org/apt/debian {{ansible_distribution_release}}/mongodb-org/{{mongodb_version}} main
filename: mongodb-org-{{mongodb_version}}

- name: mongodb debian package
apt:
pkg: mongodb-org

Loading…
Cancel
Save