# Ansible Operation output diffrent result with “with\_sequence” and “debug module”

**URL:** <https://forum.ansible.com/t/ansible-operation-output-diffrent-result-with-with-sequence-and-debug-module/32492>\
**Category:** Ansible Project\
**Created:** [March 18, 2020, 5:59am UTC](https://forum.ansible.com/t/ansible-operation-output-diffrent-result-with-with-sequence-and-debug-module/32492 "2020-03-18T05:59:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SeungJoon](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@SeungJoon](https://forum.ansible.com/u/SeungJoon)\
**Post date:** [March 18, 2020, 5:59am UTC](https://forum.ansible.com/t/ansible-operation-output-diffrent-result-with-with-sequence-and-debug-module/32492/1 "2020-03-18T05:59:07Z")

</div>

```auto
**My playbook sample :**

- name: Memory check
  debug: msg='{% if "{{ item }} percent" in HOST_MGMT4.stdout %} MEMORY CHECK {% else %} MEMORY OK {% endif %}'
  register: result_memory
  with_sequence: '60-100'

```

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [March 18, 2020, 6:38am UTC](https://forum.ansible.com/t/ansible-operation-output-diffrent-result-with-with-sequence-and-debug-module/32492/2 "2020-03-18T06:38:53Z")

</div>

> \>\*My playbook sample :\*||||- name: Memory check debug: msg='{% if "{{ item }} percent" in HOST\_MGMT4.stdout %} MEMORY CHECK {% else %} MEMORY OK  
> {% endif %}' register: result\_memory with\_sequence: '60-100'|

Why don't you simple use a regex filter to extract the value instead of this needless loop?

E.g regex\_findall.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke
