Ansible Flashcards
What is the name ansible provides for group of tasks to be automatized?
Playbook
What is the name ansible provides for a number of tasks inside the playbook?
Play
Ex: - name: Install Nginx web server
hosts: web_servers
tasks:
- name: Install Nginx package
become: yes
yum:
name: nginx
state: present
What is the name Ansible gives for remote reusable units of code?
Modules (e.g. yum, npm)
which command runs an ansible yml?
ansible-playbook
which command downloads and runs a remote ansible yml?
ansible-pull
which Ansible command provides feedback on your playbooks before you run them?
ansible-lint
How Ansibles scripts are configured?
via yml files, no code required (agentless)
What is a Task?
Smallest unit of action. Plays consist in multiple tasks
What Ansible Galaxy is for?
Remote repo to share playbooks and modules
What are Roles for?
Are used to save and organize playbooks and allow you to share and reuse playbooks
What does the ‘masked’ property does in a task? Ex:
- systemd
name: nginx
masked: yes
Prevents a service to be used
What are the possible options for the state attribute?
started, stopped, restarted, reloaded, enabled, disabled, masked, and unmasked.
What language ansible uses for Templates? PEGADINHA
Jinja2
Ansible can use RBAC for authorization
True