TASK [debug lunpaths] *******************************************************************************************************************************************************************************
ok: [127.0.0.1] => {
"msg": {
"count": 4,
"data": [
{
"hostGroup": {
"hostGroupId": "CL7-A,15",
"hostGroupName": "host12",
"hostGroupNumber": 15,
"hostMode": "VMWARE_EX",
"hostModeOptions": [
54,
63
],
"portId": "CL7-A",
"storageDeviceId": "886000999999"
},
"ldev": {
"attributes": [
"CVS",
"HDT"
],
"blockCapacity": 2147483648,
"byteFormatCapacity": "1.00 T",
"clprId": 0,
"dataReductionMode": "disabled",
"dataReductionStatus": "DISABLED",
"emulationType": "OPEN-V-CVS",
"isDefined": true,
"isFullAllocationEnabled": false,
"isRelocationEnabled": true,
"label": "BackupSFTP",
"ldevId": 82,
"mpBladeId": 0,
"numOfUsedBlock": 3096576,
"poolId": 0,
"status": "NML",
"storageDeviceId": "886000999999",
"tierLevel": "all",
"tierLevelForNewPageAllocation": "M",
"usedCapacityPerTierLevel1": 1512,
"usedCapacityPerTierLevel2": 0
},
"lun": {
"lun": 5,
"lunId": "CL7-A,15,5",
"storageDeviceId": "886000428027"
}
},
{
"hostGroup": {
"hostGroupId": "CL7-B,15",
"hostGroupName": "host12",
"hostGroupNumber": 15,
"hostMode": "VMWARE_EX",
"hostModeOptions": [
54,
63
],
"portId": "CL7-B",
"storageDeviceId": "886000999999"
},
"ldev": {
"attributes": [
"CVS",
"HDT"
],
"blockCapacity": 2147483648,
"byteFormatCapacity": "1.00 T",
"clprId": 0,
"dataReductionMode": "disabled",
"dataReductionStatus": "DISABLED",
"emulationType": "OPEN-V-CVS",
"isDefined": true,
"isFullAllocationEnabled": false,
"isRelocationEnabled": true,
"label": "BackupSFTP",
"ldevId": 82,
"mpBladeId": 0,
"numOfUsedBlock": 3096576,
"poolId": 0,
"status": "NML",
"storageDeviceId": "886000999999",
"tierLevel": "all",
"tierLevelForNewPageAllocation": "M",
"usedCapacityPerTierLevel1": 1512,
"usedCapacityPerTierLevel2": 0
},
"lun": {
"lun": 5,
"lunId": "CL7-B,15,5",
"storageDeviceId": "886000428027"
}
},
- name : print all hostgroups
debug:
msg: "{{item.hostGroup.hostGroupName}},{{item.hostGroup.hostGroupId}}"
loop: "{{sessions.json.data}}"
when: item.hostGroup.hostGroupName | regex_search('.*am1.*')(.*\.9$)
I cant get the regex to work right. I am looking to match am1 anywhere in the string, but end with specific numbers such as 1-8 or 9-16. Any help there would be appreciated.
My next step will be to figure out how to do a loop and do something with that data. such as execute a uri block that will use the item.#### as inputs to the body of the uri call. I have not had much luck locating what i think would do that, if someone has an example that would be great.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/8b1ca238d9d91fdc00d8fe198b3ef533%40olstad.com.
Joe Langdon
Sometimes when you think life is kicking you in the ass, it's actually just moving you quickly to a better place.
- name: debug - show max lun number
debug:
msg: "{{item.lun.lun}}"
loop: "{{luns.json.data}}"
when: "{{item.lun.lun | max}}"