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
- name: Add flashcopy mapping to consistency group | |
ibm_svc_volume_snapshot: | |
clustername: "{{ clustername }}" | |
username: "{{ username }}" | |
password: "{{ password }}" | |
name: "map_{{ (item['stdout'] | from_json)[0].name }}" | |
state: present | |
volume: "{{ (item['stdout'] | from_json)[0].name }}" | |
snapshot: "snap_{{ (item['stdout'] | from_json)[0].name }}" | |
consistgrp: "CG_{{ host | upper }}" |
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
- name: Create a flashcopy consistency group | |
ibm_svc_fcconsistgrp: | |
clustername: "{{ clustername }}" | |
username: "{{ username }}" | |
password: "{{ password }}" | |
name: "CG_{{ host | upper }}" | |
state: present | |
- name: Create snapshot target volumes | |
ibm_svc_vdisk: |
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: |
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
--- | |
- name: Create a flashcopy consistency group and mappings for all volumes mapped to a host | |
collections: | |
- ibm.spectrum_virtualize | |
gather_facts: no | |
connection: local | |
hosts: localhost | |
vars: | |
- clustername: ip_address_or_host_name | |
- username: user_name_on_storage |
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
--- | |
- name: Create a flashcopy consistency group and mappings for all volumes mapped to a host | |
collections: | |
- ibm.spectrum_virtualize | |
gather_facts: no | |
connection: local | |
hosts: localhost | |
vars: | |
- clustername: ip_address_or_host_name | |
- username: user_name_on_storage |
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
--- | |
# install_ptfs_via_imgclg | |
- name: Get status of PTF | |
hosts: all | |
vars: | |
ptfid: 'SI72134' | |
lpp: '5733SC1' | |
src_dir: '/mnt/c/Users/robin/Downloads/IBM/IBMi' | |
dest_ifs_dir: '/tmp' | |
bin_file: 'S3355V01.BIN' |
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
- - - | |
all: | |
hosts: | |
vars: | |
children: | |
ibmi: | |
hosts: | |
mgtsvr01: | |
ansible_host: <IP_ADDRESS_OF_YOUR_LPAR> | |
ansible_ssh_user: <YOUR_USER_ID> |
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
--- | |
name: Ensure device is varied on | |
hosts: all | |
gather_facts: no | |
collections: | |
- ibm.power_ibmi | |
tasks: | |
- name: Vary on device | |
ibmi_device_vary: | |
device_list: |
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
[ibmi] | |
NAME_OF_YOUR_LPAR ansible_host=IP_ADDRESS_OF_YOUR_LPAR ansible_ssh_user=qsecofr | |
[ibmi:vars] | |
ansible_python_interpreter="/QOpensys/pkgs/bin/python3" | |
ansible_ssh_common_args='-o StrictHostKeyChecking=no' | |
ansible_ssh_private_key_file="~/.ssh/ansible_IBMi_id_rsa" |
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
[defaults] | |
inventory = inventory.yml | |
interpreter_python = /usr/bin/python3 | |
[ssh_connection] | |
pipelining = True |
NewerOlder