Session 9

5.0(1)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/48

flashcard set

Earn XP

Description and Tags

IaaS Automation: Ansible

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

49 Terms

1
New cards
Is the name given to the general process of managing a changing software system
What is Configuration Management?
2
New cards
Support the system integration process so that all developers can:
- access the project code and documents in a controlled way
- find out what changes have been made
- compile and link components to create a system
The aim of configuration management is to
3
New cards
(Continuous Integration/Continuous Delivery)
What does CI/CD stands for?
4
New cards
To be fully automated, with each run fully logged and visible to the entire team
The main goal of the CI/CD processes is
5
New cards
The bits and pieces of a microservices-based application to evolve and mature individually, reducing blockers.
CI/CD allows
6
New cards
- continuous integration
- continuous delivery
- continuous deployment
The CI/CD pipeline involves
7
New cards
Cloud-native companies adopted a fairly extreme approach of
continuously improving their online services by having a fully automated process for building, testing, and deploying new code
8
New cards
The pipeline run is triggered by
a source code repository
9
New cards
The Build stage on CI/CD includes
The compilation of programs written in languages such as Java, C/C++, and Go
10
New cards
In the CI/CD Test stage, automated tests are run in order to
Validate the code and the application behavior.
11
New cards
Why is the Test stage an important stage?
Because it acts as a “safety net” to prevent easily reproducible bugs from being introduced.
12
New cards
Depending on the size and complexity of the project, the Test phase can last from
seconds to hours
13
New cards
What is Ansible?
is an open-source IT automation/ a configuration management tool
14
New cards
What does Ansible automates?
- Application deployment
- Cloud provisioning
- Configuration management
- configuration of multiple servers/networks/clouds
15
New cards
Who created Ansible?
Michael DeHaan
16
New cards
In witch year was ansible created?
2012
17
New cards
In witch language is Ansible written?
Python and Powershell
18
New cards
How does Ansible automates configuration?
By the use of Ansible playbooks
19
New cards
What are playbooks?
Ansible configuration, deployment and orchestration language, written in YAML
20
New cards
The ansible inventory file defines
The hosts and groups of hosts upon which commands, modules, and tasks in a playbook operate
21
New cards
What does Agentless means?
No client / server concept
22
New cards
What are some ansible features?
- Simple to setup
- Declarative
- Idempoten
23
New cards
What does declarative means?
that a playbook does not require any knowledge of the current state of the server, only its desirable state
24
New cards
What does idempotent means?
That running the same "playbook" multiple times producces the same output/configuraiton
25
New cards
ssh-keygen is used to
Generate private and public keys on the control node
26
New cards
What command can you use to send public key to the ~/.ssh/authorized_keys file in the target node user home directory?
ssh-copy-id user@remotehost
27
New cards
What is the ansible command?
The main Ansible command to run ad-hoc commands on remote nodes
28
New cards
What is the ansible-playbook command?
A command to run playbooks
29
New cards
What is the ansible-pull command?
The main Ansible pull command
30
New cards
What is the ansible-doc command?
The ansible documentation program
31
New cards
What is the ansible-galaxy command?
An ansible Galaxy interaction program
32
New cards
What is the ansible-vault command?
The Ansible password vault
33
New cards
What is the ansible-inventory command?
A command to display or dump the inventory
34
New cards
What is the ansible-console command?
The Ansible interactive console against a chosen inventory
35
New cards
What is the ansible-config command?
A command to view, edit and manage configuration
36
New cards
How do you Transfer a file directly to multiple servers with Ansible?
ansible -i hosts local -m copy -a "src=/etc/hosts dest=/tmp/hosts"
37
New cards
How do you change ownership and permissions on files with Ansible?
ansible -i hosts local -m file -a "dest=/ansible/a.txt mode=600 owner=instructor group=instructor"
38
New cards
How do you delete directories (recursively) and delete files with Ansible?
ansible -i hosts local -m file -a "dest=/path/to/dir state=absent“
39
New cards
How do you ensure a package is installed, but don’t update it with ansible?
ansible -i hosts local -m apt -a "name=acme state=present"
40
New cards
You use -m on ansible to
Select an Ansible module to run the command against
41
New cards
you use -a on ansible to
provide options to the selected module
42
New cards
How do you ensure a package is at the latest version with ansible?
ansible -i hosts local -m apt -a "name=acme state=latest"
43
New cards
How do you ensure a package is not installed with ansible?
ansible -i hosts local -m apt -a "name=acme state=absent"
44
New cards
How do you create or manipulate an existing user account with ansible?
ansible all -m user -a "name=student password="
45
New cards
How do you gather discovered vars about remote hosts with ansible?
ansible all -m setup
46
New cards
How do you ensure a service is started on all web servers with ansible?
ansible -i hosts webservers -m service -a "name=httpd state=started"
47
New cards
How do you restart a service on all web servers with ansible?
ansible webservers -m service -a "name=httpd state=restarted"
48
New cards
How do you ensure a service is stopped with ansible?
ansible webservers -m service -a "name=httpd state=stopped“
49
New cards
How do you create a directory with ansible?
ansible local -i hosts -m ansible.builtin.file -a "path=/tmp/testfile1 state=touch mode=700"