13 lines
545 B
YAML
13 lines
545 B
YAML
---
|
|
- name: Configure MongoDB prod cluster
|
|
hosts: db.prod
|
|
roles:
|
|
- { role: swap-file, tags: swap-file }
|
|
- { role: mongodb-firewall, tags: mongodb-firewall }
|
|
- { role: mongodb-setup, tags: mongodb-setup }
|
|
- { role: mongodb-backups, tags: mongodb-backups }
|
|
post_tasks:
|
|
- name: MongoDB URI string
|
|
debug:
|
|
msg: 'mongodb://{{ mongodb_users[0].name }}:{{ mongodb_users[0].password }}@{{ dns_entry }}:{{ mongodb_net_port }}/{{ mongodb_users[0].database }}?replicaSet={{ mongodb_replication_replset }}'
|