The primary requirement for Ansible 2.4 is Python 2.6 or higher and Python 3.5 or higher. If you have either of them installed, we can follow the simple steps to get the development environment going.
From the Ansible Developer Guide:
- Clone the Ansible repository:
$ git clone https://github.com/ansible/ansible.git
- Change the directory into the repository root directory:
$ cd ansible
- Create a virtual environment:
$ python3 -m venv venv (or for Python 2 $ virtualenv venv
- Note, this requires you to install the
virtualenv
package:$ pip install virtualenv
- Activate the virtual environment:
$ . venv/bin/activate
- Install the development requirements:
$ pip install -r requirements.txt
- Run the environment setup script for each new dev shell process:
$ . hacking/env-setup
You should end up with a venv
prompt at this point. Here is a simple playbook to set up the development environment.
The following playbook will set up the developer environment by installing and setting...