Advertisement
Guest User

Untitled

a guest
Jul 13th, 2016
1,004
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. username:
  2. password:
  3.  
  4. - name: Get username and password
  5. shell: python some_script.py
  6. register: result
  7.  
  8. output should be
  9. username: bob
  10. password: getmein
  11.  
  12. - name: Retrieve username
  13. shell: echo {{ item | regex_replace('^.*:(.*)$', 'username:\1') }} >> playbooks/defaults/main.yml
  14. with_items: result.stdout_lines[1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement