Section One Flashcards

1
Q

Why use Ansible instead of Shell scripts

A

shell scripts can’t be used on a wide range of different devices

It’s difficult to write shell scripts that produce the same results in every situation

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

What is DevOps?

A

Development Operator
coding - develop and review code

building - Changing source code and convert to a working app

testing

packaging - Delivering code to end users by bundling it into packages and offering in a repo

releasing - Approving, managing, and automating new software release

configuring - Managing the infrastructure to support the new code

monitoring - Watching app performance and the experience of end users

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

What is infrastructure as code?
What is desired state?
What is CVS?

A

Machine-readable code (automation language) describes the state the infrastructure needs to be in (desired state)
The code is then applied to put it in the desired state.
- Automated
- Repeatable (test, dev, prod)
- version-controlled

The machine code file should be managed like software using version control or CVS (Concurrent Version System)

CVS is for file version control

Infrastructure as code - basically setting up your infrastructure (like your test server) to setup your environment to have everything it needs to run your application code.

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

In terms of Infrastructure as code(IaC), what are the different models, and how do they operate?

Which of these is Ansible?

A

Imperative - like running a script to setup your server/network/system to have it configured to the desired state. If a step you have to do error handling if there is a problem on certain servers. HOW TO APPROACH - you tell the server how to reach the desired state.

Declarative - You define what you want for the end result and let something else handle the config for you. This works right out of the box for everything and it’s easier. This gives you the exact same infrastructure no matter how many times it runs. WHAT TO DO APPROACH - I want this user created, I want this software downloaded, but you let ansible do the backend work.

Imperative - scripting
Declarative - ansible

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

What are other configuration management solutions/automation solutions other than Ansible

What makes Ansible Different?

A

Chef, Puppet, SaltStack

Ansible is agentless, uses simple code (YAML)
Ansible PUSHES data to it’s servers while the other PULL data from servers that need to run an agent.

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

What are the two node roles in Ansible

A

Control Node - Has to be run on Linux

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

What are the ways that Ansible accesses Linux and Windows and Network Nodes?

A

Linux - ssh
Windows - WinRM (Windows Remote Management)
Network - ssh or API

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

Anisble playbooks should be developed to be idempotent. What does this mean

A

Idempotent - They should always produce the same result.
They should also be self-containing, not relying on other playbooks.

Performing the operation several times will still render the same result. If you run a playbook to install httpd multiple times, you won’t get multiple httpd downloads, you’ll just have httpd on your system.

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

What are the two options you can use to deploy ansible and it’s playbooks?

A

Ansible Engine - command line
Ansible Tower - GUI

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

What are the Ansible Way’s rules?

A

Keep it simple

Make it readable

Use a declarative approach - It’s all about the ‘desired state’. Basically just use Ansible to make the current stat match the desired state

Use specific solutions - Use module more than shell commands in your playbooks

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

What are the three common use cases for Ansible

A

Configuration Managment - create users, modify files, add users ,etc

Provisioning - Deploy and install systems. It can do this for VM files but not bare metal using PXE-boot and kickstart. It can work with other tools that do this though. Pushed to the managed machine and started from there.

CI/CD - Continuous Integration Continuous Delivery - This makes sure the source code can easily be updated and developed for easy provisioned(pushed and started) version of the application. It can’t do this all on it’s own though.

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

What is needed of the managed node in order for you to run playbooks on it

A

They just need to have ssh or WinRM access given to the Controll Node

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

What are the requirements for the Control Node?

A

Python 3 or higher
An ssh client
Access to Ansible Repository
Dedicated user account that is configured with ssh and sudo permissions on the managed hosts

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