# Using python functions in ansbile

**URL:** <https://forum.ansible.com/t/using-python-functions-in-ansbile/26175>\
**Category:** Ansible Project\
**Created:** [November 30, 2017, 12:12pm UTC](https://forum.ansible.com/t/using-python-functions-in-ansbile/26175 "2017-11-30T12:12:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bernienik](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bernienik](https://forum.ansible.com/u/bernienik)\
**Post date:** [November 30, 2017, 12:12pm UTC](https://forum.ansible.com/t/using-python-functions-in-ansbile/26175/1 "2017-11-30T12:12:49Z")

</div>

Hi  
i wonder in which sittuations python functions can be used in templates, as i have found no infos on this in the documentation.  
For example this works:

- name: get some results  
shell: ls -lrt  
register: shell\_res

- name: process shell res  
debug: msg=“{{item}}”  
with\_items: “{{shell\_res.stdout.split(‘\n’)}}”

so the split function is available here.  
Where too?  
Whereelse not?

Thanks  
Best Regards  
Bernhard
