Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't complete setup #527

Open
oliverconstance opened this issue Jul 7, 2023 · 12 comments
Open

Can't complete setup #527

oliverconstance opened this issue Jul 7, 2023 · 12 comments
Labels

Comments

@oliverconstance
Copy link

oliverconstance commented Jul 7, 2023

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

@oliverconstance
Copy link
Author

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

@oliverconstance
Copy link
Author

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

@jerzerisz
Copy link
Contributor

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.

@oliverconstance
Copy link
Author

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

@jerzerisz
Copy link
Contributor

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?

@oliverconstance
Copy link
Author

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

@oliverconstance
Copy link
Author

(sorry miss click while trying to edit)

@oliverconstance
Copy link
Author

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

@jerzerisz
Copy link
Contributor

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.

Copy link

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@github-actions github-actions bot added the stale label Nov 13, 2023
@danindiana
Copy link

127.0.0.1 ansible_connection=local ansible_user=oliver

OK, this got it working for me. Making sure that the IP and User were correct. I think Jeff uses "localhost ansible_connection=local" which results in errors.

@github-actions github-actions bot removed the stale label Dec 25, 2023
Copy link

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@github-actions github-actions bot added the stale label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants