summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlicia Cozine <cozi@visi.com>2018-04-05 12:44:27 -0500
committerscottb <dharmabumstead@users.noreply.github.com>2018-04-05 10:44:27 -0700
commit24fe8674a601fe82cac2808260d508712373b0de (patch)
tree01ad345941ed6b90fdea17f55b16c6d75c71ab3f
parent39aa50022a16bc455469bd9e1d5c493f3663ecca (diff)
downloadansible-24fe8674a601fe82cac2808260d508712373b0de.tar.gz
DOCS: Network Best Practices fixes (#38293)
* fixes typo per #38217, corrects link anchor * adds ssh-agent info per #35649
-rw-r--r--docs/docsite/rst/network/user_guide/network_best_practices_2.5.rst12
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/docsite/rst/network/user_guide/network_best_practices_2.5.rst b/docs/docsite/rst/network/user_guide/network_best_practices_2.5.rst
index 292b85f19a..b98a477739 100644
--- a/docs/docsite/rst/network/user_guide/network_best_practices_2.5.rst
+++ b/docs/docsite/rst/network/user_guide/network_best_practices_2.5.rst
@@ -1,4 +1,4 @@
-.. network-best-practices:
+.. _network-best-practices:
**************************************
Network Best Practices for Ansible 2.5
@@ -55,7 +55,7 @@ An ``inventory`` file is an INI-like configuration file that defines the mapping
In our example, the inventory file defines the groups ``eos``, ``ios``, ``vyos`` and a "group of groups" called ``switches``. Further details about subgroups and inventory files can be found in the :ref:`Ansible inventory Group documentation <subgroups>`.
-Because Ansible is a flexible tool, there are a number of ways to specify connection information and credentials. We recommend using the ``[my_group:vars]`` capability in your inventory file:
+Because Ansible is a flexible tool, there are a number of ways to specify connection information and credentials. We recommend using the ``[my_group:vars]`` capability in your inventory file. Here's what it would look like if you specified your ssh passwords (encrypted with Ansible Vault) among your variables:
.. code-block:: ini
@@ -122,6 +122,8 @@ Because Ansible is a flexible tool, there are a number of ways to specify connec
3665626431626532630a353564323566316162613432373738333064366130303637616239396438
9853
+If you use ssh-agent, you do not need the ``ansible_ssh_pass`` lines. If you use ssh keys, but not ssh-agent, and you have multiple keys, specify the key to use for each connection in the ``[group:vars]`` section with ``ansible_ssh_private_key_file=/path/to/correct/key``. For more information on ``ansible_ssh_`` options see the :ref:`behavioral_parameters`.
+
.. FIXME FUTURE Gundalow - Link to network auth & proxy page (to be written)
.. warning:: Never store passwords in plain text.
@@ -247,7 +249,7 @@ Next, create a playbook file called ``facts-demo.yml`` containing the following:
#jinja2: lstrip_blocks: True
EOS device info:
{% for host in groups['eos'] %}
- Hostname: {{ hostvars[host].ansible_net_version }}
+ Hostname: {{ hostvars[host].ansible_net_hostname }}
Version: {{ hostvars[host].ansible_net_version }}
Model: {{ hostvars[host].ansible_net_model }}
Serial: {{ hostvars[host].ansible_net_serialnum }}
@@ -255,7 +257,7 @@ Next, create a playbook file called ``facts-demo.yml`` containing the following:
IOS device info:
{% for host in groups['ios'] %}
- Hostname: {{ hostvars[host].ansible_net_version }}
+ Hostname: {{ hostvars[host].ansible_net_hostname }}
Version: {{ hostvars[host].ansible_net_version }}
Model: {{ hostvars[host].ansible_net_model }}
Serial: {{ hostvars[host].ansible_net_serialnum }}
@@ -263,7 +265,7 @@ Next, create a playbook file called ``facts-demo.yml`` containing the following:
VyOS device info:
{% for host in groups['vyos'] %}
- Hostname: {{ hostvars[host].ansible_net_version }}
+ Hostname: {{ hostvars[host].ansible_net_hostname }}
Version: {{ hostvars[host].ansible_net_version }}
Model: {{ hostvars[host].ansible_net_model }}
Serial: {{ hostvars[host].ansible_net_serialnum }}