Ansible Flashcards

1
Q

What does a | do in YAML?

A

Preserves newlines you put into it. So the lines below it will be treated as a block, and keep newlines. All lines of the block need to be indented at same level.

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

What does a > do in YAML?

A

Converts newlines to a single space. So block below it will be one line when processed, but entered on multiple lines. All lines of the block need to be indented at the same level. To get newlines in there just indent another level.

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

What does ‘—’ do in YAML?

A

Marks start of file/directive, can use again to start a new file/directive within same file.

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

What does ‘…’ do in YAML?

A

Marks the end of directive/file without closing the stream.

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

How do you use an anchor?

A

&name to declare it, *name to use it.

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