Skip to content

Commit 589222f

Browse files
committed
Provide better default user for a RedHat based OS
While we could define this in the per-platform variables, including this in the defaults maintains backwards compatability for users that want to override this value.
1 parent b74bade commit 589222f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ mongodb_pymongo_from_pip: true # Install latest PyMongo via PI
4141
mongodb_user_update_password: "on_create" # MongoDB user password update default policy
4242
mongodb_manage_service: true
4343

44-
mongodb_user: mongodb
44+
mongodb_user: "{{ 'mongod' if ('RedHat' == ansible_os_family) else 'mongodb' }}"
4545
mongodb_uid:
4646
mongodb_gid:
4747
mongodb_daemon_name: "{{ 'mongod' if ('mongodb-org' in mongodb_package) else 'mongodb' }}"

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mongodb_force_wait_for_port: false
1010
mongodb_user_update_password: "on_create" # MongoDB user password update default policy
1111
mongodb_manage_service: true
1212

13-
mongodb_user: mongodb
13+
mongodb_user: "{{ 'mongod' if ('RedHat' == ansible_os_family) else 'mongodb' }}"
1414
mongodb_uid:
1515
mongodb_gid:
1616
mongodb_daemon_name: "{{ 'mongod' if ('mongodb-org' in mongodb_package) else 'mongodb' }}"

0 commit comments

Comments
 (0)