AnsibleShipyard / ansible-zookeeper

Ansible playbook for ZooKeeper
MIT License
95 stars 114 forks source link

Where does {{ zoo_id }} gets the value from? #24

Closed gvenka008c closed 8 years ago

gvenka008c commented 8 years ago

@antonlindstrom @mhamrah How does the below work?where does {{ zoo_id }} gets the value from?

Template myid.j2 has the below {{ zoo_id }}

gvenka008c commented 8 years ago

@kienpham2000 Any update on the above?

kpx-dev commented 8 years ago

@gvenka008c it comes from this default config here: https://github.com/AnsibleShipyard/ansible-zookeeper/blob/master/defaults/main.yml#L12

Which you can overwrite when you include this role at your playbook.

gvenka008c commented 8 years ago

I have 3 masters and want to set zoo_id as 1, 2 and 3. I thought {{zoo_id}} is pulled using dynamic inventory. Thanks @kienpham2000

kpx-dev commented 8 years ago

@gvenka008c I believe you can set it at your host file like this. Not sure if this is recommend, it's been a while I use ansible :)

master001.example.com zoo_id=1 master002.example.com zoo_id=2

gvenka008c commented 8 years ago

@kienpham2000 Thanks. We are using Dynamic Inventory to pull host information. So I need to find a way to get it dynamically. Thanks for the quick response.

ernestas-poskus commented 8 years ago

@gvenka008c currently zoo_id is static but this https://github.com/AnsibleShipyard/ansible-zookeeper/pull/29 will solve it

ernestas-poskus commented 8 years ago

Fixed by https://github.com/AnsibleShipyard/ansible-zookeeper/pull/29