You do have an option :) Set the *hash_behaviour 
<http://docs.ansible.com/intro_configuration.html#hash-behaviour>* in your 
ansible.cfg to *merge*.
Then you're able to write your second file like this:

at_service:
  svc_enabled: yes
  svc_state: started

which will result in (after merging it with the first dict)

Cat_service:
  pkg_name: at
  pkg_state: present
  svc_name: atd
  svc_enabled: yes
  svc_state: started


Am Dienstag, 12. Mai 2015 16:59:44 UTC+2 schrieb John McNulty:
>
>
> Hi, can someone explain this to me please.  
>
> Say I have a dictionary in a role defaults like this ..
>
> at_service:
>   pkg_name: at
>   pkg_state: present
>   svc_name: atd
>   svc_enabled: no
>   svc_state: stopped
>
> I can replace that with a higher priority declaration in group_vars, or a 
> role vars file and change some of the values, e.g.
>
> at_service:
>   pkg_name: at
>   pkg_state: present
>   svc_name: atd
>   svc_enabled: yes
>   svc_state: started
>
> .. and that's fine.   But why can't I just replace the key valuesI want to 
> change, like this ..
>
> at_service.svc_enabled: yes
> at_service.svc_state: started
>
> If I do that the change is just ignored.  Seems I have no option but to 
> replace all of it.
>  
> Thanks,  John
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/65bc3b0e-6d76-423a-ac4e-1d3ee55db093%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to