From ab8e63432c7033969fc25b3e647a160a362f0703 Mon Sep 17 00:00:00 2001 From: Travis Truman Date: Wed, 15 Jun 2016 10:54:53 -0400 Subject: [PATCH] Address Ansible bare variable usage When executing the role with Ansible 2.1, the following deprecation warning is issued in the output for some tasks. [DEPRECATION WARNING]: Using bare variables is deprecated. This patch addresses the tasks to fix the behaviour appropriately. Change-Id: Ida87ec8609c870010cb92a45d78d1a506252d5f3 --- handlers/main.yml | 2 +- tasks/sahara_install.yml | 6 +++--- tasks/sahara_install_apt.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 9718c61..8b299ca 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -28,4 +28,4 @@ name: "{{ item }}" state: "restarted" pattern: "{{ item }}" - with_items: sahara_service_names + with_items: "{{ sahara_service_names }}" diff --git a/tasks/sahara_install.yml b/tasks/sahara_install.yml index cf24132..ec3393c 100644 --- a/tasks/sahara_install.yml +++ b/tasks/sahara_install.yml @@ -71,7 +71,7 @@ until: install_packages|success retries: 5 delay: 2 - with_items: sahara_required_pip_packages + with_items: "{{ sahara_required_pip_packages }}" tags: - sahara-install - sahara-pip-packages @@ -189,7 +189,7 @@ until: install_packages|success retries: 5 delay: 2 - with_items: sahara_pip_packages + with_items: "{{ sahara_pip_packages }}" when: - sahara_venv_enabled | bool - sahara_get_venv | failed or sahara_developer_mode | bool @@ -208,7 +208,7 @@ until: install_packages|success retries: 5 delay: 2 - with_items: sahara_pip_packages + with_items: "{{ sahara_pip_packages }}" when: - not sahara_venv_enabled | bool - not sahara_developer_mode | bool diff --git a/tasks/sahara_install_apt.yml b/tasks/sahara_install_apt.yml index 331b915..27e3d38 100644 --- a/tasks/sahara_install_apt.yml +++ b/tasks/sahara_install_apt.yml @@ -32,4 +32,4 @@ until: install_packages|success retries: 5 delay: 2 - with_items: sahara_apt_packages + with_items: "{{ sahara_apt_packages }}"