1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00

lineinfile regex for /etc/mongod.conf port change (though 27017 is recommended for most everyone!)

This commit is contained in:
A Holt 2020-11-03 09:22:01 -05:00 committed by GitHub
parent faed221bec
commit c464f83d0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,8 +117,8 @@
- name: Change {{ mongodb_conf }} port to {{ mongodb_port }} -- takes effect on next (re)start of the service -- via enable-or-disable.yml or via sugarizer.service auto-starting MongoDB on demand
lineinfile:
path: "{{ mongodb_conf }}"
regexp: "port: 27017"
backrefs: yes
regexp: '^\s*port:' # \s = any whitespace char. stackoverflow.com/a/38491899
#backrefs: yes
line: " port: {{ mongodb_port }}" # 27018
# end block