# Ansible 1.0 lookup plugin usage in with\_fileglob

**URL:** <https://forum.ansible.com/t/ansible-1-0-lookup-plugin-usage-in-with-fileglob/13084>\
**Category:** Ansible Project\
**Created:** [July 8, 2013, 7:28pm UTC](https://forum.ansible.com/t/ansible-1-0-lookup-plugin-usage-in-with-fileglob/13084 "2013-07-08T19:28:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gary\_Malouf](https://avatars.discourse-cdn.com/v4/letter/g/4bbf92/32.png) [@Gary\_Malouf](https://forum.ansible.com/u/Gary_Malouf)\
**Post date:** [July 8, 2013, 7:28pm UTC](https://forum.ansible.com/t/ansible-1-0-lookup-plugin-usage-in-with-fileglob/13084/1 "2013-07-08T19:28:25Z")

</div>

I’m having some trouble getting the following code in my playbook to run:

- name: “copy executable MX scripts out to nodes”  
action: copy src=$item dest=/opt/mx-scripts mode=755  
with\_fileglob:
- $ENV(DEPLOY\_HOME)/conf/common/templates/stuff/scripts/\*.sh  
tags:
- configuration

I tried to use the lookup plugin to do this but it did not seem to help

- name: “copy executable MX scripts out to nodes”  
action: copy src=$item dest=/opt/mx-scripts mode=755  
with\_fileglob:
- {{ lookup(‘env’,‘DEPLOY\_HOME’) }}/conf/common/templates/stuff/scripts/\*.sh  
tags:
- configuration

I’m not really sure whether lookup plugin works in this manner in 1.0 since it appears not to be substituted for when I debug. Any suggestions how to work through this?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [July 9, 2013, 2:52pm UTC](https://forum.ansible.com/t/ansible-1-0-lookup-plugin-usage-in-with-fileglob/13084/2 "2013-07-09T14:52:59Z")

</div>

1.0 does not support {{ }} syntax, that was introduced in 1.2

with\_fileglob: $ENV(DEPLOY\_HOME’)/conf/common/templates/stuff/scripts/\*.sh

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 10, 2013, 1:19am UTC](https://forum.ansible.com/t/ansible-1-0-lookup-plugin-usage-in-with-fileglob/13084/3 "2013-07-10T01:19:07Z")

</div>

Yep, exactly.

Slight tweak, I think the old syntax (which should still work but is dis-favored in newer versions)

$ENV(DEPLOY\_HOME)

aka lose the trailing “'” just before the )

I highly recommend upgrading to 1.2.X as there have been a lot of fixes/improvements sense then.
