Icinga / ansible-playbooks

Ansible Playbook for Icinga 2
GNU General Public License v2.0
225 stars 122 forks source link

Implement automatic zones #46

Open rubdos opened 7 years ago

rubdos commented 7 years ago

Adds a role that puts all hosts in zones, depending on ansible variables. #45 more or less depends on this, as icinga likes its hosts in zones before doing satellite configuration.

aflatto commented 7 years ago

Thank you for your contribution.

How can one disable the use of the zones if building a single instance or in a single location ?

rubdos commented 7 years ago

How can one disable the use of the zones if building a single instance or in a single location ?

You just don't use the role :-)

aflatto commented 6 years ago

When testing the code , it fails as there are not distinctive FQDN in the hosts configuration. If this is a variable that needs defining, please provide a README to define where those needs to be defined.

fatal: [FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'ansible_fqdn'\n\nThe error appears to have been in '/home/assaf/WorkSpace/icinga/icinga2-ansible/icinga2-ansible-add-zones/tasks/icinga2_add_zones.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: Copy Endpoint Zone Definitions\n ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'dict object' has no attribute 'ansible_fqdn'"}

rubdos commented 6 years ago

Is it okay for you that I come back to this code when I start using it again? The original project that made used of this module is more or less suspended, but I have other customers with whom I'd used it in the near future.

aflatto commented 6 years ago

Hi @rubdos Of course.

Thank you