New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement ansible's resolved action #995
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pexpect>=4.5 | ||
packaging | ||
python-daemon | ||
pyyaml | ||
six |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import shutil | ||
|
||
from pathlib import Path | ||
from packaging.version import Version | ||
import subprocess | ||
|
||
from ansible_runner import defaults | ||
|
||
|
@@ -46,6 +48,30 @@ def skipif_pre_ansible211(is_pre_ansible211): | |
pytest.skip("Valid only on Ansible 2.11+") | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not crazy about what the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm also not sure how I feel about this implementation generally but it gets us there quick with whatever variant of Ansible is installed in the environment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
def is_pre_ansible212(): | ||
try: | ||
base_version = ( | ||
subprocess.run( | ||
"python -c 'import ansible; print(ansible.__version__)'", | ||
capture_output=True, | ||
shell=True, | ||
) | ||
.stdout.strip() | ||
.decode() | ||
) | ||
if Version(base_version) < Version("2.12"): | ||
return True | ||
except pkg_resources.DistributionNotFound: | ||
pass | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def skipif_pre_ansible212(is_pre_ansible212): | ||
if is_pre_ansible212: | ||
pytest.skip("Valid only on Ansible 2.12+") | ||
|
||
|
||
# TODO: determine if we want to add docker / podman | ||
# to zuul instances in order to run these tests | ||
def pytest_generate_tests(metafunc): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simaishi Can you check and see if this is available as an RPM from the standard repos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤞🏻 it's also used by
ansible-core
so my working assumption was that we had solved it for the necessary dependencies.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ansible-core has it bundled, but we do have an access to the standalone rpm as well.