# Starting all over

**URL:** <https://forum.ansible.com/t/starting-all-over/37084>\
**Category:** Ansible Developer\
**Tags:** rhel\
**Created:** [September 10, 2022, 6:48pm UTC](https://forum.ansible.com/t/starting-all-over/37084 "2022-09-10T18:48:07Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimndskier](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dimndskier/32/773_2.png) [@dimndskier](https://forum.ansible.com/u/dimndskier)\
**Post date:** [September 10, 2022, 6:48pm UTC](https://forum.ansible.com/t/starting-all-over/37084/1 "2022-09-10T18:48:07Z")

</div>

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](https://us1.discourse-cdn.com/ansible/original/2X/2/2da62434135ecc72f409764de923ff66631cfc3a.jpeg)

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.

---

<div class="post-metadata">

**Author:** ![Andrew\_Latham](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrew\_Latham](https://forum.ansible.com/u/Andrew_Latham)\
**Post date:** [September 12, 2022, 4:32pm UTC](https://forum.ansible.com/t/starting-all-over/37084/2 "2022-09-12T16:32:29Z")

</div>

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

> **(attachments)**
>
> ![ansible-ping-problem.PNG.jpg](https://us1.discourse-cdn.com/ansible/original/2X/2/2da62434135ecc72f409764de923ff66631cfc3a.jpeg)

---

<div class="post-metadata">

**Author:** ![Tej](https://avatars.discourse-cdn.com/v4/letter/t/48db29/32.png) [@Tej](https://forum.ansible.com/u/Tej)\
**Post date:** [September 12, 2022, 4:37pm UTC](https://forum.ansible.com/t/starting-all-over/37084/3 "2022-09-12T16:37:47Z")

</div>

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?

> **(attachments)**
>
> ![ansible-ping-problem.PNG.jpg](https://us1.discourse-cdn.com/ansible/original/2X/2/2da62434135ecc72f409764de923ff66631cfc3a.jpeg)

---

<div class="post-metadata">

**Author:** ![Andrew\_Latham](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrew\_Latham](https://forum.ansible.com/u/Andrew_Latham)\
**Post date:** [September 12, 2022, 4:58pm UTC](https://forum.ansible.com/t/starting-all-over/37084/4 "2022-09-12T16:58:57Z")

</div>

Please keep emails on the list.

If `ssh admin@a8-ansi-w001 date` works, great, that removes a bundle of things.

A great tool to use for testing is RAW aka [https://docs.ansible.com/ansible/latest/collections/ansible/builtin/raw\_module.html](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/raw_module.html)

so `ansible -u admin -m raw -a date a8-ansi-w001` would use the admin user and run a command without python of date on host a8-ansi-w001

> **(attachments)**
>
> ![ansible-ping-problem.PNG.jpg](https://us1.discourse-cdn.com/ansible/original/2X/2/2da62434135ecc72f409764de923ff66631cfc3a.jpeg)

---

<div class="post-metadata">

**Author:** ![dimndskier](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dimndskier/32/773_2.png) [@dimndskier](https://forum.ansible.com/u/dimndskier)\
**Post date:** [September 12, 2022, 5:28pm UTC](https://forum.ansible.com/t/starting-all-over/37084/5 "2022-09-12T17:28:09Z")

</div>

Andrew, thanks for that set of details.

I got this:

 ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/6/63706be9858cb3ff89aef0ac822baff0b7e4e4ab.png)

So that is good. Am I supposed make a change in my “basically empty” ansible.cfg to accommodate using the **admin** account by default?

> **(attachments)**
>
> ![ansible-ping-problem.PNG.jpg](https://us1.discourse-cdn.com/ansible/original/2X/2/2da62434135ecc72f409764de923ff66631cfc3a.jpeg)

---

<div class="post-metadata">

**Author:** ![Andrew\_Latham](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrew\_Latham](https://forum.ansible.com/u/Andrew_Latham)\
**Post date:** [September 12, 2022, 5:38pm UTC](https://forum.ansible.com/t/starting-all-over/37084/6 "2022-09-12T17:38:57Z")

</div>

Warron

1. Inventory can have ansible\_user=admin (search for user on [https://docs.ansible.com/ansible/latest/user\_guide/intro\_inventory.html](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html))
2. Your most recent example does not need the -u admin as it is the running user [https://docs.ansible.com/ansible/latest/reference\_appendices/config.html#default-remote-user](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-remote-user)
3. Your target system a8-ansi-w001 does not have python installed or in path. You will need to install python on the target system.

> **(attachments)**
>
> ![ansible-ping-problem.PNG.jpg](https://us1.discourse-cdn.com/ansible/original/2X/2/2da62434135ecc72f409764de923ff66631cfc3a.jpeg)  
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/6/63706be9858cb3ff89aef0ac822baff0b7e4e4ab.png)

---

<div class="post-metadata">

**Author:** ![dimndskier](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dimndskier/32/773_2.png) [@dimndskier](https://forum.ansible.com/u/dimndskier)\
**Post date:** [September 12, 2022, 8:35pm UTC](https://forum.ansible.com/t/starting-all-over/37084/7 "2022-09-12T20:35:50Z")

</div>

Awesome, thanks! I will address getting Python installed on the target system, or into the PATH variable.

I addressed the setting \*\*remote\_user=\*\ ***admin** because that’s the user account I built for the expressed purpose of Ansible interaction. For context I used a copy of ansible.cfg.completed\_disabled **and unhashed the line.** The file was created based on what you see below. I did not have to do anything about the Python and PATH.

**Andrew,**  
I had generated 4 different ansbile.cfg files in a subdirectory to keep them “out of the way”

1. ansible-config init -t all \> ansible.cfg. **complete\_enabled**

2. ansible-config init --disabled -t all \> ansible.cfg. **complete\_disabled**

3. ansible-config init \> ansible.cfg. **_example_\_enabled**

4. ansible-confg init --disabled \> ansible.cfg. **_example_\_disabled**

There is no man page for ansible-config that explains the switch options “–disabled” or “-t all.” At least not from the RPMs from ALMA Linux. Is it anywhere else?

I executed the command: **ansible -m ping a8-ansi-w001** without issue; however, I do get a Warning too.

The Warning that I get looks like this:

 ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/7/7ccbe792b61c5e4cd1e7a259f6356e2151f6d9d2.png)

I would like to address the warning but not sure what I need to do from here. Thank you for all of your help.

> **(attachments)**
>
> ![ansible-ping-problem.PNG.jpg](https://us1.discourse-cdn.com/ansible/original/2X/2/2da62434135ecc72f409764de923ff66631cfc3a.jpeg)  
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/6/63706be9858cb3ff89aef0ac822baff0b7e4e4ab.png)

---

<div class="post-metadata">

**Author:** ![Andrew\_Latham](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrew\_Latham](https://forum.ansible.com/u/Andrew_Latham)\
**Post date:** [September 12, 2022, 8:59pm UTC](https://forum.ansible.com/t/starting-all-over/37084/8 "2022-09-12T20:59:32Z")

</div>

1. I have not used ALMA Linux but in Debian the secret sauce is [https://packages.debian.org/unstable/python-is-python3](https://packages.debian.org/unstable/python-is-python3) for the warning
2. Search order for ansible.cfg is ANSIBLE\_CONFIG (env), current directory, ~/.ansible.cfg, and lastly /etc/ansible/ansible.cfg
3. ansible-config -h does not list all the options, I am reading issues to see if this is an issue for now you can read [https://docs.ansible.com/ansible/latest/cli/ansible-config.html#ansible-config](https://docs.ansible.com/ansible/latest/cli/ansible-config.html#ansible-config)

> **(attachments)**
>
> ![ansible-ping-problem.PNG.jpg](https://us1.discourse-cdn.com/ansible/original/2X/2/2da62434135ecc72f409764de923ff66631cfc3a.jpeg)  
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/6/63706be9858cb3ff89aef0ac822baff0b7e4e4ab.png)  
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/7/7ccbe792b61c5e4cd1e7a259f6356e2151f6d9d2.png)

---

<div class="post-metadata">

**Author:** ![dimndskier](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dimndskier/32/773_2.png) [@dimndskier](https://forum.ansible.com/u/dimndskier)\
**Post date:** [September 12, 2022, 10:10pm UTC](https://forum.ansible.com/t/starting-all-over/37084/9 "2022-09-12T22:10:02Z")

</div>

Andrew, I truly appreciate your patience with me as I am learning quite a lot from you today.

I am aware of the order of search in which to find the ansible.cfg (and variables), so I believe I am good there.  
Thank you for the Ansible Docs page about **ansible-config** specifically, I never saw that, probably because the documentation is so voluminous.

As for addressing the warning, I am still a little confused. I looked at the link you provided for the Debian Secret Sauce as it were.

Is the warning because Ansible is not finding a “/usr/bin/Python3.6” specifically, as opposed to the “/bin/Python3.6”? Is that the problem I am dealing with?

I set **action\_warnings=False** in my **ansible.cfg** (the one I mentioned previously in this thread), so now I get this instead when I execute “ **ansible -m ping a8-ansi-w001** ”:

 ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/e/ef1e108937567a9c5064fee9567fe22fa5cc41b5.png)

I still want to address the Warning, but do it properly.

> **(attachments)**
>
> ![ansible-ping-problem.PNG.jpg](https://us1.discourse-cdn.com/ansible/original/2X/2/2da62434135ecc72f409764de923ff66631cfc3a.jpeg)  
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/6/63706be9858cb3ff89aef0ac822baff0b7e4e4ab.png)  
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/7/7ccbe792b61c5e4cd1e7a259f6356e2151f6d9d2.png)

---

<div class="post-metadata">

**Author:** ![Andrew\_Latham](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrew\_Latham](https://forum.ansible.com/u/Andrew_Latham)\
**Post date:** [September 12, 2022, 10:27pm UTC](https://forum.ansible.com/t/starting-all-over/37084/10 "2022-09-12T22:27:00Z")

</div>

Warron, the warning is about Python not being at /usr/bin/python

> **(attachments)**
>
> ![ansible-ping-problem.PNG.jpg](https://us1.discourse-cdn.com/ansible/original/2X/2/2da62434135ecc72f409764de923ff66631cfc3a.jpeg)  
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/6/63706be9858cb3ff89aef0ac822baff0b7e4e4ab.png)  
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/7/7ccbe792b61c5e4cd1e7a259f6356e2151f6d9d2.png)  
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/e/ef1e108937567a9c5064fee9567fe22fa5cc41b5.png)

---

<div class="post-metadata">

**Author:** ![dimndskier](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dimndskier/32/773_2.png) [@dimndskier](https://forum.ansible.com/u/dimndskier)\
**Post date:** [September 12, 2022, 10:38pm UTC](https://forum.ansible.com/t/starting-all-over/37084/11 "2022-09-12T22:38:01Z")

</div>

Got it.

> **(attachments)**
>
> ![ansible-ping-problem.PNG.jpg](https://us1.discourse-cdn.com/ansible/original/2X/2/2da62434135ecc72f409764de923ff66631cfc3a.jpeg)  
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/6/63706be9858cb3ff89aef0ac822baff0b7e4e4ab.png)  
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/7/7ccbe792b61c5e4cd1e7a259f6356e2151f6d9d2.png)  
> ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/e/ef1e108937567a9c5064fee9567fe22fa5cc41b5.png)
