This repository was archived by the owner on May 12, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 49
49
when : not ansible_check_mode
50
50
51
51
- name : PBM Config PBM_MONGODB_URI
52
- command : pbm config --file /mongodb/pbm_config.yml --mongodb-uri "mongodb://{{ mongodb_backup_user_name }}:{{ mongodb_backup_user_password }}@{{ inventory_hostname }}:{{ mongodb_net_port|default('27017') }}/admin?replicaSet={{ mongodb_replication_replset }}"
52
+ command : pbm config --file /mongodb/pbm_config.yml --mongodb-uri "mongodb://{{ mongodb_backup_user_name }}:{{ mongodb_backup_user_password }}@{{ inventory_hostname }}:{{ mongodb_net_port }}/admin?replicaSet={{ mongodb_replication_replset }}"
53
53
no_log : true
54
54
55
55
- name : PBM Enable Point-in-Time Recovery
56
- command : pbm config --set pitr.enabled=true --mongodb-uri "mongodb://{{ mongodb_backup_user_name }}:{{ mongodb_backup_user_password }}@{{ inventory_hostname }}:{{ mongodb_net_port|default('27017') }}/admin?replicaSet={{ mongodb_replication_replset }}"
56
+ command : pbm config --set pitr.enabled=true --mongodb-uri "mongodb://{{ mongodb_backup_user_name }}:{{ mongodb_backup_user_password }}@{{ inventory_hostname }}:{{ mongodb_net_port }}/admin?replicaSet={{ mongodb_replication_replset }}"
57
57
no_log : true
58
58
when :
59
59
- mongodb_backup_pbm_pitr_enable|bool
66
66
- name : Add PBM_MONGODB_URI to bashrc
67
67
lineinfile :
68
68
path : /root/.bashrc
69
- line : ' export PBM_MONGODB_URI="mongodb://{{ mongodb_backup_user_name }}:{{ mongodb_backup_user_password }}@{{ inventory_hostname }}:{{ mongodb_net_port|default("27017") }}/admin?replicaSet={{ mongodb_replication_replset }}"'
69
+ line : ' export PBM_MONGODB_URI="mongodb://{{ mongodb_backup_user_name }}:{{ mongodb_backup_user_password }}@{{ inventory_hostname }}:{{ mongodb_net_port }}/admin?replicaSet={{ mongodb_replication_replset }}"'
70
70
no_log : true
Original file line number Diff line number Diff line change 18
18
update_password : on_create
19
19
login_user : " {{ mongodb_root_user_name }}"
20
20
login_password : " {{ mongodb_root_user_password }}"
21
- login_port : " {{ mongodb_net_port|default('27017') }}"
21
+ login_port : " {{ mongodb_net_port }}"
22
22
state : absent
23
23
no_log : true
24
24
27
27
mongo --quiet {{ '--ssl' if newrelic_mongodb_ssl == 'true' else '' }} \
28
28
--host {{ inventory_hostname }} \
29
29
-u {{ mongodb_root_user_name }} -p {{ mongodb_root_user_password }} \
30
- --port {{ mongodb_net_port|default('27017') }} \
30
+ --port {{ mongodb_net_port }} \
31
31
--eval 'db.getSiblingDB("admin").dropRole("pbmAnyAction")'
32
32
ignore_errors : true
33
33
no_log : true
46
46
- name : Remove PBM_MONGODB_URI to bashrc
47
47
lineinfile :
48
48
path : /root/.bashrc
49
+ line : ' export PBM_MONGODB_URI="mongodb://{{ mongodb_pbm_user_name }}:{{ mongodb_pbm_user_name_password }}@{{ inventory_hostname }}:{{ mongodb_net_port }}/admin?replicaSet={{ mongodb_replication_replset }}"'
49
50
state : absent
50
51
no_log : true
You can’t perform that action at this time.
0 commit comments