# Ansible With\_Item as Variable

**URL:** <https://forum.ansible.com/t/ansible-with-item-as-variable/32681>\
**Category:** Ansible Project\
**Created:** [April 14, 2020, 3:53pm UTC](https://forum.ansible.com/t/ansible-with-item-as-variable/32681 "2020-04-14T15:53:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Foley](https://avatars.discourse-cdn.com/v4/letter/d/9e8a1a/32.png) [@David\_Foley](https://forum.ansible.com/u/David_Foley)\
**Post date:** [April 14, 2020, 3:53pm UTC](https://forum.ansible.com/t/ansible-with-item-as-variable/32681/1 "2020-04-14T15:53:42Z")

</div>

Hi All,

Could do with some Help with this issue:

I am trying to get the Powerstate of a Virtual Machine and power off when powerstate != poweroff  
and looking at a way to copy the copy the Cluster variable to a Text File:
