Created
November 25, 2020 17:40
-
-
Save robinsg/7781d5347d5d61390fd2b1ac4cc9499f to your computer and use it in GitHub Desktop.
Spectrum Virtualize Flashcopy - Checks and info retrieval
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tasks: | |
- name: Fail if a host is not defined and the ansible-playbook command | |
fails: | |
mag: | |
- 'No host specified. On the ansible-playbook command use "--extra-vars host=hostname"' | |
when: host is not defined | |
- block: | |
- name: Get a list of volume mappings for the host | |
ibm_svcinfo_command: | |
command: "svcinfo lshostvdiskmap {{ host }}" | |
clustername: "{{ clustername }}" | |
username: "{{ username }}" | |
password: "{{ password }}" | |
register: mappings | |
- name: Get volume information for each volume mapped to the host | |
ibm_svcinfo_command: | |
command: "svcinfo lsvdisk {{ item.vdisk_name }} " | |
clustername: "{{ clustername }}" | |
username: "{{ username }}" | |
password: "{{ password }}" | |
register: volumes | |
loop: "{{ mappings.stdout }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment