Chapter 6 Network Reconnaissance

For diagrams, tables, or exact code formatting, .

JOHN W. CAPOBIANCOPRINTED PAGE 108

Refresh the VS Code editor / git pull from the command palette or visit TFS and view the output through the TFS file explorer.

Submit a pull request and proceed with the change management process merging into the master branch. Delete the working branch.

Now that a few working playbooks exist that automatically gather information from the network, start growing the library of commands. Follow a simple, repeatable process to build this library from known working playbooks:

 Create a work item.  Create a working branch.  git pull the repository. Update locally.  Change to new working branch (git checkout).  Copy the working Ansible playbook, rename and refactor playbook.  Test the playbook in check mode with verbosity (ansible-playbook –check –v).  Execute the playbook (ansible-playbook).  git push all output artifacts into repository.  Pull request to merge changes into master branch.  Delete the working branch.

Take the last play as a template that can simply be updated. Clone the file and refactor the code inside the new copy.

- hosts: 
 
Playbook scope which can be either a group or host variable: 
 
  tasks: 
 
List of tasks to be executed: 
 
  - name: 
 
Name of task. Displayed when task executes: 
 
  ios_command: 
 
Command provided by module: 
 
  commands:  
 
IOS commands to be executed: 
 
  provider:  
 
Credentials of device: 
 
  register: