From 92b43f56dbaac73d6759fd132deb3b7604d1f800 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Fri, 9 Aug 2019 13:49:35 +0100 Subject: [PATCH] Fixed bugs identified by newer ansible-lint - scm: git is mandatory on requirements.yml when using git urls - role_name is needed in meta - centos was not listed as supported platform - galaxy_tags should be used instead of categories - comparison to empty string should be avoided These where found while attempting to enable functional testing using ansible-molecule. Change-Id: I5f8087516628e20c2539552c653d4ea5361234ec Needed-By: https://review.opendev.org/#/c/675615/ --- meta/main.yml | 6 +++++- requirements.yml | 2 ++ tasks/tempest_post_install.yml | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index e857ee1a..6cefbbbb 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -14,6 +14,7 @@ # limitations under the License. galaxy_info: + role_name: os_tempest author: rcbops description: Installation and setup of tempest company: Rackspace @@ -30,10 +31,13 @@ galaxy_info: - name: EL versions: - 7 + - name: CentOS + versions: + - 7 - name: opensuse versions: - 15 - categories: + galaxy_tags: - cloud - python - tempest diff --git a/requirements.yml b/requirements.yml index 0e83ce4d..12386896 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,8 +1,10 @@ # python_venv_build ansible role - name: python_venv_build + scm: git src: https://opendev.org/openstack/ansible-role-python_venv_build.git version: master # ansible-config_template action plugin - name: config_template + scm: git src: https://opendev.org/openstack/ansible-config_template.git version: master diff --git a/tasks/tempest_post_install.yml b/tasks/tempest_post_install.yml index cfb7dd1d..e5efcece 100644 --- a/tasks/tempest_post_install.yml +++ b/tasks/tempest_post_install.yml @@ -151,7 +151,7 @@ copy: content: | {% for item in tempest_test_whitelist | unique | sort %} - {% if item != '' %} + {% if item %} {{ item }} {% endif %} {% endfor %} @@ -165,7 +165,7 @@ copy: content: | {% for item in tempest_test_blacklist %} - {% if item.test != '' %} + {% if item.test %} {{ item.test }} {% endif %} {% endfor %}