Advertisement
Guest User

Untitled

a guest
Apr 11th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. hosts: localhost
  2.  
  3. vars:
  4. ems_uid:
  5. - i-0ee7a3b496c2fcf75
  6. - i-054b5c6b9a76949ab
  7. - i-0bb9264f4e4ec3e2e
  8.  
  9. tasks:
  10.  
  11. - name: debug ems_uid
  12. debug: msg="{{ ems_uid }}"
  13.  
  14. - name: Find the rhel_instance_hrefs
  15. uri:
  16. url: "https://cfme.exampmle.com//api/vms?expand=resources&attributes=href&filter[]=uid_ems={{ item }}"
  17. method: GET
  18. validate_certs: no
  19. body_format: json
  20. validate_certs: false
  21. user: admin
  22. password: xxxxxx
  23. status_code: 200
  24. register: vm_href_rhel
  25. with_items: "{{ ems_uid }}"
  26.  
  27. - name: get vm_href
  28. debug: msg="{{ vm_href_rhel.results | map(attribute='json') |map(attribute='resources') | flatten | map(attribute='href') | list }}"
  29.  
  30.  
  31. TASK [ec2_postprovision : Find the rhel_instance_hrefs] ************************
  32. failed: [localhost] (item=i-0002fb421e800951c) => {"changed": false, "item": "i-0002fb421e800951c", "msg": "invalid literal for int() with base 10: ''"}
  33. failed: [localhost] (item=i-0db4c7c80e9857340) => {"changed": false, "item": "i-0db4c7c80e9857340", "msg": "invalid literal for int() with base 10: ''"}
  34. 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