adamwoolhether / NetBox4CentOS8

Quick and easy install playbook for NetBox on CentOS 8
5 stars 5 forks source link

msg: 'Failed to connect to the host via ssh: root@192.168.200.251 #2

Closed sSiDs closed 3 years ago

sSiDs commented 3 years ago

`TASK [CLONE GIT REPO] ** fatal: [192.168.200.251]: UNREACHABLE! => changed=false msg: 'Failed to connect to the host via ssh: root@192.168.200.251: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).' unreachable: true

PLAY RECAP ***** 192.168.200.251 : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
localhost : ok=10 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 `

sSiDs commented 3 years ago

i am a new_) so don't punch me )

adamwoolhether commented 3 years ago

@sSiDs No worries, looks like a key problem.

Have you copies your controller's ssh-keys with ssh-copy-id ? Are you able to ssh into the machine manually?

sSiDs commented 3 years ago

sorry) forgot to add "connection:local" :)

sSiDs commented 3 years ago

now installation almost completes....but at the end it says that python librari is missing TASK [CONFIURE SELINUX TO ALLOW HTTPD TRAFFIC] ***** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'semanage' fatal: [localhost]: FAILED! => changed=false msg: Failed to import the required Python library (libsemanage-python) on netbox's Python /usr/bin/python3.6. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter

PLAY RECAP ***** localhost : ok=35 changed=18 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0

[root@netbox opt]# [root@netbox opt]# rpm -q libsemanage-python package libsemanage-python is not installed [root@netbox opt]#

sSiDs commented 3 years ago

i am installing Netbox on VMWARE host CentOS 8 [root@netbox opt]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 8.2.2004 (Core) Release: 8.2.2004 Codename: Core

sSiDs commented 3 years ago

i have googled it) dnf install policycoreutils-python-utils and will try again! with [root@netbox opt]# ansible-playbook installNB.yml -vvv to log more detailed output if it fails again.

sSiDs commented 3 years ago

TASK [NETBOX SETUP COMPLETE]! i am appreciate for your playbook! it is awesome!

adamwoolhether commented 3 years ago

Glad to hear it's helpful. :)

I should include to failure-handling for missing packages. Thanks for sharing!