Alex Willmer
6accc87da1
tests: Improve Ansible fail_msg formatting
...
By switching to block style (`|`) with clip (no `-` or `+`) the failure
messages don't require quoting and gain a single trailing newline. This causes
Ansible to print them as block style, when using the yaml stdout callback
plugin. As a result the values have one less layer of quoting and quote
escaping, making them much easier to read.
2 months ago
Alex Willmer
357fe38766
Ansible 10 (ansible-core 2.17) support
...
Notably
- Python 2.7 and 3.6 are no longer supported by Ansible on targets
- The yum module has been removed, and redirected to dnf
- _INTERPRETER_PYTHON_DISTRO_MAP has been neutered. Interpreter discovery
always favours specific `python3.<x>` interpreters in decending version
order, then generic `python3` or `python`.
- Add the ability for an action plugin to call self._execute_module(*,
ignore_unknown_opts=True) to execute a module with options that may not be
supported for the version being called.
https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_10.html
https://github.com/ansible-community/ansible-build-data/blob/main/10/CHANGELOG-v10.md
https://github.com/ansible/ansible/blob/stable-2.17/changelogs/CHANGELOG-v2.17.rst
fixes #1074 , refs #1082
Co-authored-by: Claude Becker <becker@phys.ethz.ch>
3 months ago
Alex Willmer
7079a07a15
tests: Fix duplicate local task executions
...
integration/ssh/timeouts.yml is noteworthy. It was an accidental N**2 in time
- executing num hosts * num hosts tasks.
6 months ago
Alex Willmer
65c8a42c13
tests: Use same verbosity when re-executing Ansible inside a playbook
6 months ago
Alex Willmer
45c42d386a
tests: Replace uses of ``include:``, unify skipping of mitogen only tests
...
The tag mitogen_only is only informational for now. It may be possible to use
it with ANSIBLE_SKIP_TAGS in the future.
8 months ago
Alex Willmer
a6a5c5bb97
tests: Clarify status/purpose of Python 2.x era Ansible Module workaround
9 months ago
Alex Willmer
591152bef0
tests: Avoid intermittant 2 hour timeout in new style Ansible module tests
...
This has been lurking for years, raising it's head at unpredictable times.
This change doesn't fix it, but it should make it a lot less mysterious.
9 months ago
Alex Willmer
1ed932e8d5
tests: Eliminate MITOGEN_INVENTORY_FILE
...
Replaced with ansible_inventory_sources.
2 years ago
Alex Willmer
526422b74b
tests: Name tasks
...
For easier grep, and easier identification in task_profiler summaries.
2 years ago
Alex Willmer
db0ffae352
tests: Enable stricter error handling, fix resulting failures
2 years ago
Alex Willmer
18c89de5a9
Remove unused module imports
3 years ago
Klaus Zerwes
2b4f04c554
Revert "Revert "fixed tests for ansible 2.12""
...
This reverts commit 478f286efb
.
3 years ago
Klaus Zerwes
478f286efb
Revert "fixed tests for ansible 2.12"
...
include is deprecated and will be removed in 2.16, so there is some time to fix this left
This reverts commit 2d3970552e
.
3 years ago
Klaus Zerwes
2d3970552e
fixed tests for ansible 2.12
3 years ago
Alex Willmer
e194a6367f
ci: Fix version comparisons involving double digits
...
See https://gist.github.com/moreati/e7507c5b606b12ec0ddafcb7c8debbf1
3 years ago
Alex Willmer
3c58215a91
tests: Tag Ansible tests
...
This makes it easier to run subsets using ANSIBLE_RUN_TAGS=...
3 years ago
Alex Willmer
147a716b28
CI: Handle NameError traceback on stdout in Ansible 2.10+
3 years ago
Alex Willmer
cfa5888547
tests: Print variables on failure of assert tasks
...
Fixes #852
3 years ago
Alex Willmer
ac7505d624
tests: Add centos 8; debian 10, 11; ubuntu 16.04, 18.04, 20.04 test images
4 years ago
Steven Robertson
741e99f698
ansible 2.10 no longer has a at the end of the error msg... 🤦
4 years ago
Steven Robertson
e6d7cd3aff
skip vanilla Ansible 2.10 hanging task if not is_mitogen
4 years ago
Steven Robertson
d978dffe4e
fix ansible version check error
4 years ago
David Wilson
d6329f3446
Merge devel/290 @ 79b979ec8544ef5d8620c64068d4a42fabf50415
5 years ago
David Wilson
ee7dae7514
ci: Another round of fixes for random Ansible UI breakage in 2.7/2.8
6 years ago
David Wilson
a3be746865
issue #587 : update MODULE FAILURE message format for post >2.7
6 years ago
David Wilson
2bd0bbd4df
issue #555 : ansible: workaround ancient reload(sys) hack.
...
This is the most minimal change for what might be relatively minimal
edge case. Alternative is replacing reload(), but let's not do that yet.
Closes #555
6 years ago
David Wilson
954f874085
issue #527 : catch new-style module tracebacks like vanilla.
6 years ago
David Wilson
a7da1b048b
tests: just disable the test.
6 years ago
David Wilson
cdb1434809
tests: hopefully fix this dumb test for the final time
6 years ago
David Wilson
a67cc85bdb
issue #477 : use MITOGEN_INVENTORY_FILE everywhere.
6 years ago
David Wilson
b67e4e118e
issue #477 : update forking_correct_parent for subprocess isolation
6 years ago
David Wilson
abb0319bbb
issue #477 : get rid of perl JSON module requirement.
6 years ago
David Wilson
51294db52d
issue #477 : fix 2 runner tests on Ansible 2.7.
6 years ago
David Wilson
dc01f9e47e
issue #477 : Ansible 2.3 module output format difference.
...
Don't test for keys it doesn't set.
6 years ago
David Wilson
b6062afe24
issue #477 : Ansible 2.3 cannot use when: on an include.
...
So just use our magic action module to reset the connection instead.
6 years ago
David Wilson
c1a4597e32
issue #477 : tests: use Ansible 2.3-compatible include rather than import
...
This will break with Ansible 2.8. Probably going to end up with a regex
hack for CI.
6 years ago
David Wilson
b0e7c1a315
tests: fix /etc/environment test on vanilla
...
Use "meta: reset_connection" to ensure /etc/environment is reloaded.
Looks like this entire feature can be ripped out!
6 years ago
David Wilson
3179951f5c
issue #454 : fix AttributeError and atexit.yml test.
6 years ago
David Wilson
a717c5406c
tests: split etc_environment test in two
...
Turns out nobody supports ~/.pam_environment any more. Keep the
behaviour around for the time being.
6 years ago
David Wilson
7fd9fb0014
issue #397 : fix another case where stray tmpdirs can be left behind.
...
Newer Ansibles use atexit.register() to invoke cleanup, so we need to
run those registrations after each run.
6 years ago
David Wilson
2eb3ea78d6
tests: remove a bunch of stray debug
6 years ago
David Wilson
dfb4930fce
tests: import custom binaries for tests
...
It means Linux<->OS X runs work fine without manual hackery.
6 years ago
David Wilson
705d77a9be
ansible: remove a bunch more aliasing from connection.py.
6 years ago
David Wilson
66142e7d75
ansible: fork isolated tasks from correct parent.
...
Closes #355 .
6 years ago
David Wilson
154dc2e119
tests: fix integration/runner/missing_module.yml on Travis.
6 years ago
David Wilson
a6995a5288
issue #338 : refactor env handling into class and fix tests.
6 years ago
David Wilson
06ae59702c
tests: rationalize matrix and rewrite ansible_tests
...
Now all distros run in parallel.
6 years ago
David Wilson
8eb288856c
issue #338 : run /etc/environment test with become:true.
6 years ago
David Wilson
6c4b01642c
ansible: don't crash when adhoc tries to run a missing module.
...
ansible-playbook prints a separate error during parsing stage, adhoc
performs no such check.
6 years ago
David Wilson
1473f49505
ansible: emulate /etc/environment reloading behaviour of vanilla.
...
This change is relatively incomplete -- ideally we could snapshot
os.environ and /etc/environment at startup and respect key deletions
too, but that's a lot more work. Wait for a bug report instead.
Closes #338 .
6 years ago