can set uid and gid of mongodb user
This commit is contained in:
parent
e85c17a6e6
commit
7828ad5b92
|
@ -19,6 +19,8 @@ mongodb_disable_thp: true
|
|||
mongodb_manage_service: true
|
||||
|
||||
mongodb_user: mongodb
|
||||
mongodb_uid:
|
||||
mongodb_gid:
|
||||
mongodb_daemon_name: "{{ 'mongod' if ('mongodb-org' in mongodb_package) else 'mongodb' }}"
|
||||
|
||||
mongodb_conf_auth: false # Run with security
|
||||
|
|
|
@ -8,6 +8,8 @@ mongodb_disable_thp: true
|
|||
mongodb_manage_service: true
|
||||
|
||||
mongodb_user: mongodb
|
||||
mongodb_uid:
|
||||
mongodb_gid:
|
||||
mongodb_daemon_name: "{{ 'mongod' if ('mongodb-org' in mongodb_package) else 'mongodb' }}"
|
||||
|
||||
mongodb_conf_auth: false # Run with security
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
---
|
||||
|
||||
- name: set mongodb gid
|
||||
group: name=mongodb gid={{ mongodb_gid }} state=present
|
||||
when: mongodb_gid
|
||||
|
||||
- name: set mongodb uid
|
||||
user: name=mongodb uid={{ mongodb_uid }} group=mongodb state=present
|
||||
when: mongodb_uid
|
||||
|
||||
- name: Register default MongoDB listen IP
|
||||
set_fact: mongodb_listen_ip=127.0.0.1
|
||||
when: ansible_local.mongodb.mongodb.mongodb_listen_ip is undefined
|
||||
|
|
Loading…
Reference in New Issue