debops / ansible-ferm

Manage iptables firewall using ferm
GNU General Public License v3.0
32 stars 20 forks source link

ERROR! ERROR! 'ansible_local' is undefined #78

Closed Semyazz closed 8 years ago

Semyazz commented 8 years ago

I spinned 3x Debian 8 VMs. One is my controller with all ansible, debops tools installed and the remaining two are hosts I want to control and test different bunch of playbooks from debops and for example I simply wanted to install docker on all hosts. So I followed the guide and created a group in my inventory

[debops_service_docker:children]
<IP-2>
<IP-3>

and here is the result:

TASK [debops.ferm : Configure ferm status in debconf] **************************
fatal: [IP-2]: FAILED! => {"failed": true, "msg": "ERROR! ERROR! 'ansible_local' is undefined"}
drybjed commented 8 years ago

This is definitely related to this expression: https://github.com/debops/ansible-ferm/blob/master/defaults/main.yml#L3-L9

I'm trying to fix it to make it report True or False properly (at the moment on Ansible devel branch, but it just doesn't want to cooperate at the moment. I'm not sure if it's Ansible bug or not, I'll try to fix it tommorow.

Which Ansible version are you running? The stable-2.0 should be fine.

Anyhow, try setting ferm_enabled: True or False depending on if you want to use the firewall or not. You should also consider running at least the debops.core role which is a required role thruought the project.

You might also want to check the Getting Started Guide for the tips on how to setup DebOps hosts. It looks like your are trying to run debops.docker role by itself, but most of the roles depend on other configuration managed by the common DebOps playbook in some way or other. You should consider giving that a try.