sensu / sensu-ansible

An Ansible role to deploy a fully dynamic Sensu stack!
https://ansible-sensu.readthedocs.io
MIT License
126 stars 96 forks source link

Check if sensu_available_checks is skippeded #195

Closed jaredledvina closed 5 years ago

jaredledvina commented 5 years ago

I think this might resolve https://github.com/sensu/sensu-ansible/issues/194

michaelpporter commented 5 years ago

Looks good. It is also needed below on line 98

- name: Deploy client definitions
  copy:
    src: "{{ static_data_store }}/sensu/client_definitions/{{ item }}/"
    dest: "{{ sensu_config_path }}/conf.d/{{ item | basename | regex_replace('.j2', '')}}"
    owner: "{{ sensu_user_name }}"
    group: "{{ sensu_group_name }}"
  when:
    - sensu_available_checks is defined
    - sensu_available_checks is not skipped
    - item in sensu_available_checks.stdout_lines
  with_flattened:
    - "{{ group_names }}"
  notify: restart sensu-client service
michaelpporter commented 5 years ago

Looks good. Made the changes locally this morning and tested. I think it is good to go.