Просмотр исходного кода

Check sensu_available_checks is not skipped

Ensures that for the Deploy client definitions task we check that sensu_available_checks was not skipped. 
This should allow the role to operate in Check mode.
Jared 7 лет назад
Родитель
Сommit
cee83c9d61
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      tasks/plugins.yml

+ 4 - 1
tasks/plugins.yml

@@ -101,7 +101,10 @@
     dest: "{{ sensu_config_path }}/conf.d/{{ item | basename | regex_replace('.j2', '')}}"
     dest: "{{ sensu_config_path }}/conf.d/{{ item | basename | regex_replace('.j2', '')}}"
     owner: "{{ sensu_user_name }}"
     owner: "{{ sensu_user_name }}"
     group: "{{ sensu_group_name }}"
     group: "{{ sensu_group_name }}"
-  when: "sensu_available_client_definitions is defined and item in sensu_available_client_definitions.stdout_lines"
+  when:
+    - sensu_available_client_definitions is defined
+    - sensu_available_checks is not skipped
+    - item in sensu_available_client_definitions.stdout_lines
   with_flattened:
   with_flattened:
     - "{{ group_names }}"
     - "{{ group_names }}"
   notify: restart sensu-client service
   notify: restart sensu-client service