Skip to content

Commit

Permalink
Fixes #575: Use new docker_compose_v2 plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
geerlingguy committed Feb 4, 2024
1 parent d53939c commit 38a240b
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ It should also work with Ubuntu for Pi, or Arch Linux, but has not been tested o
## Setup

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 ansible`
1. (If on Pi/Debian): `sudo apt-get install -y python3-pip`
2. (Everywhere): `pip3 install ansible`
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)
Expand Down
4 changes: 2 additions & 2 deletions tasks/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
- python3-pip
- git
- rsync
- docker-compose
- docker-compose-plugin
- resolvconf
state: present
when: ansible_facts.os_family == "Debian"
Expand All @@ -48,7 +48,7 @@
- python-pip
- git
- rsync
- docker-compose
- docker-compose-plugin
state: present
when: ansible_facts.os_family == "Archlinux"

Expand Down
8 changes: 4 additions & 4 deletions tasks/handlers.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
---
- name: Restart pi-hole
community.docker.docker_compose:
community.docker.docker_compose_v2:
project_src: "{{ config_dir }}/pi-hole/"
build: false
restarted: true
become: false

- name: Restart internet-monitoring
community.docker.docker_compose:
community.docker.docker_compose_v2:
project_src: "{{ config_dir }}/internet-monitoring/"
build: false
restarted: true
become: false

- name: Restart shelly-plug-prometheus
community.docker.docker_compose:
community.docker.docker_compose_v2:
project_src: "{{ config_dir }}/shelly-plug-prometheus/"
build: false
restarted: true
become: false

- name: Restart starlink-exporter
community.docker.docker_compose:
community.docker.docker_compose_v2:
project_src: "{{ config_dir }}/starlink-exporter/"
build: false
restarted: true
Expand Down
2 changes: 1 addition & 1 deletion tasks/internet-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
become: false

- name: Ensure internet-monitoring environment is running.
community.docker.docker_compose:
community.docker.docker_compose_v2:
project_src: "{{ config_dir }}/internet-monitoring/"
build: false
become: false
2 changes: 1 addition & 1 deletion tasks/pi-hole.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# TODO: The first time this playbook is run, the `pi` user may not be added
# to the `docker` group, so this task may fail.
- name: Ensure Pi-hole is running.
community.docker.docker_compose:
community.docker.docker_compose_v2:
project_src: "{{ pi_hole_dir.path }}/"
build: false
become: false
Expand Down
2 changes: 1 addition & 1 deletion tasks/shelly-plug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
notify: Restart shelly-plug-prometheus

- name: Ensure Shelly Plug Prometheus exporter is running.
community.docker.docker_compose:
community.docker.docker_compose_v2:
project_src: "{{ config_dir }}/shelly-plug-prometheus/"
build: false
become: false
Expand Down
2 changes: 1 addition & 1 deletion tasks/starlink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
notify: Restart starlink-exporter

- name: Ensure Starlink Prometheus exporter is running.
community.docker.docker_compose:
community.docker.docker_compose_v2:
project_src: "{{ config_dir }}/starlink-exporter/"
build: false
become: false
Expand Down

0 comments on commit 38a240b

Please sign in to comment.