Milestone 6 ‐ Blue Network and VyOS Provisioning with Ansible - tmansfield42/Tech-Journal GitHub Wiki

Summary

In this lab we continued to develop our custom powershell module with multiple new functions listed below:

480-utils.psm1

New-Network

Get-IP

Start-VM

Stop-VM

Set-Network

Documentaion Used

Some important documentation that I used was from PowerCLI vCenter documentation:

Broadcom PowerCLI Documentation


I used the following pages for these modules:

Deliverable 1: For New-Network virtual network, virtual port group, Virtual Switch. For Get-IP VMHost Get-VMGuest -VM 'vmname' is also how I got IP

Deliverable 3: Start-VM Stop-VM are pre-existing modules in PowerCLI

Deliverable 4: For Set-Network, I used a lot of the same modules I used in Deliverable 1, but also used Set-NetworkAdapter

Ansible ping

There wasn't any issues I had in this lab, just basic troubleshooting issues. To install ansible dependencies follow this link and you can perform a basic ansible ping by a simple ansible playbook here:

Ansible Dependencies (gmcyber link)

sudo apt install sshpass python3-paramiko git
sudo apt-add-repository ppa:ansible/ansible
sudo apt update
sudo apt install ansible
ansible --version
cat >> ~/.ansible.cfg << EOF                                                               
[defaults]
host_key_checking = false
EOF

fw-blue19-vars.txt

ansible vyos -m ping -i fw-blue19-vars.txt --user vyos --ask-pass

If ssh/port 22 refused:

On vyos, enable ssh

configure
set service ssh port 22
commit
save
exit