Skip to content

Rework the Xenial workaround for not having /usr/bin/python #17

@tassoskoutlas

Description

@tassoskoutlas

Xenial does not have python2 installed by default and not /usr/bin/python. This causes problem with Ansible and the current workaround is to create provision a shell command straight from Vagrant to create a symlink of /usr/bin/python3 to /usr/bin/python and then provisions with Ansible.

In https://docs.ansible.com/ansible/intro_inventory.html#list-of-behavioral-inventory-parameters there is the following parameter which provides a cleaner solution:

ansible_python_interpreter

The target host python path. This is useful for systems with more than one Python or not located at /usr/bin/python such as *BSD, or where /usr/bin/python is not a 2.X series Python. We do not use the /usr/bin/env mechanism as that requires the remote user’s path to be set right and also assumes the python executable is named python, where the executable might be named something like python2.6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions