I started learning about the possible, but when I ran ansable all-i hosts-mping
, the following error occurred and I couldn't proceed.
vagrant-machine | UNREACHABLE!=>{
"changed"—false,
"msg": "Failed to connect to the host via ssh: connect to host 127.0.0.1 port 22: Connection refused\r\n",
"unreachable"—true
}
vagrant ssh-config
results are as follows
Host default
HostName 127.0.0.1
User vagrant
Port 2200
UserKnownHostsFile/dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile/Users/user/Dev/xxxaxkx/ansable-tutorial/.vagrant/machines/default/virtualbox/private_key
IdentityOnly yes
LogLevel FATAL
Also, the hosts list is defined in the hosts file and written in one line as follows.
vagrant-machine available_host=127.0.0.1 available-port=2200 available_user=vagrant available_ssh_private_key_file=.vagrant/machines/default/virtualbox/private_key
Ansible.cfg is placed in the current directory and described as follows.
[defaults]
host_key_checking=False
I don't see any extra line breaks in particularly.
Please let me know how to solve this problem.
Based on the error content, it appears that an attempt to connect to 127.0.0.1:22 has failed.
Host Listing Description
ansable-port=2200
where
ansable_port=2200
Isn't that a mistake?
(I think I'm trying to connect to the default number 22 because the port number specification is not working)
346 Who developed the "avformat-59.dll" that comes with FFmpeg?
372 Update Flask User Information
342 Memory layouts learned in theory don't work out as expected when actually printed as addresses.
341 Understanding the Meaning of mpm prefork Settings
356 Unity Virtual Stick Does Not Return to Center When You Release Your Finger
© 2023 OneMinuteCode. All rights reserved.