Re: Nagios XI + Ansible
Posted: Tue Mar 06, 2018 6:39 pm
Actually, I think that chaining modular playbooks together with import / include in a master playbook will be the way to address that. http://docs.ansible.com/ansible/latest/ ... reuse.html
The last one in the chain would be an apply config playbook like
The last one in the chain would be an apply config playbook like
Code: Select all
---
- name: apply configs
hosts: all
connection: ssh
gather_facts: True
remote_user: root
tasks:
- uri:
url: http://{{ xi_ip }}/nagiosxi/api/v1/config/host?apikey={{ xi_api_key }}
body: "force=1&applyconfig=1"