Starting all over

23 views
Skip to first unread message

Warron French

unread,
Sep 10, 2022, 2:48:07 PM9/10/22
to Ansible Development
Hello all,
I am running an Ansible Control Node on an ALMA Linux 8.6 (RHEL variant), and have setup four Ansible Managed Nodes also running ALMA Linux 8.6.

The implementation of Ansible is via an RPM from the ALMA Linux repositories; specifically the ansible-core-2.12.2-4.el8_6.x86_64.

I added my hosts to two ini-sections inside the RPM-provided /etc/ansible/hosts file.
[webservers]
a8-ansi-w001
a8-ansi-w002

[databases]
a8-ansi-d001
a8-ansi-d002

I have distributed the SSH RSA key to all of the managed nodes from the control node, from an account that I created on both types of nodes (control and managed).  The account name I created was called "admin".

I have never written an ansible playbook successfully because I never got started, and started this all months ago, and decided to start from scratch with the latest in changes of OS and Ansible as a whole.

Anyway, The Problem, is that I executed the following command as admin on the Control Node
> ansible  -m  ping  a8-ansi-w001

And I do not see a successful response.  I see the following instead:
ansible-ping-problem.PNG

As you can tell the host is reachable with a standard/OS ping, and accessible via SSH using the root account.

I do want to setup my environment to use the admin account to SSH over and then sudo (become?) when writing future plays/playbooks/roles.

The factory (RPM) default /etc/ansible/ansible.cfg file has nothing unhashed in it.  All lines are hashed.

Any and all guidance and what I need to do with this environment to get it functional would be much appreciated.



Andrew Latham

unread,
Sep 12, 2022, 12:32:45 PM9/12/22
to Warron French, Ansible Development
1. Maybe don't run Ansible as root (just a good pattern to encourage early on)
2. `ansible -u admin -m ping a8-ansi-w001`
3. `ssh admin@a8-ansi-w001 date`
4. Many distros disable ssh to the root user by default so beware of this
5. Use -vvv or -vvvv to see more info from ansible

--
You received this message because you are subscribed to the Google Groups "Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/40519234-b326-4dc4-92a5-d4b5841fe24an%40googlegroups.com.


--
- Andrew "lathama" Latham -

SAITEJA SOMISETTY

unread,
Sep 12, 2022, 12:38:05 PM9/12/22
to Andrew Latham, Warron French, Ansible Development
I got some authorization errpr  how to troubleshoot in ansible 

If I need to convert Json data to CSV can you help me with that?


Reply all
Reply to author
Forward
0 new messages