# Using ansible when fastfetch is activate in $HOME/.bashrc (neofetch clone)

**URL:** <https://forum.ansible.com/t/using-ansible-when-fastfetch-is-activate-in-home-bashrc-neofetch-clone/7120>\
**Category:** Get Help\
**Created:** [July 8, 2024, 6:44am UTC](https://forum.ansible.com/t/using-ansible-when-fastfetch-is-activate-in-home-bashrc-neofetch-clone/7120 "2024-07-08T06:44:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![didier](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/didier/32/4125_2.png) [@didier](https://forum.ansible.com/u/didier)\
**Post date:** [July 8, 2024, 6:44am UTC](https://forum.ansible.com/t/using-ansible-when-fastfetch-is-activate-in-home-bashrc-neofetch-clone/7120/1 "2024-07-08T06:44:16Z")

</div>

So first, ansible works fine without the following line in my $HOME/.bashrc

```auto
fastfetch

```

fastfetch is a tool for fetching system information and displaying it prettily in console output.  
but when i added fastfetch in my $HOME/.bashrc, Some warnings are printed

```auto
# [WARNING]: Unhandled error in Python interpreter discovery for host localhost: unexpected output from Python interpreter discovery
# [WARNING]: sftp transfer mechanism failed on [localhost]. Use ANSIBLE_DEBUG=1 to see detailed information
# [WARNING]: scp transfer mechanism failed on [localhost]. Use ANSIBLE_DEBUG=1 to see detailed information
# [WARNING]: Platform unknown on host localhost is using the discovered Python interpreter at /usr/bin/python, but future installation of another Python interpreter could change the meaning of that path. See
# https://docs.ansible.com/ansible-core/2.16/reference_appendices/interpreter_discovery.html for more information.

```

I fix the last warning with a localhost.yml in host\_vars which contains

```auto
ansible_python_interpreter: /usr/bin/python3

```

and then I ran ansible with debug mode

```auto
 21249 1720419704.50439: variable 'ansible_python_interpreter' from source: playbook host_vars for 'localhost'
 21249 1720419704.50465: transferring module to remote /home/dfabert/.ansible/tmp/ansible-tmp-1720419704.3633587-21249-201536959117241/AnsiballZ_discord.py
 21249 1720419704.50536: Sending initial data
 21249 1720419704.50539: Sent initial data (172 bytes)
 21249 1720419704.57028: stderr chunk (state=3):
>>>Received message too long 538976288
Ensure the remote shell produces no output for non-interactive sessions.
<<<
 21249 1720419704.57038: stdout chunk (state=3):
>>><<<
[WARNING]: sftp transfer mechanism failed on [localhost]. Use ANSIBLE_DEBUG=1 to see detailed information

```

Is someone already fix the others warnings ?

Thanks

---

<div class="post-metadata">

**Author:** ![Thulium-Drake](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/thulium-drake/32/833_2.png) [@Thulium-Drake](https://forum.ansible.com/u/Thulium-Drake)\
**Post date:** [July 8, 2024, 12:15pm UTC](https://forum.ansible.com/t/using-ansible-when-fastfetch-is-activate-in-home-bashrc-neofetch-clone/7120/2 "2024-07-08T12:15:44Z")

</div>

I have a shortcut in my `.bashrc` that exits out early in case a non-interactive shell is started:

```auto
# Shortcut when running non-interactive shells
[-z "$PS1"] && return

```

---

<div class="post-metadata">

**Author:** ![didier](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/didier/32/4125_2.png) [@didier](https://forum.ansible.com/u/didier)\
**Post date:** [July 10, 2024, 6:12am UTC](https://forum.ansible.com/t/using-ansible-when-fastfetch-is-activate-in-home-bashrc-neofetch-clone/7120/3 "2024-07-10T06:12:39Z")

</div>

Thanks a lot, it’s working like a charm.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [August 9, 2024, 6:13am UTC](https://forum.ansible.com/t/using-ansible-when-fastfetch-is-activate-in-home-bashrc-neofetch-clone/7120/4 "2024-08-09T06:13:03Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
