In ansible.cfg I have set hash_behaviour=merge

In group_vars/all.yml

aspects_monit_local_probes:
>   localresources: |
>     check system {{ ansible_hostname }}
>       if loadavg (1min) > 4 then alert
>       if loadavg (5min) > 2 then alert
>       if memory usage > 75% then alert
>       if swap usage > 15% then alert
>       if cpu usage (user) > 70% then alert
>       if cpu usage (system) > 30% then alert
>       if cpu usage (wait) > 20% then alert
>   bootpartition: |
>     check filesystem boot with path /boot
>       if space usage > 90% then alert
>   rootpartition: |
>     check filesystem rootfs with path /
>       if space usage > 90% then alert
>   postfix: |
>     check process postfix matching "postfix"
>       start program = "/etc/init.d/postfix start" with timeout 60 seconds
>       stop program  = "/etc/init.d/postfix stop"
>       restart program  = "/etc/init.d/postfix restart"
>       if 2 restarts within 5 cycles then unmonitor
>   logstash_forwarder: |
>     check process logstash-forwarder matching "logstash-forwarder"
>       start program = "/etc/init.d/logstash-forwarder start"
>       stop program = "/etc/init.d/logstash-forwarder stop"
>       restart program = "/etc/init.d/logstash-forwarder restart"
>       if 2 restarts within 5 cycles then unmonitor
>   snmp: |
>     check process snmpd with pidfile /var/run/snmpd.pid
>       start program = "/etc/init.d/snmpd start"
>       stop program = "/etc/init.d/snmpd stop"
>       if failed host {{ ansible_default_ipv4.address }} port 161 type udp 
> then restart
>       if 5 restarts within 5 cycles then timeout


in host_vars/hostname.yml

>  

aspects_monit_local_probes:

  apache2: |

    check process apache with pidfile /var/run/apache2.pid

      start program = "/etc/init.d/apache2 start" with timeout 60 seconds

      stop program  = "/etc/init.d/apache2 stop"

      if failed port 80 then restart

      if failed port 443 with timeout 15 seconds then restart


Running this playbook:

>  - hosts:
>   - all
>   tasks:
>   - name: debug aspects_monit_local_probes
>     debug: var=aspects_monit_local_probes


 Outputs:

> ok: [hostname] => {
>
>     "aspects_monit_local_probes": {
>
>         "apache2": "check process apache with pidfile 
>> /var/run/apache2.pid\n  start program = \"/etc/init.d/apache2 start\" with 
>> timeout 60 seconds\n  stop program  = \"/etc/init.d/apache2 stop\"\n  if 
>> failed port 80 then restart\n  if failed port 443 with timeout 15 seconds 
>> then restart\n"
>
>     }
>
> }
>
>
>
 Why isn't my dictionary being merged?


I'm running from a git checkout, currently at 
commit 57f89b85eb4ee4d9af524e3fd5aef054ac4864b8.

Ubuntu 14.04.

I've run source ~/vendor/ansible/hacking/env-setup.


So, what's going on?

-- 
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/f270bbbe-f9af-4434-abb7-cc96879f2f81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to