Hi,
I am trying to write ansible playbook for Nagios client installation and
configuration.
- name: untar Plugin Zip file to libexec directory
command: mount | grep -v "rootLV" | grep ext4 | awk '{print $3}'
register: dirlist
- name: create Nagios Host ServiceConfig file
blockinfile:
dest: /scripts/{{ ansible_hostname }}_svc.cfg
block: |
define service{
host_name {{ ansible_hostname }}
service_description {{ item }} filesystem
check_command check_nrpe!check_disk_boot
max_check_attempts 3
normal_check_interval 5
retry_check_interval 3
check_period 24x7
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
contact_groups touchpoint
notifications_enabled 1}
with_items: "{{dirlist.stdout_lines}}"
I was trying to create service configuration file using above playbook but it's
been failing. Can someone guide me on this
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/40e2ed65-8254-4fdf-b8f6-48c82052de85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.