diff --git a/README.md b/README.md index 3d2c6a9..8a16e52 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Ansible role which manages [MongoDB](http://www.mongodb.org/). - Configure mongodb users - Configure replication - Provide handlers for restart and reload; -- Setup MMS authomation agent; +- Setup MMS automation agent; MongoDB support matrix: @@ -14,12 +14,12 @@ MongoDB support matrix: | -------------- | :-----------: | :----------------: | :----------------: | :----------------: | :----------------: | | Ubuntu 14.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | | Ubuntu 16.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| Ubuntu 18.04 | :no_entry: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Ubuntu 18.04 | :no_entry: | :x: | :x: | :white_check_mark: | :white_check_mark: | | Debian 8.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | | Debian 9.x | :no_entry: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | RHEL 6.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | RHEL 7.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| Amazon Linux 2 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Amazon Linux 2 | :no_entry: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: | - :white_check_mark: - fully tested, should works fine - :interrobang: - maybe works, not tested @@ -35,9 +35,9 @@ MongoDB support matrix: mongodb_package: mongodb-org # You can control installed version via this param. -# Should be '3.4', '3.6' or '4.0'. This role doesn't support MongoDB < 3.4. +# Should be '3.4', '3.6', '4.0' or '4.2'. This role doesn't support MongoDB < 3.4. # I will recommend you to use latest version of MongoDB. -mongodb_version: "3.6" +mongodb_version: "4.2" mongodb_pymongo_from_pip: true # Install latest PyMongo via PIP or package manager mongodb_pymongo_pip_version: 3.6.1 # Choose PyMong version to install from pip. If not set use latest diff --git a/tasks/install.amazon.yml b/tasks/install.amazon.yml index 993d684..9553600 100644 --- a/tasks/install.amazon.yml +++ b/tasks/install.amazon.yml @@ -17,16 +17,19 @@ yum: name: "{{ mongodb_package }}{% if (mongodb_version | length > 3) %}={{ mongodb_version }}{% endif %}" state: "{{ mongodb_package_state }}" + lock_timeout: "{{ yum_lock_timeout }}" - name: Install numactl package yum: name: numactl state: present + lock_timeout: "{{ yum_lock_timeout }}" - name: Install PyMongo package yum: name: python-pymongo state: present + lock_timeout: "{{ yum_lock_timeout }}" when: not mongodb_pymongo_from_pip - name: Install PIP @@ -34,6 +37,7 @@ name: - python-devel - python-pip + lock_timeout: "{{ yum_lock_timeout }}" when: mongodb_pymongo_from_pip - name: Install PyMongo from PIP diff --git a/tasks/install.redhat.yml b/tasks/install.redhat.yml index f2b060d..6400fb6 100644 --- a/tasks/install.redhat.yml +++ b/tasks/install.redhat.yml @@ -23,16 +23,19 @@ yum: name: "{{ mongodb_package }}{% if (mongodb_version | length > 3) %}={{ mongodb_version }}{% endif %}" state: "{{ mongodb_package_state }}" + lock_timeout: "{{ yum_lock_timeout }}" - name: Install numactl package yum: name: numactl state: present + lock_timeout: "{{ yum_lock_timeout }}" - name: Install PyMongo package yum: name: python-pymongo state: present + lock_timeout: "{{ yum_lock_timeout }}" when: not mongodb_pymongo_from_pip - name: Install PIP @@ -40,6 +43,7 @@ name: - python-devel - python-pip + lock_timeout: "{{ yum_lock_timeout }}" when: mongodb_pymongo_from_pip | bool - name: Install PyMongo from PIP diff --git a/vars/Amazon.yml b/vars/Amazon.yml index ef029bd..1ad42a2 100644 --- a/vars/Amazon.yml +++ b/vars/Amazon.yml @@ -11,3 +11,5 @@ mongodb_repository_gpgkey: "3.6": "https://www.mongodb.org/static/pgp/server-3.6.asc" mongodb_pidfile_path: "{{ '/var/run/mongodb/mongod.pid' if ('mongodb-org' in mongodb_package) else '' }}" + +yum_lock_timeout: 180 diff --git a/vars/RedHat.yml b/vars/RedHat.yml index c810d34..d04db94 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -1,5 +1,4 @@ --- - mongodb_repository: "3.4": "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/$basearch/" "3.6": "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/$basearch/" @@ -13,3 +12,5 @@ mongodb_repository_gpgkey: "4.2": "https://www.mongodb.org/static/pgp/server-4.2.asc" mongodb_pidfile_path: "{{ '/var/run/mongodb/mongod.pid' if ('mongodb-org' in mongodb_package) else '' }}" + +yum_lock_timeout: 180