Closed clumsyzombie closed 3 years ago
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 pi@192.168.2.100
) if you're running from another computer.
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.
Okay, so in this case, what you'd want to do is the following:
inventory.ini
, change the line under [internet_pi]
to read: localhost ansible_connection=local
main.yml
again.Hopefully that will work!
I am getting this right now.
@clumsyzombie - Before running the playbook, try deleting the directory: rm -rf /home/pi/internet-monitoring
. Looks like it may have been cloned already?
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.
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
@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 https://github.com/geerlingguy/internet-pi/issues/8 as well.
@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.
Excellent!
im having the same issue what do i do
nvm i figured it out
@geerlingguy
@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).
It looks like the main issue's been resolved at this point; the other issue that can happen on first run is https://github.com/geerlingguy/internet-pi/issues/22 — so moving the rest of this discussion there.
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:
Ive ssh’ed into my pi4 and everything seems good setup wise. The inventory.ini file contains the following: [internet_pi]
127.0.0.1 ansible_connection=local ansible_user=pi
Nothing in main.yml seems to indicate a path. Thanks in advance, Nb
@netbob - Please make sure you're running Ansible 2.9 or later (ansible --version
to check).
@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 $
@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).
@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.
@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?
- localhost ansible_connection=local
It would save many persons time I imagine to add this point of note to the readme of the git.
I have done everything else I am
but every time I go to run the play book I get the below issues.
First time I tried: