Giter Site home page Giter Site logo

Comments (23)

geerlingguy avatar geerlingguy commented on August 18, 2024 1

Okay, so in this case, what you'd want to do is the following:

  1. In inventory.ini, change the line under [internet_pi] to read: localhost ansible_connection=local
  2. Try running main.yml again.

Hopefully that will work!

from internet-pi.

geerlingguy avatar geerlingguy commented on August 18, 2024 1

@clumsyzombie - Before running the playbook, try deleting the directory: rm -rf /home/pi/internet-monitoring. Looks like it may have been cloned already?

from internet-pi.

netbob avatar netbob commented on August 18, 2024 1

@netbob - Please make sure you're running Ansible 2.9 or later (ansible --version to check).

Thanks! That worked so all runs well until it hits this portion:
TASK [Ensure {{ ansible_user }} user is added to the docker group.] ****************fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible_user' is undefined\n\nThe error appears to be in '/home/pi/internet-pi/tasks/docker.yml': line 44, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Ensure {{ ansible_user }} user is added to the docker group.\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - "{{ foo }}"\n"}

PLAY RECAP *************************************************************************localhost : ok=7 changed=2 unreachable=0 failed=1 skipped=2 rescued=0 ignored=0

pi@RPi4-PLEX:~/internet-pi $

from internet-pi.

netbob avatar netbob commented on August 18, 2024 1

@netbob - Make sure your inventory file has the whole contents of the line that was fixed a few days back: https://github.com/geerlingguy/internet-pi/blob/master/example.inventory.ini#L5 (including the ansible_user=pi part).

Adding the ansible_user=pi line worked for me. It works great, thanks for the assist Jeff.

from internet-pi.

geerlingguy avatar geerlingguy commented on August 18, 2024

Are you trying to run the playbook on the Pi itself? If so there are a couple things you need to do slightly differently (and I can guide you through them... maybe get that added to the README too!)

Otherwise, make sure you can SSH into the Pi (ssh [email protected]) if you're running from another computer.

from internet-pi.

clumsyzombie avatar clumsyzombie commented on August 18, 2024

Correct I am ssh in tot he pi right now and I downloaded all the file from your repository to my PI I just built.
pi@monitor-pihole:~/internet-monitoring $ ls -la
total 68
drwxr-xr-x 6 pi pi 4096 Jun 23 17:55 .
drwxr-xr-x 8 pi pi 4096 Jun 23 18:01 ..
-rw-r--r-- 1 pi pi 86 Jun 23 17:18 ansible.cfg
-rw-r--r-- 1 pi pi 487 Jun 23 17:55 config.yml
-rw-r--r-- 1 pi pi 504 Jun 23 17:18 example.config.yml
-rw-r--r-- 1 pi pi 159 Jun 23 17:18 example.inventory.ini
drwxr-xr-x 3 pi pi 4096 Jun 23 17:47 .github
-rw-r--r-- 1 pi pi 25 Jun 23 17:18 .gitignore
drwxr-xr-x 2 pi pi 4096 Jun 23 17:47 images
-rw-r--r-- 1 pi pi 161 Jun 23 17:51 inventory.ini
-rw-r--r-- 1 pi pi 1080 Jun 23 17:18 LICENSE
-rw-r--r-- 1 pi pi 855 Jun 23 17:18 main.yml
-rw-r--r-- 1 pi pi 2875 Jun 23 17:18 README.md
-rw-r--r-- 1 pi pi 38 Jun 23 17:18 requirements.yml
drwxr-xr-x 2 pi pi 4096 Jun 23 17:52 tasks
drwxr-xr-x 2 pi pi 4096 Jun 23 17:47 templates
-rw-r--r-- 1 pi pi 107 Jun 23 17:18 .yamllint

I have a Pi that I was just using for PiHole so I decided I would do your play book to just run it all on the Pi4 I have with 8 Gb ram So this pi use to do just pihole but I wipped it and said he I will just have it handing off my router and run your setup so I can just have it all in one place on the pi itself.

from internet-pi.

clumsyzombie avatar clumsyzombie commented on August 18, 2024

image

from internet-pi.

clumsyzombie avatar clumsyzombie commented on August 18, 2024

I am getting this right now.
image

from internet-pi.

clumsyzombie avatar clumsyzombie commented on August 18, 2024

So I did that and I am not able to access any web service's still on the pi after running it so I am not sure anything been copied over yet if I am getting errors.
So by deleting that I am not able to issue ansible-playbook main.yml because that is in the same directory as everything so when you issue ansible-playbook main.yml does it copy everything to another place? Could it be that something is not copy over.

from internet-pi.

clumsyzombie avatar clumsyzombie commented on August 18, 2024

So I did resolve one error the error above was unable to resolve so I got DNS working now and I can resolve google.com and github.com now
So I am getting this error now
image

from internet-pi.

geerlingguy avatar geerlingguy commented on August 18, 2024

@clumsyzombie - It looks like there are still DNS issues there; because Docker is trying to do a docker pull on the image but is not able to see the registry. It seems like it's trying to query DNS on the Pi itself, but check out #8 as well.

from internet-pi.

clumsyzombie avatar clumsyzombie commented on August 18, 2024

@geerlingguy You might have a laugh about this I went into /etc/resolvconf.conf it already was not committed so I said what the heck let me commit it out. Everything ran because I have DNS setup already on the pie else where. I did that and it fully installed.

Now I am in Grafana and looking around and pihole is up and running I need to config it but I can access each.

from internet-pi.

geerlingguy avatar geerlingguy commented on August 18, 2024

Excellent!

from internet-pi.

Nunya-9018 avatar Nunya-9018 commented on August 18, 2024

im having the same issue what do i do

from internet-pi.

Nunya-9018 avatar Nunya-9018 commented on August 18, 2024

nvm i figured it out

from internet-pi.

clumsyzombie avatar clumsyzombie commented on August 18, 2024

@geerlingguy

image

from internet-pi.

geerlingguy avatar geerlingguy commented on August 18, 2024

@clumsyzombie - Beautiful! For the Speedtest Graph it will still take some time before it shows a more stable graph over a long period (and looks nicest at 6 hours or more zoomed out).

from internet-pi.

geerlingguy avatar geerlingguy commented on August 18, 2024

It looks like the main issue's been resolved at this point; the other issue that can happen on first run is #22 — so moving the rest of this discussion there.

from internet-pi.

netbob avatar netbob commented on August 18, 2024

I am getting this error when I run “ansible-playbook main.yml:
pi@RPi4-PLEX:~/internet-pi $ ansible-playbook main.yml
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to have been in '/home/pi/internet-pi/main.yml': line 15, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

handlers:
- name: Include handlers.
^ here

Ive ssh’ed into my pi4 and everything seems good setup wise. The inventory.ini file contains the following:
[internet_pi]

192.168.1.3 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

Nothing in main.yml seems to indicate a path.
Thanks in advance,
Nb

from internet-pi.

geerlingguy avatar geerlingguy commented on August 18, 2024

@netbob - Please make sure you're running Ansible 2.9 or later (ansible --version to check).

from internet-pi.

geerlingguy avatar geerlingguy commented on August 18, 2024

@netbob - Make sure your inventory file has the whole contents of the line that was fixed a few days back: https://github.com/geerlingguy/internet-pi/blob/master/example.inventory.ini#L5 (including the ansible_user=pi part).

from internet-pi.

PhucNguyen04 avatar PhucNguyen04 commented on August 18, 2024

@geerlingguyBạn có thể cười về điều này. Tôi đã vào /etc/resolvconf.conf nó chưa được cam kết nên tôi đã nói cái quái gì vậy, hãy để tôi cam kết nó. Mọi thứ đều chạy vì tôi đã thiết lập DNS ở chỗ khác. Tôi đã làm điều đó và nó đã được cài đặt đầy đủ.

Bây giờ tôi đang ở Grafana và nhìn xung quanh và thấy pihole đang hoạt động. Tôi cần định cấu hình nó nhưng tôi có thể truy cập từng cái.

Where did you go to /etc/resolvconf.conf file?
image

from internet-pi.

danindiana avatar danindiana commented on August 18, 2024
  1. localhost ansible_connection=local

It would save many persons time I imagine to add this point of note to the readme of the git.

from internet-pi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.