-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inventory file #1
Comments
What sort of errors are you getting? What OS? Make sure to have DNS functional or update /etc/hosts. You can use the following ansible-etc-hosts role and use this playbook. ---
- hosts: mongodb_cluster
vars:
etc_hosts_add_all_hosts: true
mongodb_config_mongodb: true
mongodb_bind_ip:
# - 0.0.0.0
- 127.0.0.1
- "{{ ansible_enp0s8['ipv4']['address'] }}"
mongodb_replication: true
pri_domain_name: test.vagrant.local
roles:
- role: ansible-etc-hosts
- role: ansible-mongodb
become: true
tasks: [] For an inventory file the following should work (You do not need to define the [mongodb_cluster]
mongo1.example.com
mongo2.example.com
mongo3.example.com By default the master is chosen by: # Defines the node which should be considered the replication master
mongodb_replication_master: "{{ groups[mongodb_replication_group][0] }}" The above is in # Defines if MongoDB replication is configured
mongodb_replication: false Hope this helps! |
Hi @mrlesmithjr Not sure if I should open another ticket, but I have noticed the following behavior. Primary node host name is always set to IP, instead of DNS name. I made sure that DNS entries are getting resolved correctly by DNS server, having said that secondary nodes are setup correctly via DNS name. On Primary node, I had to do the following steps to fix the issue.
|
Hi
can you please add a sample inventory file? I had to spend 1h debugging errors
Thanks
The text was updated successfully, but these errors were encountered: