From f3dcd4b8b35c13be4e398d100b104bcd1f87e8bd Mon Sep 17 00:00:00 2001 From: Scott Butler Date: Tue, 17 May 2016 14:44:09 -0700 Subject: [PATCH] Rearranged structure; added install instructions; added info to the conditionals section. --- docsite/rst/intro_networking.rst | 45 +++++++++++++++++--------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/docsite/rst/intro_networking.rst b/docsite/rst/intro_networking.rst index 1c0ffa7a28c..bf81d34d6c6 100644 --- a/docsite/rst/intro_networking.rst +++ b/docsite/rst/intro_networking.rst @@ -20,20 +20,24 @@ Ansible currently supports the following networking devices: * Juniper JUNOS * OpenSwitch -.. _networking_prerequisites: - -Network Automation Prerequisites -```````````````````````` - -TBD - - .. _networking_installation: Network Automation Installation ```````````````````````` -TBD +Download the latest Ansible network release `here `_. + +Playbooks for testing Ansible core network modules can be found `here `_. + + +.. _networking_module_index: + +Available Networking Modules +```````````````````````` + +Most standard Ansible modules are designed to work with Linux/Unix or Windows machines and will not work with networking devices. Some modules (including "slurp", "raw", and "setup") are platform-agnostic and will work with networking devices. + +To see what modules are available for networking devices, please browse the `"networking" section of the Ansible module index `_. .. _understanding_provider_arguments: @@ -162,29 +166,19 @@ ssh_keyfile ANSIBLE_NET_SSH_KEYFILE authorize ANSIBLE_NET_AUTHORIZE auth_pass ANSIBLE_NET_AUTH_PASS -Variables are evaulated in the following order, list from lowest to highest priority: +Variables are evaulated in the following order, listed from lowest to highest priority: * Default * Environment * Provider * Task arguments - -.. _networking_module_index: - -Available Networking Modules -```````````````````````` - -Most standard Ansible modules are designed to work with Linux/Unix or Windows machines and will not work with networking devices. Some modules (including "slurp", "raw", and "setup") are platform-agnostic and will work with networking devices. - -To see what modules are available for networking devices, please browse the `"networking" section of the Ansible module index `_. - .. _networking_module_conditionals: Conditionals in Networking Modules ```````````````````````` -Ansible allows you to use conditionals to control the flow of your playbooks. Ansible networking command modules use unique conditional statements. +Ansible allows you to use conditionals to control the flow of your playbooks. Ansible networking command modules use the following unique conditional statements. * eq - Equal * neq - Not equal @@ -195,5 +189,14 @@ Ansible allows you to use conditionals to control the flow of your playbooks. An * contains - Object contains specified item +Conditionals used with networking command modules only evaluate results, not stdout. For example, the following example won't work:: + + --- + waitfor: "stdout_lines[0][6] contains '100.00'" + +To evaluate this properly, you'll need to compare against results. For example:: + + --- + result[0] contains '100.00'