Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [newswoop:F25:ansible (devel % u=)]$ cat pyver.yaml
- ---
- - name: The first play
- hosts: localhost
- gather_facts: false
- tasks:
- - name: show ansible_python_interpreter
- debug:
- var: ansible_python_interpreter
- [newswoop:F25:ansible (devel % u=)]$ python3.6 bin/ansible-playbook pyver.yaml
- [WARNING]: No inventory was parsed, only implicit localhost is available
- [WARNING]: provided hosts list is empty, only localhost is available
- PLAY [The first play] ****************************************************************************
- TASK [show ansible_python_interpreter] ***********************************************************
- ok: [localhost] => {
- "ansible_python_interpreter": "/usr/bin/python3.6",
- "failed": false
- }
- PLAY RECAP ***************************************************************************************
- localhost : ok=1 changed=0 unreachable=0 failed=0
- [newswoop:F25:ansible (devel % u=)]$ python2.7 bin/ansible-playbook pyver.yaml
- [WARNING]: No inventory was parsed, only implicit localhost is available
- [WARNING]: provided hosts list is empty, only localhost is available
- PLAY [The first play] ****************************************************************************
- TASK [show ansible_python_interpreter] ***********************************************************
- ok: [localhost] => {
- "ansible_python_interpreter": "/usr/bin/python2.7",
- "failed": false
- }
- PLAY RECAP ***************************************************************************************
- localhost : ok=1 changed=0 unreachable=0 failed=0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement