Commit be3ea1ca authored by Dónal Cunningham's avatar Dónal Cunningham
Browse files

DC - reorganised the show version playbooks

parent 6d1d0033
---
- name: Play 1 - Show the software version on an Arista switch
hosts: veos_hosts
gather_facts: "no"
gather_facts: no
connection: local
tasks:
- name: Task 1.1 - Gather version from switches using the raw module
......
---
- name: Play 1 - Show the software version on an Arista switch
hosts: veos_hosts
gather_facts: "no"
gather_facts: no
connection: local
tasks:
- name: Task 1.1 - Gather version from switches
......
---
- name: Play 1 - Show the software version on a vSRX
hosts: vSRX
gather_facts: "no"
gather_facts: no
connection: local
tasks:
- name: Task 1.1 - Gather version from switches
......
---
- name: Play 1 - Show the software version on an Arista switch
hosts: veos
gather_facts: "no"
connection: local
tasks:
- name: Task 1.1 - Gather version from switches
raw: 'show version | include Software'
register: showvers
- name: Task 1.2 - Print output
debug: var=showvers.stdout_lines[0]
- name: Play 2 - Verify switch software
hosts: veos
vars:
eos_version: "4.25"
gather_facts: "no"
connection: local
tasks:
- name: Task 2.1 - Assert we are running the correct EOS version ({{eos_version}})
assert:
that:
- "'{{eos_version}}' in showvers.stdout_lines[0]"
msg: "Oh noes! Switch not running eOS {{eos_version}}!"
---
- name: Check the version of code on a switch
hosts: veos
gather_facts: no # or False
tasks:
- name: Gather version from switches
raw: ‘show version’
register: show_version
---
# Oh look, a comment…
# …spread out over multiple lines
# This is not a real playbook - please do not attempt to run it.
# If you do it anyway, you will get this error:
# "ERROR! no module/action detected in task."
- name: Set up Apache # Or nginx, or Mongoose
hosts: webservers
tasks:
......@@ -8,4 +13,4 @@
- name: generate Apache config file
- name: download Web content to relevant directory
- name: restart Apache
- name: eat cake
- name: eat cake
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment