mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
lineinfile regex for /etc/mongod.conf port change (though 27017 is recommended for most everyone!)
This commit is contained in:
parent
faed221bec
commit
c464f83d0b
1 changed files with 2 additions and 2 deletions
|
@ -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
|
- 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:
|
lineinfile:
|
||||||
path: "{{ mongodb_conf }}"
|
path: "{{ mongodb_conf }}"
|
||||||
regexp: "port: 27017"
|
regexp: '^\s*port:' # \s = any whitespace char. stackoverflow.com/a/38491899
|
||||||
backrefs: yes
|
#backrefs: yes
|
||||||
line: " port: {{ mongodb_port }}" # 27018
|
line: " port: {{ mongodb_port }}" # 27018
|
||||||
|
|
||||||
# end block
|
# end block
|
||||||
|
|
Loading…
Reference in a new issue