O
O
Oleg Andrukhovich2021-04-29 09:45:41
Red Hat Enterprise Linux
Oleg Andrukhovich, 2021-04-29 09:45:41

Why can't ansible see the hosts?

Tell me please.
Faced the following problem.
Freshly rolled ansible (the hosts file has been moved to another directory (the original is still there in /etc/), registered all the addresses). An ssh-key has been generated and distributed to all managed hosts. On ssh with a key comes without problems. And the problem is the following -
when you try "ansible rhel_server -a "cat /etc/os-release"" - out of three hosts, only one is available.
if done on any machine, from inaccessible "ansible ip_host -a "cat /etc/os-release"" - everything works and responds.

What could be the problem?

in ansible.cfg
inventory = ~/.config/ansible/hosts
uncommented

~/.

ip_hsot3

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MaxKozlov, 2021-04-29
@RudyJam1

What does "only one available" mean? does not connect, is not visible in the list or what?
cat ~/.config/ansible/hosts
shows content?
ansible --list-hosts "*" -vvv
shows your hosts ? Do you have your file in the debug comments?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question