part 2 Flashcards

1
Q

what is a play ?

A

a play in Ansible is a set of tasks that are run on a group of remote computers. Think of it as a list of instructions that you want to execute on one or more computers to set them up or configure them in a specific way.

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

what is a task?

A

a task is a single action that you want to perform on a remote host. Each task uses a module to execute a specific operation, such as installing a package, copying a file, starting a service, or running a command

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

what is a module?

A

These are the different actions run by tasks.

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

what is the command to check your playbook before running it ?

A

ansible-playbook [file name] - -check

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

what is the command to check for any syntax errors in your playbook?

A
  • -syntax-check
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is a conditional statement in ansible?

A

A conditional statement in Ansible allows you to control whether a task or a set of tasks is executed based on certain conditions. Conditions in Ansible are defined using the when keyword, which evaluates an expression and determines if the task should run.

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