Introduction Flashcards
What is the model that the ansible playbooks are written in?
All ansible playbooks are written in YAML
What is dictionary in YAML?
Set of properties grouped together in an item. Eg.
Banana:
calories: 90
fat: 0.4 g
carbs: 8 g
Orange:
calories: 94
fat: 0.6 g
carbs: 9 g
How do you write Arrays/List in YAML?
Fruits:
- Orange
- Apple
- Banana
Vegetables:
- Carrot
- Cauliflower
- Tomato
What to use in YAML, if you want to store multiple items of the same type of object? like say Blue swift, Red Swift, Grey Swift?
A List
- blue swift
- red swift
- grey swift
Difference between dictionary and list
Dictionary is an unordered collection but a list is a ordered collection
How do you comment in YAML?
Use #