Fix issues with and enable Python 3 job

Python 3 disallows implicit relative imports.

When skip_tags is provided as a single string, it will need to be cast
to an array to avoid being treated as a list of characters when compared
to task.tags.

Change-Id: Ib8e7b67b9400fb983aecaae95f50bb3ec35d4c26
This commit is contained in:
Jimmy McCrory 2018-10-19 08:20:12 -07:00
parent 3eb9d79a1a
commit cf99208142
2 changed files with 5 additions and 4 deletions

View File

@ -16,16 +16,18 @@
import itertools
import os
import linear
from .linear import StrategyModule as LinearStrategyModule
class StrategyModule(linear.StrategyModule):
class StrategyModule(LinearStrategyModule):
def _queue_task(self, host, task, task_vars, play_context):
"""Wipe the notification system and return for config tasks."""
skip_handlers = task_vars.get('skip_handlers', True)
if skip_handlers:
task.notify = None
skip_tags = task_vars.get('skip_tags')
if isinstance(skip_tags, str):
skip_tags = [skip_tags]
if skip_tags:
if not hasattr(skip_tags, '__iter__'):
skip_tags = (skip_tags,)

View File

@ -24,8 +24,7 @@
- openstack-ansible-functional-opensuse-423
- openstack-ansible-functional-ubuntu-bionic
- openstack-ansible-functional-ubuntu-xenial
# TODO(evrardjp): uncomment this when the job is in the tests repo
#- openstack-ansible-python3-ubuntu-xenial-nv
- openstack-ansible-python3-ubuntu-xenial
experimental:
jobs:
- openstack-ansible-integrated-deploy-aio