Yes. Question is if it would be possible to write a module which would be able to do this.
merge_val: orig=at_service.svc_state value=started P.S. I have had problems with this, too. Only solution with which I was able to come up was using filters to create new variable which is then later used. But I'm not very happy with that. On Tuesday, May 12, 2015 at 5:19:32 PM UTC+2, John McNulty wrote: > > > > So you're saying it's not possible to replace the value of a dictionary > key without changing hash_behaviour to "merge"? > > > On Tuesday, 12 May 2015 16:06:35 UTC+1, Pascal Mathis wrote: >> >> 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 the following dictionary, after merging it with the >> first one: >> >> at_service: >> pkg_name: at >> pkg_state: present >> svc_name: atd >> svc_enabled: yes >> svc_state: started >> >> Not all people like that setting though, so keep that in mind. >> > -- 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/c53ffa1e-0c11-4c6c-9f45-9fc49ef5183b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
