Update links and best practices in Ansible doc 53/11153/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 9 Jun 2018 18:39:54 +0000 (14:39 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 9 Jun 2018 18:39:56 +0000 (14:39 -0400)
Update links to remove unnecessary namespacing and add upstream
Ansible intersphinx link so that we do not have to direct link.

Change-Id: I63aa47ad055fd5ec7f72b69e4dde4f71646000c6
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
docs/ansible.rst
docs/conf.py

index 540974a..7333d46 100644 (file)
@@ -1,4 +1,4 @@
-.. _lfreleng-docs-ansible:
+.. _ansible:
 
 #############
 Ansible Guide
@@ -6,13 +6,19 @@ Ansible Guide
 
 This guide documents the process to setup and manage a new ansible role.
 
+.. _ansible-roles:
+
 Ansible Roles
 =============
 
 Ansible roles are a collection of Ansible vars_files, tasks, and handlers
 packaged into a single package for easy distribution and reuse.
 
-Refer to `ansible-role`_ for documentation on Ansible roles.
+Refer to the upstream
+:doc:`Ansible Roles <ansible:user_guide/playbooks_reuse_roles>` documentation
+for details.
+
+.. _ansible-galaxy:
 
 Ansible Galaxy
 ==============
@@ -20,12 +26,16 @@ Ansible Galaxy
 Ansible galaxy is an online hub for finding, reusing and sharing Ansible
 Content. We use it to share and pull down Ansible roles.
 
+.. _molecule:
+
 Molecule
 ========
 
 Molecule is a test framework for testing Ansible roles. We use it to ensure
 the role supports all supported distros.
 
+.. _ansible-reqs:
+
 Requirements
 ============
 
@@ -35,6 +45,8 @@ In a virtualenv install.
 
    pip install ansible docker-py molecule
 
+.. _ansible-role-setup:
+
 Set up an Ansible Role
 ======================
 
@@ -106,5 +118,3 @@ Set up an Ansible Role
 
      git add .
      git commit -sm "Add role ROLE_NAME"
-
-.. _ansible-role: https://docs.ansible.com/ansible/latest/playbooks_reuse_roles.html
index 4d16e6a..951d14b 100644 (file)
@@ -20,6 +20,8 @@
 
 from docs_conf.conf import *
 
+intersphinx_mapping['ansible'] = ('https://docs.ansible.com/ansible/latest/', None)
+
 linkcheck_ignore = [
     'http.*PROJECT_DOMAIN.*',
     'https://gerrit.linuxfoundation.org/infra/releng/docs-conf',