I'm trying install something called Internet-Pi on my Raspberry Pi. I've followed the instructions and I believe everything got installed correctly. I and am on the last step where I'm supposed to run ansible-playbook.
I get the error:
pi@raspberrypi:~/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 26, 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
I don't know where to start trouble shooting this. The yml file is:
---
- hosts: internet_pi
become: true
pre_tasks:
- name: Load configuration (with defaults from example file).
ansible.builtin.include_vars: "{{ item }}"
loop:
- example.config.yml
- config.yml
- name: Ensure apt cache is up to date.
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
when:
- ansible_facts.os_family == "Debian"
- name: Ensure pacman cache is up to date
community.general.pacman:
update_cache: true
when:
- ansible_facts.os_family == "Archlinux"
handlers:
- name: Include handlers.
ansible.builtin.import_tasks: tasks/handlers.yml
tasks:
- name: Setup Docker.
ansible.builtin.import_tasks: tasks/docker.yml
- name: Set up Internet Monitoring.
ansible.builtin.import_tasks: tasks/internet-monitoring.yml
when: monitoring_enable
- name: Set up Pi Hole.
ansible.builtin.import_tasks: tasks/pi-hole.yml
when: pihole_enable
- name: Set up Shelly Plug Monitoring.
ansible.builtin.import_tasks: tasks/shelly-plug.yml
when: shelly_plug_enable
- name: Set up Air Gradient Monitoring.
ansible.builtin.import_tasks: tasks/airgradient.yml
when: airgradient_enable
- name: Set up Starlink Monitoring.
ansible.builtin.import_tasks: tasks/starlink.yml
when: starlink_enable
and handlers.yml is
---
- name: Restart pi-hole
community.docker.docker_compose:
project_src: ~/pi-hole/
build: false
restarted: true
become: false
- name: Restart internet-monitoring
community.docker.docker_compose:
project_src: ~/internet-monitoring/
build: false
restarted: true
become: false
- name: Restart shelly-plug-prometheus
community.docker.docker_compose:
project_src: ~/shelly-plug-prometheus/
build: false
restarted: true
become: false
- name: Restart airgradient-prometheus
community.docker.docker_compose:
project_src: ~/airgradient-prometheus/
build: false
restarted: true
become: false
- name: Restart starlink-exporter
community.docker.docker_compose:
project_src: ~/starlink-exporter/
build: false
restarted: true
become: false
If I try to run ansible.builtin.import_tasks
I get 'command not found'.
Where should I start troubleshooting?