PLAY [localhost] **********************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] ****************************************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Get instance metadata] **********************************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Get all mount targets] **********************************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Get all private ips] ************************************************************************************************************************************************************************************************************
failed: [localhost] (item={u'lifecycle_state': u'ACTIVE', u'availability_domain': u'orBF:EU-FRANKFURT-1-AD-2', u'display_name': u'OAG', u'private_ip_ids': [u'ocid1.privateip.oc1.eu-frankfurt-1.abtheljtdwuxv5ollxb5vfrqfwz3h6c34a3fde32ulzh3xqsl6kos3m7szjq'], u'compartment_id': u'ocid1.compartment.oc1..aaaaaaaaxwpjh3ahcxmkdrimeo5ehkhx4ekizxcjwxcj35spnsvrx5frzn7a', u'export_set_id': u'ocid1.exportset.oc1.eu_frankfurt_1.aaaaacvippxgefsnmzzgcllqojxwiotfouwwm4tbnzvwm5lsoqwtcllbmqwtgaaa', u'defined_tags': {}, u'freeform_tags': {u'tier': u'OAG', u'environment': u'ocitest0'}, u'time_created': u'2019-04-04T19:39:22.014000+00:00', u'subnet_id': u'ocid1.subnet.oc1.eu-frankfurt-1.aaaaaaaarprgvketeanr25qexwnhfdvfb42wsq35x6onkc7jjmdzj54rh6xa', u'lifecycle_details': u'', u'id': u'ocid1.mounttarget.oc1.eu_frankfurt_1.aaaaacvippxgefsomzzgcllqojxwiotfouwwm4tbnzvwm5lsoqwtcllbmqwtgaaa'}) => {"changed": false, "item": {"availability_domain": "orBF:EU-FRANKFURT-1-AD-2", "compartment_id": "ocid1.compartment.oc1..aaaaaaaaxwpjh3ahcxmkdrimeo5ehkhx4ekizxcjwxcj35spnsvrx5frzn7a", "defined_tags": {}, "display_name": "OAG", "export_set_id": "ocid1.exportset.oc1.eu_frankfurt_1.aaaaacvippxgefsnmzzgcllqojxwiotfouwwm4tbnzvwm5lsoqwtcllbmqwtgaaa", "freeform_tags": {"environment": "ocitest0", "tier": "OAG"}, "id": "ocid1.mounttarget.oc1.eu_frankfurt_1.aaaaacvippxgefsomzzgcllqojxwiotfouwwm4tbnzvwm5lsoqwtcllbmqwtgaaa", "lifecycle_details": "", "lifecycle_state": "ACTIVE", "private_ip_ids": ["ocid1.privateip.oc1.eu-frankfurt-1.abtheljtdwuxv5ollxb5vfrqfwz3h6c34a3fde32ulzh3xqsl6kos3m7szjq"], "subnet_id": "ocid1.subnet.oc1.eu-frankfurt-1.aaaaaaaarprgvketeanr25qexwnhfdvfb42wsq35x6onkc7jjmdzj54rh6xa", "time_created": "2019-04-04T19:39:22.014000+00:00"}, "msg": "Either Floating Private IP with ID ['ocid1.privateip.oc1.eu-frankfurt-1.abtheljtdwuxv5ollxb5vfrqfwz3h6c34a3fde32ulzh3xqsl6kos3m7szjq'] does not exist or you are not authorized to access it."}
failed: [localhost] (item={u'lifecycle_state': u'ACTIVE', u'availability_domain': u'orBF:EU-FRANKFURT-1-AD-2', u'display_name': u'OSB', u'private_ip_ids': [u'ocid1.privateip.oc1.eu-frankfurt-1.abtheljtrqjybcdfcy3drcssnwkbas5zmnsu4iw53g7fjy2glb3scs4g6lia'], u'compartment_id': u'ocid1.compartment.oc1..aaaaaaaaxwpjh3ahcxmkdrimeo5ehkhx4ekizxcjwxcj35spnsvrx5frzn7a', u'export_set_id': u'ocid1.exportset.oc1.eu_frankfurt_1.aaaaaa4np2snihtmmzzgcllqojxwiotfouwwm4tbnzvwm5lsoqwtcllbmqwtgaaa', u'defined_tags': {}, u'freeform_tags': {u'tier': u'OSB', u'environment': u'ocitest0'}, u'time_created': u'2019-03-28T11:06:07.340000+00:00', u'subnet_id': u'ocid1.subnet.oc1.eu-frankfurt-1.aaaaaaaarprgvketeanr25qexwnhfdvfb42wsq35x6onkc7jjmdzj54rh6xa', u'lifecycle_details': u'', u'id': u'ocid1.mounttarget.oc1.eu_frankfurt_1.aaaaaa4np2snihtnmzzgcllqojxwiotfouwwm4tbnzvwm5lsoqwtcllbmqwtgaaa'}) => {"changed": false, "item": {"availability_domain": "orBF:EU-FRANKFURT-1-AD-2", "compartment_id": "ocid1.compartment.oc1..aaaaaaaaxwpjh3ahcxmkdrimeo5ehkhx4ekizxcjwxcj35spnsvrx5frzn7a", "defined_tags": {}, "display_name": "OSB", "export_set_id": "ocid1.exportset.oc1.eu_frankfurt_1.aaaaaa4np2snihtmmzzgcllqojxwiotfouwwm4tbnzvwm5lsoqwtcllbmqwtgaaa", "freeform_tags": {"environment": "ocitest0", "tier": "OSB"}, "id": "ocid1.mounttarget.oc1.eu_frankfurt_1.aaaaaa4np2snihtnmzzgcllqojxwiotfouwwm4tbnzvwm5lsoqwtcllbmqwtgaaa", "lifecycle_details": "", "lifecycle_state": "ACTIVE", "private_ip_ids": ["ocid1.privateip.oc1.eu-frankfurt-1.abtheljtrqjybcdfcy3drcssnwkbas5zmnsu4iw53g7fjy2glb3scs4g6lia"], "subnet_id": "ocid1.subnet.oc1.eu-frankfurt-1.aaaaaaaarprgvketeanr25qexwnhfdvfb42wsq35x6onkc7jjmdzj54rh6xa", "time_created": "2019-03-28T11:06:07.340000+00:00"}, "msg": "Either Floating Private IP with ID ['ocid1.privateip.oc1.eu-frankfurt-1.abtheljtrqjybcdfcy3drcssnwkbas5zmnsu4iw53g7fjy2glb3scs4g6lia'] does not exist or you are not authorized to access it."}
to retry, use: --limit @/home/opc/ansible/elhub-oci.retry
---
#
- hosts: localhost
tasks:
- name: Get instance metadata
uri:
url: http://169.254.169.254/opc/v1/instance/
return_content: yes
register: instance_metadata
- name: Get all mount targets
oci_mount_target_facts:
compartment_id: "{{ instance_metadata.json.compartmentId }}"
availability_domain: "{{ instance_metadata.json.availabilityDomain }}"
register: oci_mount_targets
- name: Get all private ips
oci_private_ip_facts:
private_ip_id: "{{ item.private_ip_ids }}"
loop: "{{ oci_mount_targets.mount_targets }}"
register: oci_private_ips