Hi
I have developed a collection of modules on my local setup.
Now, I’ve already verified that the CLI docstrings for the modules are printing correctly
by running
ansible-doc
Next, I wanted to generate the HTML webdoc file.
So I followed the steps listed here.
https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html
Installing prerequisites via yum (CentOS)
Due to dependencies (for example ansible → paramiko → pynacl → libffi):
sudo yum check-update sudo yum update sudo yum group install “Development Tools” sudo yum install python3-devel openssl-devel libffi libffi-devel
Creating a development environment (platform-agnostic steps)
-
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
Now, I manually copied my collection of modules to the location mentioned in STEP 3 below
To check the HTML output of your module documentation:
-
Ensure working development environment.
-
Install required Python packages (drop ‘–user’ in venv/virtualenv):
pip install --user -r requirements.txt pip install --user -r docs/docsite/requirements.txt
-
Ensure your module is in the correct directory: lib/ansible/modules/$CATEGORY/mymodule.py.
-
Build HTML from your module documentation: MODULES=mymodule make webdocs
I then tried to find all .html files on the setup, I can’t find the HTML file for the modules in my collection.
Can someone please help me figure out if I’m doing it right ?