geerlingguy / internet-pi

Raspberry Pi config for all things Internet.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't complete setup

oliverconstance opened this issue · comments

I have followed the instructions in the readme.md file, but keep getting stuck at step 4. I have searched through Issues for the same error message but none appear to include a resolution.

:~/internet-pi $ ansible-playbook main.yml

[DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the controller starting with Ansible 2.12. Current version: 3.7.3 (default, Jun 29 2023, 18:03:57) [GCC 8.3.0]. This feature will be removed from ansible-core in version
2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[WARNING]: Unable to parse /home/oliver/internet-pi/inventory.ini as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[WARNING]: Could not match supplied host pattern, ignoring: internet_pi

PLAY [Configure Internet Pi.] ***************************************************************************************************************************************************************************************************************
skipping: no hosts matched

PLAY RECAP ********************************************************************************************************************************************************************************************************************************** `

===============

I have tried the inventory as both of the below (where XXX is the actual IP address of my Pi. I am certain about the IP address because I SSH into it.

#[internet_pi]
#192.168.1.XXX ansible_user=pi

#Comment out the previous line and uncomment this to run inside Raspberry Pi.
127.0.0.1 ansible_connection=local ansible_user=pi `


#[internet_pi]
192.168.1.XXX ansible_user=pi

#Comment out the previous line and uncomment this to run inside Raspberry Pi.
#127.0.0.1 ansible_connection=local ansible_user=pi `

===============

Any guidance much appreciated, thank you

This is a fresh installation of Raspberry Pi OS Lite, with nothing else on it

Have tried uncommenting the first line and changing the ansible_user to the name of the local user (oliver) and same error message

I think you're on the right track here, since Raspberry pi OS no longer has the default pi user, you do need to substitute oliver for pi. (this probably should be updated on documentation)

if you're running the ansible script on the pi you're installing to, try changing it in the following line:

127.0.0.1 ansible_connection=local ansible_user=pi
should be changed to:
127.0.0.1 ansible_connection=local ansible_user=oliver

There should only be this line and the [internet-pi] lines uncommented.

Thanks for the response. Yes tried that too and same error message sadly

Then it might be a formatting or permissions issue.

My next step would be to delete the inventory.ini file, and re-copy/edit example.inventory.ini

Tried a couple different manglings of the inventory.ini file, but couldn't exactly replicate the error you got.

How are you coping/editing it?

I am using the unix cp command to copy and create new file

I can attempt a fresh copy tomorrow evening when back at my PC. Given you mentioned potential permissions issue, should I also chmod It to something else

(sorry miss click while trying to edit)

I am copying with the unix cp command

As you say a possible permissions issue, should I attempt to chmod to something different?

I am using cat and vi to view and edit so assume not a formatting issue but happy to try again tomorrow evening when next at my pc

Thank you for trying to help

Since you're using native *nix commands i'm less concerned about formatting, i was trying to eliminate some windows editing/copy scenario, and vi is for brave souls.

Just tested chmod/chown:
chown root:root inventory.ini no change/error
chmod 000 inventory.ini same 4 errors

clean config for me is:
chown user:user inventory.ini
chmod 644 inventory.ini

Actually all files and dirs are user:user
all files are 644 and directories are 755

Hopefully this helps.