Skip to content

Commit da1e755

Browse files
committed
WIP
1 parent aa3199b commit da1e755

8 files changed

Lines changed: 38 additions & 1 deletion

File tree

.ci/ansible_install.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env python
2+
# SPDX-FileCopyrightText: 2026 Mitogen authors <https://github.com/mitogen-hq>
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
from __future__ import absolute_import, division, print_function
5+
6+
import ci_lib
7+
from ci_lib import subprocess
8+
9+
with ci_lib.Fold('ansible_prep'):
10+
subprocess.check_call(
11+
['ansible-galaxy', 'collection', 'install', '-r', ci_lib.ANSIBLE_TESTS_REQUIREMENTS],
12+
)

.ci/ci_lib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
GIT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
2323
ANSIBLE_TESTS_DIR = os.path.join(GIT_ROOT, 'tests/ansible')
2424
ANSIBLE_TESTS_HOSTS_DIR = os.path.join(GIT_ROOT, 'tests/ansible/hosts')
25+
ANSIBLE_TESTS_REQUIREMENTS = os.path.join(GIT_ROOT, 'tests/ansible/requirements.yml')
2526
ANSIBLE_TESTS_TEMPLATES_DIR = os.path.join(GIT_ROOT, 'tests/ansible/templates')
2627
DISTRO_SPECS = os.environ.get(
2728
'MITOGEN_TEST_DISTRO_SPECS',

tests/ansible/integration/all.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
tags: async
1010
- import_playbook: become/all.yml
1111
tags: become
12+
- import_playbook: collections/all.yml
13+
tags: collections
1214
- import_playbook: connection/all.yml
1315
tags: connection
1416
- import_playbook: connection_delegation/all.yml
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SPDX-FileCopyrightText: 2026 Mitogen authors <https://github.com/mitogen-hq>
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
4+
- import_playbook: smoke.yml
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-FileCopyrightText: 2026 Mitogen authors <https://github.com/mitogen-hq>
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
4+
- name: integration/collections/smoke.yml
5+
hosts: test-targets
6+
gather_facts: false
7+
become: false
8+
tasks:
9+
- name: Check basic import and execution
10+
moreati.test_artifacts.warn:

tests/ansible/regression/issue_1477__task_warnings_persist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
- name: regression/issue_1477__task_warnings_persist.yml
55
# Check warnings emitted by one task don't persist into another
6-
hosts: localhost
6+
hosts: test-targets
77
gather_facts: false
88
become: false
99
tasks:

tests/ansible/requirements.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-FileCopyrightText: 2026 Mitogen authors <https://github.com/mitogen-hq>
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
4+
collections:
5+
- name: moreati.test_artifacts
6+
version: ">=0.2.1"

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ deps =
100100
install_command =
101101
python -m pip --no-python-version-warning --disable-pip-version-check install {opts} {packages}
102102
commands_pre =
103+
m_ans: {toxinidir}/.ci/ansible_install.py
103104
m_ans: {toxinidir}/.ci/container_images_install.py
104105
mode_debops_common: {toxinidir}/.ci/debops_common_install.py
106+
m_lcl: {toxinidir}/.ci/ansible_install.py
105107
m_lcl: {toxinidir}/.ci/localhost_ansible_install.py
106108
m_mtg: {toxinidir}/.ci/container_images_install.py
107109
commands =

0 commit comments

Comments
 (0)