Issues when installing python
Thanks for this playbook, it really covers the full process. But I have faced an issue while using it.
I made no changes to the default settings. My play book looks like this:
- name: "Deploying API"
hosts: webservers
roles:
- role: python-dev
Here's the full output:
TASK [dhellmann.python-dev : Install tools for adding PPA repositories] ******** ok: [62.109.15.78] => (item=[u'python-software-properties', u'software-properties-common'])
TASK [dhellmann.python-dev : Install Python dependencies] ********************** ok: [62.109.15.78] => (item=[u'libffi-dev', u'gcc'])
TASK [dhellmann.python-dev : Add Python 2.6 repository] ************************ ok: [62.109.15.78]
TASK [dhellmann.python-dev : Add PyPy PPA repository] ************************** changed: [62.109.15.78]
TASK [dhellmann.python-dev : Install PyPy] ************************************* changed: [62.109.15.78] => (item=[u'pypy', u'pypy-dev', u'python-cffi'])
TASK [dhellmann.python-dev : Install python] *********************************** fatal: [62.109.15.78]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'ansible.vars.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'version'\n\nThe error appears to have been in '/usr/local/etc/ansible/roles/dhellmann.python-dev/tasks/main.yml': line 18, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- include: pypy.yml\n- name: Install python\n ^ here\n"} to retry, use: --limit @/Users/sobolev/Documents/configs/project/api.retry
PLAY RECAP ********************************************************************* 62.109.15.78 : ok=15 changed=2 unreachable=0 failed=1
I am using:
» ansible --version ansible 2.2.1.0
I have already fixed this issue in a fork: https://github.com/sobolevn/ansible-python-dev/blob/master/tasks/main.yml
I can send a PR, if you want to.