Due to dependencies (for example ansible -> paramiko -> pynacl -> libffi):
Clone the Ansible repository: $ git clone https://github.com/ansible/ansible.git
Change directory into the repository root dir: $ 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 development requirements: $ pip install -r requirements.txt
Run the environment setup script for each new dev shell process: $ . hacking/env-setup
To check the HTML output of your module documentation:
Ensure working development environment.
Install required Python packages (drop ‘–user’ in venv/virtualenv):
Ensure your module is in the correct directory: lib/ansible/modules/$CATEGORY/mymodule.py.
Build HTML from your module documentation: MODULES=mymodule make webdocs