Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hosts: localhost
- vars:
- ems_uid:
- - i-0ee7a3b496c2fcf75
- - i-054b5c6b9a76949ab
- - i-0bb9264f4e4ec3e2e
- tasks:
- - name: debug ems_uid
- debug: msg="{{ ems_uid }}"
- - name: Find the rhel_instance_hrefs
- uri:
- url: "https://cfme.exampmle.com//api/vms?expand=resources&attributes=href&filter[]=uid_ems={{ item }}"
- method: GET
- validate_certs: no
- body_format: json
- validate_certs: false
- user: admin
- password: xxxxxx
- status_code: 200
- register: vm_href_rhel
- with_items: "{{ ems_uid }}"
- - name: get vm_href
- debug: msg="{{ vm_href_rhel.results | map(attribute='json') |map(attribute='resources') | flatten | map(attribute='href') | list }}"
- TASK [ec2_postprovision : Find the rhel_instance_hrefs] ************************
- failed: [localhost] (item=i-0002fb421e800951c) => {"changed": false, "item": "i-0002fb421e800951c", "msg": "invalid literal for int() with base 10: ''"}
- failed: [localhost] (item=i-0db4c7c80e9857340) => {"changed": false, "item": "i-0db4c7c80e9857340", "msg": "invalid literal for int() with base 10: ''"}
- failed: [localhost] (item=i-099a8cddc0c761619) => {"changed": false, "item": "i-099a8cddc0c761619", "msg": "invalid literal for int() with base 10: ''"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement