Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions 2022/Days/day64.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,28 @@ However, remember I said you will need to have SSH available to enable Ansible t
![](Images/Day64_config6.png)

I have now also started adding some additional hosts to our inventory, another name for this file as this is where you are going to define all of your devices, could be network devices, switches and routers for example also would be added here and grouped. In our hosts file though I have also added my credentials for accessing the Linux group of systems.
Troubleshooting: SSH Host Key Checking Error
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The troubleshooting section needs proper markdown formatting:

  1. Add a blank line between line 60 and the new section
  2. Format the title as a heading (e.g., ### Troubleshooting: SSH Host Key Checking Error)

This will ensure consistency with the rest of the document structure and improve readability.

Suggested change
Troubleshooting: SSH Host Key Checking Error
### Troubleshooting: SSH Host Key Checking Error

Copilot uses AI. Check for mistakes.
If Ansible fails to connect and you see an error like:

`Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar error: "a SSH" should be "an SSH" since SSH is pronounced with a vowel sound (ess-ess-aitch).

Suggested change
`Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.
`Using an SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.

Copilot uses AI. Check for mistakes.
Please add this host's fingerprint to your known_hosts file to manage this host.`

This happens often in lab environments such as Vagrant where host keys frequently change.
To bypass host key checking temporarily (for testing only), run:

`export ANSIBLE_HOST_KEY_CHECKING=False`

![](Images/Day64_config7.png)

Now if we run `ansible Linux -m ping` we get success as per below.
Now if we run `ansible linux -m ping` we get success as per below.

![](Images/Day64_config8.png)

We then have the node requirements, these are the target systems you wish to automate the configuration on. We are not installing anything for Ansible on these (I mean we might be installing software but there is no client from Ansible we need) Ansible will make a connection over SSH and send anything over SFTP. (If you so desire though and you have SSH configured you could use SCP vs SFTP.)

### Ansible Commands

You saw that we were able to run `ansible Linux -m ping` against our Linux machine and get a response, basically, with Ansible we can run many ad-hoc commands. But you can run this against a group of systems and get that information back. [ad hoc commands](https://docs.ansible.com/ansible/latest/user_guide/intro_adhoc.html)
You saw that we were able to run `ansible linux -m ping` against our Linux machine and get a response, basically, with Ansible we can run many ad-hoc commands. But you can run this against a group of systems and get that information back. [ad hoc commands](https://docs.ansible.com/ansible/latest/user_guide/intro_adhoc.html)

If you find yourself repeating commands or even worse you are having to log into individual systems to run these commands then Ansible can help there. For example, the simple command below would give us the output of all the operating system details for all of the systems we add to our Linux group.
`ansible linux -a "cat /etc/os-release"`
Expand Down