running command direct to server (command who fails):
root@s132:~# /opt/openwisp2/env/bin/pip install -U django-netjsonconfig
Collecting django-netjsonconfig
Using cached django_netjsonconfig-0.5.3.post1-py2.py3-none-any.whl
Requirement already up-to-date: six in
/opt/openwisp2/env/lib/python3.4/site-pac
kages (from django-netjsonconfig)
Collecting django-model-utils (from django-netjsonconfig)
Collecting netjsonconfig<0.6.0,>=0.5.4 (from django-netjsonconfig)
Collecting django-x509<0.3.0,>=0.2.0 (from django-netjsonconfig)
Using cached django_x509-0.2-py2.py3-none-any.whl
Collecting jsonfield (from django-netjsonconfig)
Using cached jsonfield-2.0.0-py2.py3-none-any.whl
Collecting django<1.11,>=1.9 (from django-netjsonconfig)
Using cached Django-1.10.6-py2.py3-none-any.whl
Collecting django-reversion<2.1,>=2.0.6 (from django-netjsonconfig)
Using cached django_reversion-2.0.8-py2.py3-none-any.whl
Collecting django-sortedm2m<1.4,>=1.3.2 (from django-netjsonconfig)
Using cached django-sortedm2m-1.3.3.tar.gz
Collecting jinja2 (from netjsonconfig<0.6.0,>=0.5.4->django-netjsonconfig)
Using cached Jinja2-2.9.5-py2.py3-none-any.whl
Collecting py2-ipaddress (from
netjsonconfig<0.6.0,>=0.5.4->django-netjsonconfig
)
Using cached py2-ipaddress-3.4.1.tar.gz
Complete output from command python setup.py egg_info:
py2-ipaddress: For Python 3.x, please use the official ipaddress module.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
/tmp/pip-build-ex 38g4ud/py2-ipaddress/
2017-03-06 14:30 GMT-03:00 Alvaro Mendez <[email protected]>:
> Dear Federico,
>
> I run the installation as you said (from a vm in my laptop), but:
>
> *root@crushmind:~/openwisp2-ansible-playbook# ansible-playbook -i hosts
> playbook.yml -u tabako -k --ask-sudo-pass*
> SSH password:
> SUDO password[defaults to SSH password]:
>
> PLAY ************************************************************
> ***************
>
> TASK [setup] ************************************************************
> *******
> ok: [132.148.88.35]
>
> TASK [openwisp.openwisp2 : include] ******************************
> **************
> included: /etc/ansible/roles/openwisp.openwisp2/tasks/apt.yml for
> 132.148.88.35
>
> TASK [openwisp.openwisp2 : Update APT package cache]
> ***************************
> ok: [132.148.88.35]
>
> TASK [openwisp.openwisp2 : Install system packages]
> ****************************
> ok: [132.148.88.35] => (item=[u'sudo', u'python-software-properties',
> u'build-essential', u'sqlite3', u'supervisor', u'nginx', u'openssl',
> u'libssl-dev', u'libffi-dev', u'python-dev'])
>
> TASK [openwisp.openwisp2 : Install acl if acting as non-root user]
> *************
> ok: [132.148.88.35]
>
> TASK [openwisp.openwisp2 : ensure supervisor is started]
> ***********************
> ok: [132.148.88.35]
>
> TASK [openwisp.openwisp2 : Install python2 packages]
> ***************************
> skipping: [132.148.88.35] => (item=[])
>
> TASK [openwisp.openwisp2 : Install python3 packages]
> ***************************
> ok: [132.148.88.35] => (item=[u'python3', u'python3-pip', u'python3-dev',
> u'python-virtualenv'])
>
> TASK [openwisp.openwisp2 : Install python wheel (optional, allowed to
> fail)] ***
> ok: [132.148.88.35] => (item=[u'python-wheel', u'python3-wheel'])
>
> TASK [openwisp.openwisp2 : Install python3-virtualenv]
> *************************
> skipping: [132.148.88.35] => (item=[])
>
> TASK [openwisp.openwisp2 : Install git if using development version of any
> openwisp module] ***
> skipping: [132.148.88.35]
>
> TASK [openwisp.openwisp2 : include] ******************************
> **************
> included: /etc/ansible/roles/openwisp.openwisp2/tasks/pip.yml for
> 132.148.88.35
>
> TASK [openwisp.openwisp2 : Update pip & related tools]
> *************************
> changed: [132.148.88.35] => (item=pip)
> changed: [132.148.88.35] => (item=setuptools)
> changed: [132.148.88.35] => (item=wheel)
>
> TASK [openwisp.openwisp2 : Install stable version of django-netjsonconfig]
> *****
> failed: [132.148.88.35] => (item=django-netjsonconfig) => {"cmd":
> "/opt/openwisp2/env/bin/pip install -U django-netjsonconfig", "failed":
> true, "item": "django-netjsonconfig", "msg": "stdout: Collecting
> django-netjsonconfig\n Using cached django_netjsonconfig-0.5.3.
> post1-py2.py3-none-any.whl\nCollecting django-sortedm2m<1.4,>=1.3.2 (from
> django-netjsonconfig)\n Using cached
> django-sortedm2m-1.3.3.tar.gz\nCollecting
> django<1.11,>=1.9 (from django-netjsonconfig)\n Using cached
> Django-1.10.6-py2.py3-none-any.whl\nCollecting jsonfield (from
> django-netjsonconfig)\n Using cached
> jsonfield-2.0.0-py2.py3-none-any.whl\nCollecting
> netjsonconfig<0.6.0,>=0.5.4 (from django-netjsonconfig)\nCollecting
> django-model-utils (from django-netjsonconfig)\nRequirement already
> up-to-date: six in /opt/openwisp2/env/lib/python3.4/site-packages (from
> django-netjsonconfig)\nCollecting django-reversion<2.1,>=2.0.6 (from
> django-netjsonconfig)\n Using cached
> django_reversion-2.0.8-py2.py3-none-any.whl\nCollecting
> django-x509<0.3.0,>=0.2.0 (from django-netjsonconfig)\n Using cached
> django_x509-0.2-py2.py3-none-any.whl\nCollecting jinja2 (from
> netjsonconfig<0.6.0,>=0.5.4->django-netjsonconfig)\n Using cached
> Jinja2-2.9.5-py2.py3-none-any.whl\nCollecting jsonschema (from
> netjsonconfig<0.6.0,>=0.5.4->django-netjsonconfig)\n Using cached
> jsonschema-2.6.0-py2.py3-none-any.whl\nCollecting py2-ipaddress (from
> netjsonconfig<0.6.0,>=0.5.4->django-netjsonconfig)\n Using cached
> py2-ipaddress-3.4.1.tar.gz\n Complete output from command python
> setup.py egg_info:\n py2-ipaddress: For Python 3.x, please use the
> official ipaddress module.\n \n
> ----------------------------------------\n\n:stderr:
> Command \"python setup.py egg_info\" failed with error code 1 in
> /tmp/pip-build-zqjakwwh/py2-ipaddress/\n"}
>
> PLAY RECAP ************************************************************
> *********
> 132.148.88.35 : ok=10 changed=1 unreachable=0 failed=1
>
>
> *root@crushmind:~/openwisp2-ansible-playbook# cat hosts*
> [openwisp2]
> 132.148.88.35
> *root@crushmind:~/openwisp2-ansible-playbook# cat playbook.yml*
> - hosts: openwisp2
> become: "{{ become | default('yes') }}"
> roles:
> - openwisp.openwisp2
> vars:
> openwisp2_shared_secret: 354R$543##
>
>
> Best regards,
> Alvaro
>
>
> 2017-03-06 10:17 GMT-03:00 Federico Capoano <[email protected]>:
>
>> See below:
>>
>> On Monday, March 6, 2017 at 12:35:14 PM UTC+1, Alvaro Mendez wrote:
>>>
>>> Hello Federico, thanks for your time, here is the information you ask:
>>>
>>>
>>> - how did you launch ansible-playbook, can you paste the entire
>>> command?
>>>
>>> *as root i run:*
>>>
>>> *ansible-playbook -i hosts playbook.yml -u tabako -k --ask-sudo-pass
>>> -vvv*
>>>
>>
>> Looks good.
>>
>>
>>>
>>> - what ubuntu version are you using on the target server?
>>>
>>>
>>>
>>> *root@s132:~# cat /etc/issueUbuntu 15.10 \n \l*
>>>
>>
>> I don't remember if I tried Ubuntu 15 or not, but since Ubuntu 14 and
>> Ubuntu 16 surely work, it should work for Ubuntu 15 too.
>>
>>
>>> *root@s132:~# uname -aLinux s132 4.2.0-042stab113.21 #1 SMP Wed Mar 23
>>> 11:05:25 MSK 2016 x86_64 x86_64 x86_64 GNU/Linux*
>>>
>>>
>>> - on what target machine are you trying to install on? Is it a VM, a
>>> linux container or your own laptop?
>>>
>>> *It is a VM on an godaddy VPS.*
>>>
>>> - what version of ansible are you using? Check it out with ansible
>>> --version
>>>
>>>
>> Good
>>
>>
>>>
>>>
>>>
>>> *root@s132:~# ansible --versionansible 2.2.0.0 config file =
>>> /etc/ansible/ansible.cfg configured module search path = Default w/o
>>> overrides*
>>>
>>>
>> The ansible version is ok
>>
>>
>>> Also here is other information:
>>>
>>>
>>>
>>>
>>> *root@s132:~# pythonPython 2.7.10 (default, Oct 14 2015, 16:09:02)[GCC
>>> 5.2.1 20151010] on linux2Type "help", "copyright", "credits" or "license"
>>> for more information.*
>>>
>>>
>>>
>> Python version is ok, check if the system has also python3, if it does,
>> ansible-openwisp2 will be used using python3.
>>
>>
>>>
>>>
>>>
>>>
>>> *root@s132:~# django-adminType 'django-admin help <subcommand>' for help
>>> on a specific subcommand.*
>>>
>>
>> [cut]
>>
>> This is fine but as a side not you should know that django is installed
>> in a separate virtualenv, which is the part not currently working for you
>> at the moment.
>>
>>
>>>
>>>
>>> *root@s132:~/openwisp2-ansible-playbook# more hosts[openwisp2]localhost
>>> ansible_ssh_host=132.148.88.35*
>>>
>>
>> This doesn't look right.
>>
>> It should be something like:
>>
>> [openwisp2]
>> 132.148.88.35
>>
>> If you want to run ansible locally you can then use the --connection
>> local flag although that's not the best way to run ansible.
>>
>> Could you try running ansible remotely from your own workstation and to
>> edit the hostfile as suggested?
>>
>> Try also removing the /opt/openwisp2 directory on the server, so it will
>> be recreated.
>>
>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *root@s132:~/openwisp2-ansible-playbook# more playbook.yml- hosts:
>>> openwisp2 become: "{{ become | default('yes') }}" roles: -
>>> openwisp.openwisp2 vars: openwisp2_shared_secret: tee456yt%$#*
>>>
>>
>> This also looks good.
>>
>> Try the suggested changes and let me know!
>>
>> Federico
>>
>>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "OpenWISP" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/openwisp/y0rNUXUidu0/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Alvaro Mendez
> [email protected]
> 8-9047532
>
--
Alvaro Mendez
[email protected]
8-9047532
--
You received this message because you are subscribed to the Google Groups
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.