Comments (23)
Okay, so in this case, what you'd want to do is the following:
- In
inventory.ini
, change the line under[internet_pi]
to read:localhost ansible_connection=local
- Try running
main.yml
again.
Hopefully that will work!
from internet-pi.
@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 - 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 - 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.
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.
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.
from internet-pi.
from internet-pi.
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.
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
from internet-pi.
@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.
@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.
Excellent!
from internet-pi.
im having the same issue what do i do
from internet-pi.
nvm i figured it out
from internet-pi.
from internet-pi.
@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.
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.
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.
@netbob - Please make sure you're running Ansible 2.9 or later (ansible --version
to check).
from 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).
from internet-pi.
@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?
from internet-pi.
- 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)
- Error on: "Task: [Install Docker Compose using Pip]" - Fix here. HOT 5
- Getting an error when running ansible-playbook main.yml HOT 1
- Getting Error at "ansible-playbook main.yml" HOT 3
- Use this without a raspberry HOT 1
- Playbook breaks on latest Raspberry Pi OS (based on Debian Bookworm) HOT 1
- starlink dashboard has no data - how to configure the dishy address ? HOT 1
- Configuration error - kwargs_from_env() got an unexpected keyword argument 'ssl_version HOT 5
- Error while TASK [Gathering Facts] HOT 1
- No graphs for airquality sensor (grafana) HOT 2
- Pyymal and dockor compose fail fatal HOT 3
- so i got a wierd little error HOT 3
- ansible-playbook main.yml error in install Docker Task HOT 1
- Modernize to use Docker Compose plugin and docker_compose_v2 Ansible module
- SSH Not working with Playbook HOT 6
- couldn't resolve module/action 'community.docker.docker_compose_v2' HOT 1
- failure at TASK [Ensure internet-monitoring environment is running.] HOT 2
- Syntax issue with "- name" when running main.yml HOT 3
- Issue with domain_name_enable HOT 7
- Install fails: Ansible-Playbook main.yml fails when domain_name_enable is used
- How-to add more sites to the Uptime graph?? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from internet-pi.