Ansible Flashcards

1
Q

What is the name ansible provides for group of tasks to be automatized?

A

Playbook

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

What is the name ansible provides for a number of tasks inside the playbook?

A

Play
Ex: - name: Install Nginx web server
hosts: web_servers
tasks:
- name: Install Nginx package
become: yes
yum:
name: nginx
state: present

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

What is the name Ansible gives for remote reusable units of code?

A

Modules (e.g. yum, npm)

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

which command runs an ansible yml?

A

ansible-playbook

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

which command downloads and runs a remote ansible yml?

A

ansible-pull

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

which Ansible command provides feedback on your playbooks before you run them?

A

ansible-lint

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

How Ansibles scripts are configured?

A

via yml files, no code required (agentless)

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

What is a Task?

A

Smallest unit of action. Plays consist in multiple tasks

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

What Ansible Galaxy is for?

A

Remote repo to share playbooks and modules

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

What are Roles for?

A

Are used to save and organize playbooks and allow you to share and reuse playbooks

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

What does the ‘masked’ property does in a task? Ex:
- systemd
name: nginx
masked: yes

A

Prevents a service to be used

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

What are the possible options for the state attribute?

A

started, stopped, restarted, reloaded, enabled, disabled, masked, and unmasked.

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

What language ansible uses for Templates? PEGADINHA

A

Jinja2

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

Ansible can use RBAC for authorization

A

True

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