mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
6 years ago
|
---
|
||
|
# Test code for the Cisco Intersight modules
|
||
|
# Copyright 2019, David Soper (@dsoper2)
|
||
|
|
||
|
- name: Setup API access variables
|
||
|
debug: msg="Setup API keys"
|
||
|
vars:
|
||
|
api_info: &api_info
|
||
|
api_private_key: "{{ api_private_key | default('~/Downloads/SSOSecretKey.txt') }}"
|
||
|
api_key_id: "{{ api_key_id | default('596cc79e5d91b400010d15ad/596cc7945d91b400010d154e/5b6275df3437357030a7795f') }}"
|
||
|
|
||
6 years ago
|
- name: Get infos for all servers
|
||
|
intersight_info:
|
||
6 years ago
|
<<: *api_info
|
||
|
server_names:
|
||
|
register: result
|
||
|
|
||
6 years ago
|
- name: Verify info does not report a change
|
||
6 years ago
|
assert:
|
||
|
that:
|
||
|
- result.changed == false
|
||
|
- "'Name' in result.intersight_servers[0]"
|
||
|
- "'Moid' in result.intersight_servers[0]"
|
||
|
|
||
6 years ago
|
- name: Get info for servers by name
|
||
|
intersight_info:
|
||
6 years ago
|
<<: *api_info
|
||
|
server_names:
|
||
|
- CC7UCS-13-1-1
|
||
|
register: result2
|
||
|
|
||
6 years ago
|
- name: Verify info does not report a change
|
||
6 years ago
|
assert:
|
||
|
that:
|
||
|
- result2.changed == false
|
||
|
- "'Name' in result2.intersight_servers[0]"
|
||
|
- "'Moid' in result2.intersight_servers[0]"
|