diff --git a/README.md b/README.md index 23575f2..f6259ee 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,8 @@ It should also work with Ubuntu for Pi, or Arch Linux, but has not been tested o 1. [Install Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html). The easiest way (especially on Pi or a Debian system) is via Pip: 1. (If on Pi/Debian): `sudo apt-get install -y python3-pip` 2. (Everywhere): `pip3 install ansible` + 3. If you get an error like "externally-managed-environment", follow [this guide to fix it](https://www.jeffgeerling.com/blog/2023/how-solve-error-externally-managed-environment-when-installing-pip3), then run `pip3 install ansible` again. + 4. Make sure Ansible is in your PATH: `export PATH=$PATH:~/.local/bin` (and consider [adding it permanently](https://askubuntu.com/a/1113838)). 2. Clone this repository: `git clone https://github.com/geerlingguy/internet-pi.git`, then enter the repository directory: `cd internet-pi`. 3. Install requirements: `ansible-galaxy collection install -r requirements.yml` (if you see `ansible-galaxy: command not found`, restart your SSH session or reboot the Pi and try again) 4. Make copies of the following files and customize them to your liking: diff --git a/tasks/handlers.yml b/tasks/handlers.yml index a72c640..3aa5104 100644 --- a/tasks/handlers.yml +++ b/tasks/handlers.yml @@ -2,27 +2,27 @@ - name: Restart pi-hole community.docker.docker_compose_v2: project_src: "{{ config_dir }}/pi-hole/" - build: false + build: never restarted: true become: false - name: Restart internet-monitoring community.docker.docker_compose_v2: project_src: "{{ config_dir }}/internet-monitoring/" - build: false + build: never restarted: true become: false - name: Restart shelly-plug-prometheus community.docker.docker_compose_v2: project_src: "{{ config_dir }}/shelly-plug-prometheus/" - build: false + build: never restarted: true become: false - name: Restart starlink-exporter community.docker.docker_compose_v2: project_src: "{{ config_dir }}/starlink-exporter/" - build: false + build: never restarted: true become: false diff --git a/tasks/internet-monitoring.yml b/tasks/internet-monitoring.yml index 200e0ce..d1b1c93 100644 --- a/tasks/internet-monitoring.yml +++ b/tasks/internet-monitoring.yml @@ -47,5 +47,5 @@ - name: Ensure internet-monitoring environment is running. community.docker.docker_compose_v2: project_src: "{{ config_dir }}/internet-monitoring/" - build: false + build: never become: false diff --git a/tasks/pi-hole.yml b/tasks/pi-hole.yml index 7b35c82..f842a71 100644 --- a/tasks/pi-hole.yml +++ b/tasks/pi-hole.yml @@ -20,7 +20,7 @@ - name: Ensure Pi-hole is running. community.docker.docker_compose_v2: project_src: "{{ pi_hole_dir.path }}/" - build: false + build: never become: false - name: Ensure resolveconf exists. diff --git a/tasks/shelly-plug.yml b/tasks/shelly-plug.yml index 6924d12..3857ee8 100644 --- a/tasks/shelly-plug.yml +++ b/tasks/shelly-plug.yml @@ -19,7 +19,7 @@ - name: Ensure Shelly Plug Prometheus exporter is running. community.docker.docker_compose_v2: project_src: "{{ config_dir }}/shelly-plug-prometheus/" - build: false + build: never become: false - name: Copy shelly dashboard config to grafana diff --git a/tasks/starlink.yml b/tasks/starlink.yml index 4ca85e2..ff9f26f 100644 --- a/tasks/starlink.yml +++ b/tasks/starlink.yml @@ -17,7 +17,7 @@ - name: Ensure Starlink Prometheus exporter is running. community.docker.docker_compose_v2: project_src: "{{ config_dir }}/starlink-exporter/" - build: false + build: never become: false - name: Copy starlink dashboard config to grafana.