Introduction Flashcards

1
Q

What is the model that the ansible playbooks are written in?

A

All ansible playbooks are written in YAML

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is dictionary in YAML?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you write Arrays/List in YAML?

A

Fruits:
- Orange
- Apple
- Banana
Vegetables:
- Carrot
- Cauliflower
- Tomato

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

A List

  • blue swift
  • red swift
  • grey swift
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Difference between dictionary and list

A

Dictionary is an unordered collection but a list is a ordered collection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you comment in YAML?

A

Use #

How well did you know this?
1
Not at all
2
3
4
5
Perfectly