diff --git a/docs/dynamic_checks.md b/docs/dynamic_checks.md index 3787d6d7..129e934b 100644 --- a/docs/dynamic_checks.md +++ b/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 ``` diff --git a/tasks/plugins.yml b/tasks/plugins.yml index 5e2f719b..368f4255 100644 --- a/tasks/plugins.yml +++ b/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