part 2 Flashcards
what is a play ?
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.
what is a task?
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
what is a module?
These are the different actions run by tasks.
what is the command to check your playbook before running it ?
ansible-playbook [file name] - -check
what is the command to check for any syntax errors in your playbook?
- -syntax-check
what is a conditional statement in ansible?
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.