# assemble delimiter does not resolve attributes

**URL:** <https://forum.ansible.com/t/assemble-delimiter-does-not-resolve-attributes/18422>\
**Category:** Ansible Project\
**Created:** [June 7, 2015, 4:09am UTC](https://forum.ansible.com/t/assemble-delimiter-does-not-resolve-attributes/18422 "2015-06-07T04:09:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Barry\_Kaplan](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@Barry\_Kaplan](https://forum.ansible.com/u/Barry_Kaplan)\
**Post date:** [June 7, 2015, 4:09am UTC](https://forum.ansible.com/t/assemble-delimiter-does-not-resolve-attributes/18422/1 "2015-06-07T04:09:32Z")

</div>

I am using assemble like so:

`

- name: Assemble the final kibana.yml  
assemble:  
src: “{{kibana\_confd\_dir}}”  
dest: “{{kibana\_config\_dir}}/kibana.yml”  
delimiter: “# {{ansible\_managed}}”  
owner: “{{kibana\_user}}”  
group: “{{kibana\_group}}”  
mode: 0644

`

Which yields:

`  
TASK: [kibana | Assemble the final kibana.yml] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [10.0.196.100] =\> One or more undefined variables: ‘ansible\_managed’ is undefined

`

It seems that the value in ‘delimiter’ does not get processed by jinja. Is it the responsibility of each module to process each of its arguments, or does the ansible framework handle that?

---

<div class="post-metadata">

**Author:** ![Barry\_Kaplan](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@Barry\_Kaplan](https://forum.ansible.com/u/Barry_Kaplan)\
**Post date:** [June 7, 2015, 4:20am UTC](https://forum.ansible.com/t/assemble-delimiter-does-not-resolve-attributes/18422/2 "2015-06-07T04:20:02Z")

</div>

I guess this has nothing to with assemble, as this has the same problem

`copy: content: "# {{ansible_managed}}\n\n" dest: "{{kibana_confd_dir}}/00-kibana-header.yml"`

So there is something I do not understand about the scope of ansible\_managed.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [June 8, 2015, 2:04pm UTC](https://forum.ansible.com/t/assemble-delimiter-does-not-resolve-attributes/18422/3 "2015-06-08T14:04:55Z")

</div>

do you have ansible\_managed set in ansible.cfg?

---

<div class="post-metadata">

**Author:** ![JB1](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@JB1](https://forum.ansible.com/u/JB1)\
**Post date:** [July 17, 2015, 3:17pm UTC](https://forum.ansible.com/t/assemble-delimiter-does-not-resolve-attributes/18422/4 "2015-07-17T15:17:58Z")

</div>

I have the same issue.  
fatal: [localhost] =\> One or more undefined variables: ‘ansible\_managed’ is undefined

ansible\_managed IS defined in ansible.cfg  
ansible\_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}

I also have the additional issue in that even the directive, # {{ ansible\_managed }}, which is specified as the first line in the first fragment is also not getting replaced.  
I get the literal # {{ ansible\_managed }} in the destination file.

RUNNING: ansible-1.9.1-1.el6.noarch on CentOS release 6.6

- JB

---

<div class="post-metadata">

**Author:** ![jorginator74](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jorginator74](https://forum.ansible.com/u/jorginator74)\
**Post date:** [July 17, 2015, 3:30pm UTC](https://forum.ansible.com/t/assemble-delimiter-does-not-resolve-attributes/18422/5 "2015-07-17T15:30:12Z")

</div>

Hi

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 17, 2015, 3:32pm UTC](https://forum.ansible.com/t/assemble-delimiter-does-not-resolve-attributes/18422/6 "2015-07-17T15:32:46Z")

</div>

Karl is correct,

ansible\_managed only exists for the template module, it is not  
available in plays so you cannot pass it as a parameter.

copy: content was never meant to substitute the template module,  
content= does not do templating, it happens at the play level, which  
does not have the variable available.
