Any update on this? I need some solution for this ?
On Thu, 1 Aug 2019 at 5:54 PM, Rahul Kumar <[email protected]> wrote:
> HI Ansible Gurus,
> I have a specific snippet of code which i defined in default/main.yaml of
> a role xyz.
>
> sw_yum_repositories:
> - name: sw
> description: Dangerous sw
> file: sw-gw
> baseurl: ""
> enabled: no
> gpgcheck: "{{gpgcheckall | default('yes')}}"
> gpgkey: "{{sw_repository_gpgkey | default(gpgkeys) | default('')}}"
>
> Now I override this variable sw_yum_repostories in my group_vars/all.yml
> in inventory configuration files. Problem here is : i want to take default
> value of gpgkey attribute here from default/main.yml and other attributes i
> am overriding in group_vars/all.yml . But when I try to define
> sw_yum_repostories without gpgkey attribute , it does not take default from
> default/main.yaml (it is part of source code) and whatever we define in
> group_vars/all.yml(overidden ones) , it takes. Since gpgkey is something i
> want to take from default/main.yml(because it is less subject to change)
> rather than overriding and rest all attribute i want to override in
> group_vars/all.yml, how can i achieve this ?
> Rahul
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAGH8rEysumKvsT8iJKU%3DQcZG1PzqEUeq6g-mj8F4wfUmXxUqKQ%40mail.gmail.com.