# Overriding defaults in anchor

**URL:** <https://forum.ansible.com/t/overriding-defaults-in-anchor/27983>\
**Category:** Ansible Project\
**Created:** [July 8, 2018, 1:53am UTC](https://forum.ansible.com/t/overriding-defaults-in-anchor/27983 "2018-07-08T01:53:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anushri\_Mishra](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@Anushri\_Mishra](https://forum.ansible.com/u/Anushri_Mishra)\
**Post date:** [July 8, 2018, 1:53am UTC](https://forum.ansible.com/t/overriding-defaults-in-anchor/27983/1 "2018-07-08T01:53:59Z")

</div>

Hi, Is there a way to override defaults in anchor ?

```auto
default: &defaults
 foo: "yes"
 bar: "true"

data:
 "name1":
   "phone": 617
   "foo" : "no"
   <<: *defaults
 "name2":
   <<: *defaults 

Does this work for example changing just the value of foo from yes to no for name1 ? If not, do you have any ideas? 

Thanks.

```
