Accepting request 900878 from home:susnux:branches:systemsmanagement

- Update to version 1.4.7

OBS-URL: https://build.opensuse.org/request/show/900878
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/ansible-runner?expand=0&rev=8
This commit is contained in:
Lars Vogdt 2021-06-25 18:47:46 +00:00 committed by Git OBS Bridge
parent a4ca722c17
commit de9dec30fd
5 changed files with 21 additions and 68 deletions

View File

@ -1,62 +0,0 @@
From b02acb4c089d5bcb5ff38b3f2e1d7540da72bf6e Mon Sep 17 00:00:00 2001
From: Thomas Bechtold <tbechtold@suse.com>
Date: Sat, 27 Apr 2019 15:00:38 +0200
Subject: [PATCH] Use the correct python executable for tests
Instead of using "python" which might point to python2, use the python
that is used to run the tests itself (which is sys.executable).
This fixes a build problem on openSUSE where ansible-runner is only
build for python3. Due to that, no "python" executable is there.
---
test/integration/test_runner.py | 3 ++-
test/unit/test_runner.py | 9 +++++----
2 files changed, 7 insertions(+), 5 deletions(-)
Index: ansible-runner-1.3.3/test/unit/test_runner.py
===================================================================
--- ansible-runner-1.3.3.orig/test/unit/test_runner.py
+++ ansible-runner-1.3.3/test/unit/test_runner.py
@@ -8,6 +8,7 @@ import mock
import pexpect
import pytest
import six
+import sys
from ansible_runner import Runner
from ansible_runner.exceptions import CallbackError
@@ -59,7 +60,7 @@ def test_error_code(rc):
# TODO: matt does not like this test
def test_job_timeout(rc):
- rc.command = ['python', '-c', 'import time; time.sleep(5)']
+ rc.command = [sys.executable, '-c', 'import time; time.sleep(5)']
runner = Runner(config=rc)
status, exitcode = runner.run()
assert status == 'timeout'
@@ -67,7 +68,7 @@ def test_job_timeout(rc):
def test_cancel_callback(rc):
- rc.command = ['python', '-c', 'print(input("Password: "))']
+ rc.command = [sys.executable, '-c', 'print(input("Password: "))']
status, exitcode = Runner(config=rc, cancel_callback=lambda: True).run()
assert status == 'canceled'
@@ -76,14 +77,14 @@ def test_cancel_callback_error(rc):
def kaboom():
raise Exception('kaboom')
- rc.command = ['python', '-c', 'print(input("Password: "))']
+ rc.command = [sys.executable, '-c', 'print(input("Password: "))']
with pytest.raises(CallbackError):
Runner(config=rc, cancel_callback=kaboom).run()
@pytest.mark.parametrize('value', ['abc123', six.u('Iñtërnâtiônàlizætiøn')])
def test_env_vars(rc, value):
- rc.command = ['python', '-c', 'import os; print(os.getenv("X_MY_ENV"))']
+ rc.command = [sys.executable, '-c', 'import os; print(os.getenv("X_MY_ENV"))']
rc.env = {'X_MY_ENV': value}
status, exitcode = Runner(config=rc).run()
assert status == 'successful'

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:46f4bb39f98d53a82265e8439a4e4020016b3493982ec3cbee73a42627218b8c
size 89608

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1bb56f9061c3238d89ec8871bc842f5b8d0e868f892347e8455c98d5b6fa58a1
size 47112

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Sun May 23 17:43:04 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
- Update to version 1.4.7
* Fixed an issue where byte sequences in the output that are not
interpretable as UTF-8 would break the job execution.
* Fixed a bug that broke Ansible playbook execution prior to
version 2.8 of Ansible
* Fix an issue with --process_isoloation_*_ paths parsing cli args
* Switch extravar format so we can support more than just string
types
* Make sure job events folder is created earlier to prevent
errors when using immediately after starting a runner job
* Annotate all runner_on events with start/end/duration times
- Drop 0001-Use-the-correct-python-executable-for-tests.patch
-------------------------------------------------------------------
Thu Feb 20 15:39:49 UTC 2020 - Lars Vogdt <lars@linux-schulserver.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package ansible-runner
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,7 +17,7 @@
Name: ansible-runner
Version: 1.4.4
Version: 1.4.7
Release: 0
Summary: Package for interfacing with Ansible
License: Apache-2.0 AND GPL-3.0-or-later
@ -30,7 +30,6 @@ BuildRequires: python3-PyYAML
BuildRequires: python3-mock
BuildRequires: python3-pexpect
BuildRequires: python3-psutil
BuildRequires: python3-pytest
BuildRequires: python3-python-daemon
BuildRequires: python3-setuptools
BuildRequires: python3-six