浏览代码

Merge pull request #209 from michaelpporter/master

Fixes loop issue #208
Jared 6 年之前
父节点
当前提交
45b93849fa
共有 2 个文件被更改,包括 4 次插入8 次删除
  1. 2 4
      docs/dynamic_checks.md
  2. 2 4
      tasks/plugins.yml

+ 2 - 4
docs/dynamic_checks.md

@@ -103,8 +103,7 @@ With this pair of plays, in the `tasks/plugins.yml` playbook:
       owner: "{{ sensu_user_name }}"
       group: "{{ sensu_group_name }}"
     when: "'{{ item }}' in sensu_available_checks.stdout_lines"
-    loop:
-      - group_names|flatten
+    loop: "{{ group_names|flatten }}"
     notify: restart sensu-client service
 ```
 This will [register](https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html#register-variables) a list of available checks, then deploy them to their intended groups based on node membership, as set within the Ansible inventory.
@@ -129,8 +128,7 @@ These are deployed with the following pair of plays, also in the `tasks/plugins.
     owner: "{{ sensu_user_name }}"
     group: "{{ sensu_group_name }}"
   when: "sensu_available_client_definitions is defined and item in sensu_available_client_definitions.stdout_lines"
-  loop:
-    - "{{ group_names|flatten }}"
+  loop: "{{ group_names|flatten }}"
   notify: restart sensu-client service
 ```
 

+ 2 - 4
tasks/plugins.yml

@@ -50,8 +50,7 @@
     - sensu_available_checks is defined
     - sensu_available_checks is not skipped
     - item in sensu_available_checks.stdout_lines
-  loop:
-    - "{{ group_names|flatten }}"
+  loop: "{{ group_names|flatten }}"
   notify: restart sensu-client service
 
 - name: Deploy handler plugins
@@ -112,6 +111,5 @@
     - sensu_available_client_definitions is defined
     - sensu_available_checks is not skipped
     - item in sensu_available_client_definitions.stdout_lines
-  loop:
-    - "{{ group_names|flatten }}"
+  loop: "{{ group_names|flatten }}"
   notify: restart sensu-client service