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