upgrading ansible to python3


before
/project # ansible-playbook -i hosts playbook.yml -vv
ansible-playbook 2.4.0.0
  config file = None
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.15 (default, Aug 22 2018, 13:28:29) [GCC 6.3.0]
No config file found; using defaults

PLAYBOOK: playbook.yml ******************************************


python3 install ansible

/project # python3 install ansible
python3: can't open file 'install': [Errno 2] No such file or directory
/project # pip3 install ansible
Collecting ansible
Downloading https://files.pythonhosted.org/packages/7c/4f/a1843687642b8e33637e312b9fb17ca7f68be0641131a92d883368dc6d1c/ansible-2.7.0.tar.gz (11.8MB)
100% |████████████████████████████████| 11.8MB 262kB/s
Requirement already satisfied: jinja2 in /usr/lib/python3.6/site-packages (from ansible) (2.10)


After
/project # ansible-playbook -i hosts playbook.yml -vv
ansible-playbook 2.7.0
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 3.6.5 (default, Aug 22 2018, 14:30:18) [GCC 6.3.0]
No config file found; using defaults