Skip to content

Instantly share code, notes, and snippets.

@titom73
Created November 5, 2016 11:07
Show Gist options
  • Save titom73/eb35ba65b868ff29a3e380bef6b63c21 to your computer and use it in GitHub Desktop.
Save titom73/eb35ba65b868ff29a3e380bef6b63c21 to your computer and use it in GitHub Desktop.
ansible-ztp / Issue #19 Test & Validation
[tom@spy01 ansible-junos-ztp (master)]$ ansible-playbook -i hosts.ini playbook-ztp-init.yml
PLAY [Init ZTP directory strucutre to store local files] ***********************
TASK [ztp-init : Print build path version] *************************************
ok: [ansible01] => {
"msg": "Build directory conf/ztp"
}
TASK [ztp-init : Check if path exists] *****************************************
ok: [ansible01]
TASK [ztp-init : It exists] ****************************************************
ok: [ansible01] => {
"msg": "Yay, the path exists! will delete it"
}
TASK [ztp-init : Remove ztp.path.build] ****************************************
changed: [ansible01]
TASK [ztp-init : It doesn't exist] *********************************************
skipping: [ansible01]
TASK [ztp-init : create ztp directory] *****************************************
changed: [ansible01]
TASK [ztp-init : ztp.path.build created] ***************************************
ok: [ansible01] => {
"msg": "ztp.path.build has been initiated correctly"
}
TASK [ztp-init : create ztp directory for configlet] ***************************
changed: [ansible01]
TASK [ztp-init : create ztp directory for softwares] ***************************
changed: [ansible01]
PLAY RECAP *********************************************************************
ansible01 : ok=8 changed=4 unreachable=0 failed=0
[tom@spy01 ansible-junos-ztp (master)]$ git checkout issue19
Switched to branch 'issue19'
[tom@spy01 ansible-junos-ztp (issue19)]$ ansible-playbook -i hosts.ini playbook-ztp-init.yml
PLAY [Init ZTP directory strucutre to store local files] ***********************
TASK [ztp-init : Print build path version] *************************************
ok: [ansible01] => {
"msg": "Build directory conf/ztp"
}
TASK [ztp-init : Check if path exists] *****************************************
ok: [ansible01]
TASK [ztp-init : It exists] ****************************************************
ok: [ansible01] => {
"msg": "Yay, the path exists! will delete it"
}
TASK [ztp-init : Remove build_dir] *********************************************
changed: [ansible01]
TASK [ztp-init : It doesn't exist] *********************************************
skipping: [ansible01]
TASK [ztp-init : create ztp directory] *****************************************
changed: [ansible01]
TASK [ztp-init : build_dir created] ********************************************
ok: [ansible01] => {
"msg": "build_dir has been initiated correctly"
}
TASK [ztp-init : create ztp directory for configlet] ***************************
changed: [ansible01]
TASK [ztp-init : create ztp directory for softwares] ***************************
changed: [ansible01]
PLAY RECAP *********************************************************************
ansible01 : ok=8 changed=4 unreachable=0 failed=0
[tom@spy01 ansible-junos-ztp (issue19)]$ ansible-playbook -i hosts.ini playbook-ztp-conf-generate.yml
PLAY [Populate local ZTP configurations] ***************************************
TASK [ztp-create-config : building basic dhcp configuration] *******************
ok: [ansible01]
changed: [srx-01]
ok: [srx-02]
ok: [ztp01]
TASK [ztp-create-config : building ztp configuration for dhcp server] **********
skipping: [ztp01]
skipping: [ansible01]
changed: [srx-01]
changed: [srx-02]
TASK [ztp-create-config : assemble dhcp configuration] *************************
ok: [ztp01]
changed: [srx-02]
changed: [srx-01]
ok: [ansible01]
PLAY RECAP *********************************************************************
ansible01 : ok=2 changed=0 unreachable=0 failed=0
srx-01 : ok=3 changed=3 unreachable=0 failed=0
srx-02 : ok=3 changed=2 unreachable=0 failed=0
ztp01 : ok=2 changed=0 unreachable=0 failed=0
[tom@spy01 ansible-junos-ztp (issue19)]$ ansible-playbook -i hosts.ini playbook-ztp-push-data.yml
PLAY [Send ZTP configurations & softwares to server] ***************************
TASK [ztp-push-dhcp : Copy dhcp content to dhcp-server] ************************
ok: [ztp01]
TASK [ztp-push-dhcp : Restart dhcp service to apply changes] *******************
changed: [ztp01]
TASK [ztp-push-dhcp : Push junos configuration to the FTP server] **************
TASK [ztp-push-dhcp : Push junos softwares to the FTP server] ******************
ok: [ztp01] => (item=/home/tom/scripting/ansible-junos-ztp/software/junos-srxsme-15.1X49-D50.3-domestic.tgz)
PLAY RECAP *********************************************************************
ztp01 : ok=3 changed=1 unreachable=0 failed=0
[tom@spy01 ansible-junos-ztp (issue19)]$ ansible-playbook -i hosts.ini playbook-ztp-complete.yml
PLAY [01- Initiate ZTP Setup] **************************************************
TASK [ztp-install-packages : Boostrap Python APT] ******************************
ok: [ztp01]
TASK [ztp-install-packages : update repository cache to get latest packages version] ***
ok: [ztp01]
TASK [ztp-install-packages : install DHCP server] ******************************
ok: [ztp01]
TASK [ztp-install-packages : restart dhcp service to apply changes] ************
changed: [ztp01]
TASK [ztp-install-packages : install FTP server to deploy configuration and software] ***
ok: [ztp01]
TASK [ztp-install-packages : enable anonymous support] *************************
ok: [ztp01]
TASK [ztp-install-packages : create ftp home directory] ************************
ok: [ztp01]
TASK [ztp-install-packages : create ftp structure conf directory] **************
ok: [ztp01]
TASK [ztp-install-packages : create ftp structure soft directory] **************
ok: [ztp01]
TASK [ztp-install-packages : change permission for /var/FTP] *******************
ok: [ztp01]
TASK [ztp-install-packages : restart ftp service to apply changes] *************
changed: [ztp01]
PLAY [02- Init ZTP directory strucutre to store local files] *******************
TASK [ztp-init : Print build path version] *************************************
ok: [ansible01] => {
"msg": "Build directory conf/ztp"
}
TASK [ztp-init : Check if path exists] *****************************************
ok: [ansible01]
TASK [ztp-init : It exists] ****************************************************
ok: [ansible01] => {
"msg": "Yay, the path exists! will delete it"
}
TASK [ztp-init : Remove build_dir] *********************************************
changed: [ansible01]
TASK [ztp-init : It doesn't exist] *********************************************
skipping: [ansible01]
TASK [ztp-init : create ztp directory] *****************************************
changed: [ansible01]
TASK [ztp-init : build_dir created] ********************************************
ok: [ansible01] => {
"msg": "build_dir has been initiated correctly"
}
TASK [ztp-init : create ztp directory for configlet] ***************************
changed: [ansible01]
TASK [ztp-init : create ztp directory for softwares] ***************************
changed: [ansible01]
PLAY [03- Populate local ZTP configurations] ***********************************
TASK [ztp-create-config : building basic dhcp configuration] *******************
ok: [ztp01]
changed: [ansible01]
changed: [srx-01]
changed: [srx-02]
TASK [ztp-create-config : building ztp configuration for dhcp server] **********
skipping: [ztp01]
skipping: [ansible01]
changed: [srx-01]
changed: [srx-02]
TASK [ztp-create-config : assemble dhcp configuration] *************************
ok: [ztp01]
changed: [srx-02]
ok: [ansible01]
ok: [srx-01]
PLAY [04- Send ZTP configurations to server] ***********************************
TASK [ztp-push-dhcp : Copy dhcp content to dhcp-server] ************************
ok: [ztp01]
TASK [ztp-push-dhcp : Restart dhcp service to apply changes] *******************
changed: [ztp01]
TASK [ztp-push-dhcp : Push junos configuration to the FTP server] **************
TASK [ztp-push-dhcp : Push junos softwares to the FTP server] ******************
ok: [ztp01] => (item=/home/tom/scripting/ansible-junos-ztp/software/junos-srxsme-15.1X49-D50.3-domestic.tgz)
PLAY RECAP *********************************************************************
ansible01 : ok=10 changed=5 unreachable=0 failed=0
srx-01 : ok=3 changed=2 unreachable=0 failed=0
srx-02 : ok=3 changed=3 unreachable=0 failed=0
ztp01 : ok=16 changed=3 unreachable=0 failed=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment