Skip to content
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

Error running the zookeeper.yml playbook #15

Open
JNKHunter opened this issue May 26, 2017 · 3 comments
Open

Error running the zookeeper.yml playbook #15

JNKHunter opened this issue May 26, 2017 · 3 comments

Comments

@JNKHunter
Copy link

Issuing the command:

ansible-playbook ./zookeeper.yml --extra-vars "zookeeper_tag=Name_insight-test" --tags install

yields the following error:

PLAY [Creating host group zookeeper from dynamic inventory] *******************************************************************

TASK [Gathering Facts] ********************************************************************************************************
ok: [localhost]

TASK [add_host] ***************************************************************************************************************
fatal: [localhost]: FAILED! => {"failed": true, "msg": "'dict object' has no attribute u'tag_Name_insight_test'"}

NO MORE HOSTS LEFT ************************************************************************************************************
	to retry, use: --limit @/home/ubuntu/git/ansible-playbook/zookeeper.retry

PLAY RECAP ********************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1 

Here is the contents of my vars.yml file:

key_pair: ssh
instance_type: t2.medium
region: us-west-2
security_group_id: sg-7590d60e
num_instances: 2
subnet_id: subnet-1cd01347
tag_key_vals:
  Name: insight-test
  class: kafka
  class2: zookeeper

Any ideas if I'm doing something wrong or if a bug may be causing this?

@sulphur
Copy link

sulphur commented Nov 3, 2017

got the same error. Have you figured it out ?

@JNKHunter
Copy link
Author

JNKHunter commented Nov 6, 2017

@sulphur I switched to installing my cluster manually, and eventually created my own installation scripts to automate.

@spicyramen
Copy link

spicyramen commented Nov 20, 2017

This error is related to the way you run:

ansible-playbook ./ec2.yml — extra-vars “vars_file=./example_ec2_vars.yml” — tags launch

In example_ec2_vars.yml you have tag_key_vals defined, in my case looks like this:

tag_key_vals:
  Name: techie8-dev-kafka-cluster
  class: kafka
  class2: zookeeper

Hence you need to run:

ansible-playbook ./zookeeper.yml --extra-vars "zookeeper_tag=Name_techie8-dev-kafka-cluster" --tags install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants