Deploying to CentOS 7:
TASK [RocketChat.Server : Deploy the Rocket.Chat service file]
fatal: [rocketchat.mydomain.com]: FAILED! => {
"changed": false,
"msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'iteritems'"
}
Any suggestion to the cause/fix?
Does this relate to #74 in some way?
The 'Deploy the Rocket.Chat service file' task using rocketchat.service.j2:
{% for variable, value in rocket_chat_service_environment.iteritems() %}
Environment={{ variable }}={{ value }}
{% endfor -%}
Changing it to use rocket_chat_service_environment.items()
seemed to fix the problem.
This appears to be an issue with iteritem() being removed in Python 3.
https://stackoverflow.com/questions/30418481/error-dict-object-has-no-attribute-iteritems
I also get this error and I my ansible version runs in Python 3 on MacOS, installed via homebrew:
$ ansible --version
ansible 2.8.1
config file = /Users/tanc/Documents/Projects/agile-ansible/ansible.cfg
configured module search path = ['/Users/tanc/.local/lib/python2.7/site-packages/ara/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.8.1/libexec/lib/python3.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)]
I also get this error and I my ansible version runs in Python 3 on MacOS, installed via homebrew:
$ ansible --version ansible 2.8.1 config file = /Users/tanc/Documents/Projects/agile-ansible/ansible.cfg configured module search path = ['/Users/tanc/.local/lib/python2.7/site-packages/ara/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.8.1/libexec/lib/python3.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)]
Super valuable, I just searched this error and I am not using rocketchat or homebrew but am using pyenv along with virtualenvironment and had the version set to 2.7.x but no matter what I did with pyenv the virtualenvironment kept using system default. End solution was to use pyenv-virtualenvironment.
Most helpful comment
I also get this error and I my ansible version runs in Python 3 on MacOS, installed via homebrew: