- So, now that we have installed the control node
let's get started with the managed assets
and let's try to understand what is needed
to manage anything with Ansible.
So, here are the requirements.
First, we have seen the control node.
The control node is a node where the Ansible
software is installed.
The control node really isn't a big fancy server.
It's more like an operator work station,
where the operator is using the Ansible commands.
Apart from the Ansible software,
the control node needs Python
and access to the Ansible playbooks
which is typically provided through
Git in a DevOps environment.
Of course it's not necessary to provide playbooks
through Git but if you want to develop playbooks
where everybody can use the same playbooks
throughout the company then really makes sense
providing them through Git.
And that allows you
to work with the same versions throughout.
Then there are the managed nodes
and managed nodes are assets that are managed with Ansible
and that can be computers that are running windows,
or Linux, or Cloud instance,
or virtual machines, or containers
and much more.
In the later lessons of this course,
you will learn how to manage a wide range
of different assets using Ansible.
But, in the beginning we will focus on Linux and Linux only
because that is what Ansible is used for a lot.
And it's a good way to get familiar with Ansible.
So, what are the requirements?
Well first, a remote access
where secure shell is the default
but specific platforms will have other options.
We'll discover these options later.
You need a dedicated user account.
For convenience, you should use
the same user account throughout
but it is possible to have a dedicated user account
on every single machine that you are managing
but that makes it very hard
to manage a wide range of different machines.
So, I would recommend against it.
Also, you need privilege escalation to install software
and change configuration files
and more tasks that are requiring administrative privileges.
You can imagine, if you want to install a package,
normally you need to be ruled.
If you want to install a package through Ansible,
in Ansible you need to be ruled.
And that's what a privilege escalation is all about.
Now, when setting up Ansible,
you need to think about convenience versus security.
To start with, we go for the convenient management.
The convenient management is what makes it easy,
but not necessarily very secure.
Later in this video course,
you will learn how to set up Ansible
for secure management as well,
but it makes sense to have a little bit more knowledge
about Ansible before we can discuss
setting up Ansible in a secure way.
So, what we going to do?
We are going to configure SSH keys
for passwordless connection to remote hosts.
We are going to use passwordless privilege escalation.
And yes, of course, that is very insecure
because anyone who will be able
to sit behind your Ansible control machine
and log in with your account has a root access
to all assets in an IT environment.
That's really not a recommended situation.
And that is why for secure management,
you should go for a different approach.
To start with,
instead of doing the SSH keys for passwordless connection
use minus lowercase K command line option
to prompt for SSH password.
That's not convenient because you will need
to enter the password over and over again
but it will make it secure.
And likewise you would use
minus uppercase K command line option
to prompt for privilege escalation password.
And for convenient and secure management,
you should also consider using Ansible Tower
which allows you to cache passwords
but do have a look at lesson nine in this course,
in which we will separately talk
about setting up Ansible for security.