summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSandra McCann <samccann@redhat.com>2018-10-02 17:23:10 -0400
committerAlicia Cozine <879121+acozine@users.noreply.github.com>2018-10-02 16:23:10 -0500
commita1d1276b6ebb5d596c0f42bf8e80feb824a2d124 (patch)
treeca7d0a334a44f0108adf6758c186c8ae4a98c33b /docs
parentd81ed54ae6a79517eda7fe727da2fb557210e41d (diff)
downloadansible-a1d1276b6ebb5d596c0f42bf8e80feb824a2d124.tar.gz
disable gather facts and update playbook output (#46409) (#46418)
* disable facts gather and update playbook output * fix output (cherry picked from commit a1fae193c75602ba186bd7c5c12423eadddca9b9)
Diffstat (limited to 'docs')
-rw-r--r--docs/docsite/rst/network/getting_started/first_playbook.rst31
-rw-r--r--docs/docsite/rst/network/getting_started/sample_files/first_playbook.yml1
-rw-r--r--docs/docsite/rst/network/getting_started/sample_files/first_playbook_ext.yml1
3 files changed, 12 insertions, 21 deletions
diff --git a/docs/docsite/rst/network/getting_started/first_playbook.rst b/docs/docsite/rst/network/getting_started/first_playbook.rst
index ab63311a1b..6d42a5016e 100644
--- a/docs/docsite/rst/network/getting_started/first_playbook.rst
+++ b/docs/docsite/rst/network/getting_started/first_playbook.rst
@@ -2,7 +2,7 @@
Run Your First Command and Playbook
***************************************************
-Put the concepts you learned to work with this quick tutorial. Install Ansible, execute a network configuration command manually, execute the same command with Ansible, then create a playbook so you can execute the command any time on multiple network devices.
+Put the concepts you learned to work with this quick tutorial. Install Ansible, execute a network configuration command manually, execute the same command with Ansible, then create a playbook so you can execute the command any time on multiple network devices.
.. contents:: Topics
@@ -86,22 +86,17 @@ The playbook contains one play with two tasks, and should generate output like t
.. code-block:: bash
$ ansible-playbook -i vyos.example.net, -u ansible -k -e ansible_network_os=vyos first_playbook.yml
-
+
PLAY [First Playbook]
***************************************************************************************************************************
-
- TASK [Gathering Facts]
- ***************************************************************************************************************************
- ok: [vyos.example.net]
TASK [Get config for VyOS devices]
***************************************************************************************************************************
ok: [vyos.example.net]
-
+
TASK [Display the config]
***************************************************************************************************************************
ok: [vyos.example.net] => {
- "failed": false,
"msg": "The hostname is vyos and the OS is VyOS"
}
@@ -114,15 +109,11 @@ The extended first playbook has four tasks in a single play. Run it with the sam
.. code-block:: bash
- $ ansible-playbook -i vyos.example.net, -u ansible -k -e ansible_network_os=vyos first_playbook_ext.yml
+ $ ansible-playbook -i vyos.example.net, -u ansible -k -e ansible_network_os=vyos first_playbook_ext.yml
PLAY [First Playbook]
************************************************************************************************************************************
-
- TASK [Gathering Facts]
- ***********************************************************************************************************************************
- ok: [vyos.example.net]
-
+
TASK [Get config for VyOS devices]
**********************************************************************************************************************************
ok: [vyos.example.net]
@@ -130,10 +121,9 @@ The extended first playbook has four tasks in a single play. Run it with the sam
TASK [Display the config]
*************************************************************************************************************************************
ok: [vyos.example.net] => {
- "failed": false,
"msg": "The hostname is vyos and the OS is VyOS"
}
-
+
TASK [Update the hostname]
*************************************************************************************************************************************
changed: [vyos.example.net]
@@ -141,17 +131,16 @@ The extended first playbook has four tasks in a single play. Run it with the sam
TASK [Get changed config for VyOS devices]
*************************************************************************************************************************************
ok: [vyos.example.net]
-
+
TASK [Display the changed config]
*************************************************************************************************************************************
ok: [vyos.example.net] => {
- "failed": false,
"msg": "The hostname is vyos-changed and the OS is VyOS"
}
-
+
PLAY RECAP
************************************************************************************************************************************
- vyos.example.net : ok=6 changed=1 unreachable=0 failed=0
+ vyos.example.net : ok=6 changed=1 unreachable=0 failed=0
-This playbook is useful. However, running it still requires several command-line flags. Also, running a playbook against a single device is not a huge efficiency gain over making the same change manually. The next step to harnessing the full power of Ansible is to use an inventory file to organize your managed nodes into groups with information like the ``ansible_network_os`` and the SSH user.
+This playbook is useful. However, running it still requires several command-line flags. Also, running a playbook against a single device is not a huge efficiency gain over making the same change manually. The next step to harnessing the full power of Ansible is to use an inventory file to organize your managed nodes into groups with information like the ``ansible_network_os`` and the SSH user.
diff --git a/docs/docsite/rst/network/getting_started/sample_files/first_playbook.yml b/docs/docsite/rst/network/getting_started/sample_files/first_playbook.yml
index 8762a983e7..32f3195e15 100644
--- a/docs/docsite/rst/network/getting_started/sample_files/first_playbook.yml
+++ b/docs/docsite/rst/network/getting_started/sample_files/first_playbook.yml
@@ -2,6 +2,7 @@
- name: Network Getting Started First Playbook
connection: network_cli
+ gather_facts: false
hosts: all
tasks:
diff --git a/docs/docsite/rst/network/getting_started/sample_files/first_playbook_ext.yml b/docs/docsite/rst/network/getting_started/sample_files/first_playbook_ext.yml
index 623f325d31..8731947ab9 100644
--- a/docs/docsite/rst/network/getting_started/sample_files/first_playbook_ext.yml
+++ b/docs/docsite/rst/network/getting_started/sample_files/first_playbook_ext.yml
@@ -2,6 +2,7 @@
- name: Network Getting Started First Playbook Extended
connection: network_cli
+ gather_facts: false
hosts: all
tasks: