geerlingguy / raspberry-pi-dramble

DEPRECATED - Raspberry Pi Kubernetes cluster that runs HA/HP Drupal 8
http://www.pidramble.com/
MIT License
1.67k stars 260 forks source link

ansible-playbook -i inventory main.yml fails #141

Closed poon64 closed 5 years ago

poon64 commented 5 years ago

When I try to run the command ansible-playbook -i inventory main.yml this is what happens

pi@RaspberryPi-1:~/raspberry-pi-dramble $ ansible-playbook -i inventory 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/raspberry-pi-dramble/roles/geerlingguy.security/tasks/main.yml': line 6, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

# Fail2Ban
- include_tasks: fail2ban-RedHat.yml
  ^ here

The error appears to have been in '/home/pi/raspberry-pi-dramble/roles/geerlingguy.security/tasks/main.yml': line 6, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

# Fail2Ban
- include_tasks: fail2ban-RedHat.yml
  ^ here

pi@RaspberryPi-1:~/raspberry-pi-dramble $
geerlingguy commented 5 years ago

@poon64 it looks like the version of Ansible you have installed may be very old; this playbook requires Ansible 2.4 or later. Check the version with ansible --version and if it's too old, try uninstalling (maybe it was installed with the system package manager?), and then reinstalling via pip or via source instead.

If that's not the problem, please feel free to reopen this issue!

poon64 commented 5 years ago

@geerlingguy You was correct, I was using the version coming with raspbian, and that version was 2.2.1.0 and that seems to be the latest available there. So I did as you suggested and uninstalled it and then installed with pip to version 2.7.6. It seems to work now :)