diff --git a/docs/docsite/rst/network/getting_started/first_playbook.rst b/docs/docsite/rst/network/getting_started/first_playbook.rst index ab63311a1b6..6d42a5016e4 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 8762a983e74..32f3195e15e 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 623f325d31f..8731947ab91 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: