But what's happening here?
Let me just let the cat out of the bag a little bit.
See, I have these line comments here.
Remember, I've got my Ansible password in my vault.
So I want to make sure that Ansible, the server,
knows that password so it can work and operate in the system.
You see here I have my Ansible user defined as an AD service account named tim,
but password may be another issue.
We'll talk more about that in the next lesson.
So in the meantime, is there anything else here outstanding?
Yes, there is.
Let me go back to WSL and let me clear the screen.
And let me go back through my command history because I was playing
around with some of the Ansible CLI commands.
Let me see.
Ansible‑doc is a good one for you to know.
Let me just do ansible‑doc ‑l to do a long listing.
This is a way to get a run of all of your installed roles and modules,
so all the built‑ins and so on.
It's going to take a while.
It's going to generate a lot.
It looks like it's expecting a page at a time or a line at a time.
Yeah, there's a lot of built‑ins when you do a core installation of Ansible.
And that may be something for you to think about before you install,
as a matter of fact.
The question, if you're not going to use AWS and VyOS,
why have those even available on your server?
So, it's kind of a side subject,
but you can actually do a custom install of Ansible.
You don't have to do the kitchen sink or the batteries included approach.
But ansible‑doc is good for discovering modules and so on.
There's a handful of commands that you should know.
They're called utilities.
And for this, I'm going to come out to the Ansible docs.
Hopefully you have docs.ansible.com bookmarked here because
it's a really nice set of online docs,
and it's our canonical source of authority for how to use Ansible.
And we're looking here at a page called Working with command line tools.
So, when I did ansible ‑‑version, I was using the Ansible executable.
But notice that there's another 10 or so of these
Ansible command line interface tools.
We won't use all of them in this course, but we'll use a few.
Ansible‑doc, as I just mentioned,
is like a man page viewer where you can investigate about the modules and roles
that are on your system and you can get examples and so on.
Ansible itself is the executable for the service, but we can interact
with Ansible by doing what are called ad hoc commands.
Ansible Vault is built right into the Ansible project.
So it's not a separate installation.
It comes when you install Ansible.
So these are the core Ansible CLI utilities.
Now let me get out of here.
I'm a bit clumsy in Linux.
I'm the first one to tell you here.
Let me do a Ctrl+C. I'm trying to get my prompt back. And I'm
clumsy simply because I haven't yet been forced to use Linux 24
hours a day for an extended period of time.
I mean, pretty much every day in the past with sys admin, but not like all day,
all day to where you really know it backwards,
forwards, and diagonally.
Okay, well, if I can get my WSL session, I don't think that's happening.
So what I'm going to do to end this demo or just before we end it,
we'll open up one more session.
And what I was saying here is besides ansible‑doc, when
you just run a command or do a ‑‑help,
it'll give you the standard command help here where you can specify
what tool or whatever that you're interested in.
You could try ansible‑doc against a particular module like a built‑in, the
win_ping is a good example. And it'll open up what I think is the Vim editor.
Again, that where I start to get clumsy. But that's just standard Linux stuff
and hopefully comfortable if you've done Linux.
But if not, you're probably thinking, okay.
But anyway, it's a great way to learn more about the system,
the capabilities of the modules that you've got, the command tools themselves.
You can also just do an ansible ‑‑help as well.
Keep that in mind.
Now I want to draw your attention here because when I'm looking up
the docs on a module or a command or whatever,
I'm always interested in the examples. When you're
issuing the ansible command interactively,
that's called using Ansible in ad hoc mode.
All right.
And it happens, you can run ad hoc commands.
The most common one is a ping operation, win_ping,
which you can read about by using ansible‑doc as I just showed you.
It doesn't actually use, ping doesn't use ICMP,
but it's a simple connectivity test.
So here I'm going to use an Ansible CLI command in ad hoc
mode where I'm just, for this purpose,
going to run a module directly. And the module,
what the module does, it's completely up to the author.
Most modules are actually builders that you use in your playbooks. But some
you can use directly, like win_ping is a good example.