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

AnsibleUndefinedVariable dict object has no attribute etcd #33

Open
patsevanton opened this issue Nov 14, 2018 · 4 comments
Open

AnsibleUndefinedVariable dict object has no attribute etcd #33

patsevanton opened this issue Nov 14, 2018 · 4 comments

Comments

@patsevanton
Copy link
Contributor

I dont know how fix it.

TASK [retr0h.etcd : Add etcd systemd service] ***************************************************************************************************
fatal: [ubuntu1]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute u'etcd'"}
fatal: [ubuntu2]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute u'etcd'"}
fatal: [ubuntu3]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute u'etcd'"}
cat patroni.yml 
- hosts: patroni
  become: yes
  roles:
    - kostiantyn-nemchenko.patroni
@patsevanton
Copy link
Contributor Author

patsevanton commented Nov 15, 2018

Can i use another role for etcd ?
For example: https://galaxy.ansible.com/andrewrothstein/etcd-cluster

@kostiantyn-nemchenko
Copy link
Owner

fatal: [ubuntu1]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute u'etcd'"

Seems like you don't have etcd group in your inventory file for ansible.

Please, add something like the following:

[etcd]
ubuntu1 ansible_host=XXX.XXX.XXX.XXX
ubuntu2 ansible_host=XXX.XXX.XXX.XXX
ubuntu3 ansible_host=XXX.XXX.XXX.XXX

Can i use another role for etcd ?

Sure, just set patroni_dcs_exists to true and provide the correct values for etcd related settings.

@patsevanton
Copy link
Contributor Author

OMG.
May be add

[etcd]
ubuntu1 ansible_host=XXX.XXX.XXX.XXX
ubuntu2 ansible_host=XXX.XXX.XXX.XXX
ubuntu3 ansible_host=XXX.XXX.XXX.XXX

to readme?

@kostiantyn-nemchenko
Copy link
Owner

It makes sense. But respective groups for zookeeper and consul should be added as well.

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

2 participants