Add yum_lock_timeout to avoid "yum lockfile is held by another process" error
This commit is contained in:
parent
5b9c94b4ce
commit
c68216a46b
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue