Fixes for conditional execution as a task

This commit is contained in:
Dale McDiarmid 2017-03-15 17:24:10 -04:00
parent 595368f873
commit 4e8af6ced5
2 changed files with 13 additions and 7 deletions

View file

@ -21,8 +21,8 @@
- name: Remove Users
command: >
{{es_home}}/bin/x-pack/users userdel {{item}}
when: manage_file_users and (users_to_remove | length > 0)
with_items: "{{users_to_remove | default([])}}"
when: manage_file_users and (users_to_remove | length > 0)
environment:
CONF_DIR: "{{ conf_dir }}"
ES_HOME: "{{es_home}}"