Advertisement
Guest User

Untitled

a guest
Feb 9th, 2021
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. ---
  2. - hosts: ora-pp
  3. user: ansible
  4. become: yes
  5. become_method: sudo
  6. connection: ssh
  7. tasks:
  8. - name: check all the updates
  9. yum:
  10. list: updates
  11. register: output
  12.  
  13. - debug: var=output
  14.  
  15. - name: parseoutput
  16. set_fact:
  17. #output1: "{{output |to_json}}"
  18. #- debug: msg="{{output |to_json}}"
  19. - debug: msg="{{ output.results | json_query('output.results[0].name') }}"
  20.  
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement