# Ansible 2.9.10 group\_vars and delegate\_to

**URL:** <https://forum.ansible.com/t/ansible-2-9-10-group-vars-and-delegate-to/33385>\
**Category:** Ansible Project\
**Created:** [July 13, 2020, 10:20am UTC](https://forum.ansible.com/t/ansible-2-9-10-group-vars-and-delegate-to/33385 "2020-07-13T10:20:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergej\_Pioch](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@Sergej\_Pioch](https://forum.ansible.com/u/Sergej_Pioch)\
**Post date:** [July 13, 2020, 10:20am UTC](https://forum.ansible.com/t/ansible-2-9-10-group-vars-and-delegate-to/33385/1 "2020-07-13T10:20:40Z")

</div>

So, my playbooks are finally totally messed up after upgrading to Ansible version 2.9.10. I used a task with delegation inside the playbook to get the hostkey of a network device connection through a bastion host. But this does not work anymore. I learned, that this is due to the removement of a bug and should never had been working. Changing the connection for the single task in the playbook to ssh resolves the problem, and tries to delegate the task to the bastion host, however group\_vars get lost by changing the connection type and I am not able to use definitions for the bastion host out of the group\_vars definition.

This is quite bad, for I need more and more group\_variables, for we are working on a customer-based approach, were everything is defined inside a box. So I have three group\_vars files for each customer. One with the general variables, let’s say “cust.yml”:

ansible\_user: theansbibleuser  
bastion\_host: [bastion1.cust.notsoacme.net](http://bastion1.cust.notsoacme.net)  
bastion\_port: 2202  
bastion\_user: thebastionuser  
ansible\_ssh\_common\_args: ‘-o ProxyCommand=“ssh -W %h:%p -q -p {{ bastion\_port }} {{ bastion\_user }}@{{ bastion\_host }}”’  
ansible\_ssh\_private\_key\_file: ‘~/.ssh/id\_cust.rsa’  
customer\_short\_name: CUST  
config\_repo: “{{ config\_repo\_path }}/{{ customer\_short\_name }}”  
snmp\_host: 1.2.3.5  
snmp\_community: myfavouritesnmpv2community  
customer\_nameserver:

- 1.2.3.8
- 1.2.4.8

For setup purposes there are two other group\_vars files, depending on the type of the networkdevice which is to be preprovisioned. For example this one, let’s say “cust\_SGs\_newhosts.yml”:
