# When using group\_vars  : ValueError: dictionary update sequence element #0 has length 1; 2 is required

**URL:** <https://forum.ansible.com/t/when-using-group-vars-valueerror-dictionary-update-sequence-element-0-has-length-1-2-is-required/24266>\
**Category:** Ansible Project\
**Created:** [April 20, 2017, 3:03pm UTC](https://forum.ansible.com/t/when-using-group-vars-valueerror-dictionary-update-sequence-element-0-has-length-1-2-is-required/24266 "2017-04-20T15:03:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_McConkey](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Sean\_McConkey](https://forum.ansible.com/u/Sean_McConkey)\
**Post date:** [April 20, 2017, 3:03pm UTC](https://forum.ansible.com/t/when-using-group-vars-valueerror-dictionary-update-sequence-element-0-has-length-1-2-is-required/24266/1 "2017-04-20T15:03:26Z")

</div>

Hi,

I am introducing group\_vars & children in my inventory into my Ansible environment as I need to update cron-tabs for different geographical regions using templates the basics of what you can see below. When I run the playbook it produces the error as seen at the bottom. A bit of research tells me that I am not the only 1 to see similar errors. Is this a bug that can be fixed with an upgrade or are there work-arounds? I’ve tried the vars file with different formatting to no avail.

Version Info : ansible 2.2.1.0

e.g. Template

`

{{ daily\_min }} {{ daily\_hr }} \* \* 0 /path/weekly.sh \> /dev/null 2\>&1

{{ weekly\_min }} {{ weekly\_hr }} \* \* \* /path/chk.sh \> /dev/null 2\>&1  
`

e.g. Group\_var

`

---

<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:** [April 20, 2017, 5:48pm UTC](https://forum.ansible.com/t/when-using-group-vars-valueerror-dictionary-update-sequence-element-0-has-length-1-2-is-required/24266/2 "2017-04-20T17:48:03Z")

</div>

vars files require that the top level is a dictionary, not a list:

```auto
crons:
    - { daily-min: "15", daily-hr: "01" }
    - { weekly-min: "15", weekly-hr: "03" }

```
