mongodb: Add mongo alias for root with connect uri
This commit is contained in:
parent
c767c1371b
commit
a978e9ecc6
1 changed files with 6 additions and 0 deletions
|
@ -105,3 +105,9 @@
|
||||||
name: mongod
|
name: mongod
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
|
- name: create mongo alias cmd for root
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: /root/.bashrc
|
||||||
|
line: alias mongo='mongo --tlsCertificateKeyFile {{ tls_private }}/mongodb.pem --tlsCAFile {{ tls_certs }}/ca.crt --tls mongodb://{{ inventory_hostname }}/'
|
||||||
|
regexp: ^alias mongo=.*
|
||||||
|
|
Loading…
Add table
Reference in a new issue