Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- username:
- password:
- - name: Get username and password
- shell: python some_script.py
- register: result
- output should be
- username: bob
- password: getmein
- - name: Retrieve username
- shell: echo {{ item | regex_replace('^.*:(.*)$', 'username:\1') }} >> playbooks/defaults/main.yml
- with_items: result.stdout_lines[1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement