Hello Everyone I have an issue with ansible roles running task with defined vars . . .

Al West:
is it defined somewhere else?

Kalesha Gagguturu:
No

Al West:
so you see where you have used app_config_group: "root" - that is an assignment

Kalesha Gagguturu:
So that means we need to get all below details and define it in vars right

      - offering={{ app_tag_offering }}
      - category={{ app_tag_category }}
      - region={{ app_tag_region }}
      - datacenter={{ app_tag_datacenter }}
      - geo={{ app_tag_geo }}
      - availability-zone={{ app_tag_availability_zone }}
      - infrastructure={{ app_tag_infrastructure }}
      - service={{ app_tag_service }}

Al West:
but you have no assignment for app_tag_offering

Al West:
for example in your playbook you have fruit = apple and then in your vars you have apple = fruit

Al West:
you need to have something like app_tag_offering: plain

Kalesha Gagguturu:
So I need to have some value in vars file as
app_tag_offering=*****

Right

Al West:
not equals - use colon :

Kalesha Gagguturu:
Ya

Al West:
for vars

Kalesha Gagguturu:
so I should have all of them defined some where

Kalesha Gagguturu:
app_tag_*: *****

Al West:
yes - if the value is not defined in default vars it will look elsewhere like environment, command line etc.

Kalesha Gagguturu:
Ok, Default vars in roles/app/vars/main.yml right

Al West:
Yes. Refer to this:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#understanding-variable-precedence

Al West:
sorry it is roles/role/defaults/main.yml

Kalesha Gagguturu:
Ok
Thank you

Kalesha Gagguturu:
I am clear now, I will try to figure out with those variables and then will try to check remaining configuration

Blaise Pabon:
Congrats @Kalesha Gagguturu, you have cleared one of the annoyances of Ansible. It’s likely to happen again, but you wll know where to look.