cancel
Showing results for 
Search instead for 
Did you mean: 
chis0
Mission Specialist
Mission Specialist
  • 55 Views

Lab chapter 4.7

Jump to solution

Hello,

There is nothing wrong with the lab - I am looking to understand why the vars.yml file has this specific syntax for web_config_files:

Screenshot 2026-01-22 092926.png

Is there any documentation I can read to understand why it goes:

- src:
dest:

Why is 'src' appear like a list with the dash in front of it - but 'dest' is not?

0 Kudos
1 Solution

Accepted Solutions
ARoumiantsev
Flight Engineer
Flight Engineer
  • 38 Views

Hello @chis0 

It is a list of dictionaries at top level of your example. It is dictionary with two keys ( src, dest ) at low level.

You can find original info about list and  dictionary in chapter 2 of student guide. Look https://www.redhat.com/en/blog/ansible-lists-dictionaries-yaml for example for additional info

Good luck

 

View solution in original post

2 Replies
ARoumiantsev
Flight Engineer
Flight Engineer
  • 39 Views

Hello @chis0 

It is a list of dictionaries at top level of your example. It is dictionary with two keys ( src, dest ) at low level.

You can find original info about list and  dictionary in chapter 2 of student guide. Look https://www.redhat.com/en/blog/ansible-lists-dictionaries-yaml for example for additional info

Good luck

 

chis0
Mission Specialist
Mission Specialist
  • 35 Views

Hi ,

Thanks for providing this page, it is useful.

It makes sense. I am used to a language like PHP or Java and somehow I was forgetting to think like a programmer.

I see now it loops over the dictionary 'web_config_files' that has key(src),value(dest) pairs.

Thank you.

0 Kudos
Join the discussion
You must log in to join this conversation.