30 lines
821 B
YAML
30 lines
821 B
YAML
---
|
|
###########################################################################
|
|
#
|
|
# This is the top level playbook for the 'nagios_agent' role.
|
|
#
|
|
# This role will install and configure nagios agent to the target host.
|
|
#
|
|
###########################################################################
|
|
#
|
|
# This playbook can be run using the following command line;
|
|
#
|
|
# ansible-playbook -i <inventory file | IP,> nagios_agent.yml
|
|
#
|
|
# ie,
|
|
# ansible-playbook -i 192.168.1.123, nagios_agent.yml
|
|
#
|
|
###########################################################################
|
|
|
|
- hosts: all
|
|
gather_facts: true
|
|
user: root
|
|
|
|
roles:
|
|
- role: nagios_agent
|
|
vars:
|
|
# agent_ip: "{{ hostvars[item].ansible_default_ipv4.address }}"
|
|
agent_ip: "{{ hostvars[inventory_hostname].ansible_default_ipv4.address }}"
|
|
|
|
# EOF
|