ansible-core 2.15.2rc1__py3-none-any.whl → 2.15.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ansible-core might be problematic. Click here for more details.

Files changed (53) hide show
  1. ansible/cli/config.py +1 -0
  2. ansible/cli/galaxy.py +20 -3
  3. ansible/cli/inventory.py +1 -1
  4. ansible/executor/task_executor.py +1 -2
  5. ansible/galaxy/collection/__init__.py +3 -1
  6. ansible/module_utils/ansible_release.py +1 -1
  7. ansible/module_utils/urls.py +16 -12
  8. ansible/modules/getent.py +1 -1
  9. ansible/modules/git.py +1 -1
  10. ansible/modules/setup.py +1 -1
  11. ansible/modules/stat.py +3 -3
  12. ansible/modules/validate_argument_spec.py +1 -1
  13. ansible/modules/yum.py +1 -1
  14. ansible/plugins/action/__init__.py +1 -1
  15. ansible/plugins/filter/split.yml +1 -1
  16. ansible/release.py +1 -1
  17. ansible/utils/encrypt.py +9 -2
  18. ansible_core-2.15.3.dist-info/METADATA +129 -0
  19. {ansible_core-2.15.2rc1.dist-info → ansible_core-2.15.3.dist-info}/RECORD +51 -49
  20. {ansible_core-2.15.2rc1.dist-info → ansible_core-2.15.3.dist-info}/WHEEL +1 -1
  21. ansible_test/_data/requirements/sanity.ansible-doc.txt +2 -0
  22. ansible_test/_data/requirements/sanity.changelog.txt +2 -0
  23. ansible_test/_data/requirements/sanity.import.plugin.txt +2 -0
  24. ansible_test/_data/requirements/sanity.import.txt +2 -0
  25. ansible_test/_data/requirements/sanity.integration-aliases.txt +2 -0
  26. ansible_test/_data/requirements/sanity.pylint.txt +2 -0
  27. ansible_test/_data/requirements/sanity.runtime-metadata.txt +2 -0
  28. ansible_test/_data/requirements/sanity.validate-modules.txt +2 -0
  29. ansible_test/_data/requirements/sanity.yamllint.txt +2 -0
  30. ansible_test/_internal/ansible_util.py +1 -1
  31. ansible_test/_internal/classification/__init__.py +6 -13
  32. ansible_test/_internal/classification/python.py +0 -1
  33. ansible_test/_internal/commands/integration/cloud/cs.py +1 -1
  34. ansible_test/_internal/commands/sanity/__init__.py +44 -7
  35. ansible_test/_internal/commands/sanity/ansible_doc.py +3 -0
  36. ansible_test/_internal/commands/sanity/bin_symlinks.py +102 -0
  37. ansible_test/_internal/commands/sanity/import.py +1 -1
  38. ansible_test/_internal/commands/sanity/integration_aliases.py +430 -0
  39. ansible_test/_internal/commands/sanity/mypy.py +6 -1
  40. ansible_test/_internal/provider/layout/ansible.py +1 -1
  41. ansible_test/_internal/provider/source/unversioned.py +0 -3
  42. ansible_test/_internal/python_requirements.py +7 -0
  43. ansible_test/_internal/util.py +1 -1
  44. ansible_test/_internal/util_common.py +7 -2
  45. ansible_test/_util/controller/sanity/mypy/packaging.ini +20 -0
  46. ansible_test/_util/target/setup/ConfigureRemotingForAnsible.ps1 +1 -1
  47. ansible_test/_util/target/setup/requirements.py +63 -0
  48. ansible_core-2.15.2rc1.dist-info/METADATA +0 -155
  49. ansible_test/_internal/commands/sanity/sanity_docs.py +0 -61
  50. {ansible_core-2.15.2rc1.data → ansible_core-2.15.3.data}/scripts/ansible-test +0 -0
  51. {ansible_core-2.15.2rc1.dist-info → ansible_core-2.15.3.dist-info}/COPYING +0 -0
  52. {ansible_core-2.15.2rc1.dist-info → ansible_core-2.15.3.dist-info}/entry_points.txt +0 -0
  53. {ansible_core-2.15.2rc1.dist-info → ansible_core-2.15.3.dist-info}/top_level.txt +0 -0
@@ -134,6 +134,14 @@ def install(pip, options): # type: (str, t.Dict[str, t.Any]) -> None
134
134
  options.extend(packages)
135
135
 
136
136
  for path, content in requirements:
137
+ if path.split(os.sep)[0] in ('test', 'requirements'):
138
+ # Support for pre-build is currently limited to requirements embedded in ansible-test and those used by ansible-core.
139
+ # Requirements from ansible-core can be found in the 'test' and 'requirements' directories.
140
+ # This feature will probably be extended to support collections after further testing.
141
+ # Requirements from collections can be found in the 'tests' directory.
142
+ for pre_build in parse_pre_build_instructions(content):
143
+ pre_build.execute(pip)
144
+
137
145
  write_text_file(os.path.join(tempdir, path), content, True)
138
146
  options.extend(['-r', path])
139
147
 
@@ -150,6 +158,61 @@ def install(pip, options): # type: (str, t.Dict[str, t.Any]) -> None
150
158
  remove_tree(tempdir)
151
159
 
152
160
 
161
+ class PreBuild:
162
+ """Parsed pre-build instructions."""
163
+
164
+ def __init__(self, requirement): # type: (str) -> None
165
+ self.requirement = requirement
166
+ self.constraints = [] # type: list[str]
167
+
168
+ def execute(self, pip): # type: (str) -> None
169
+ """Execute these pre-build instructions."""
170
+ tempdir = tempfile.mkdtemp(prefix='ansible-test-', suffix='-pre-build')
171
+
172
+ try:
173
+ options = common_pip_options()
174
+ options.append(self.requirement)
175
+
176
+ constraints = '\n'.join(self.constraints) + '\n'
177
+ constraints_path = os.path.join(tempdir, 'constraints.txt')
178
+
179
+ write_text_file(constraints_path, constraints, True)
180
+
181
+ env = common_pip_environment()
182
+ env.update(PIP_CONSTRAINT=constraints_path)
183
+
184
+ command = [sys.executable, pip, 'wheel'] + options
185
+
186
+ execute_command(command, env=env, cwd=tempdir)
187
+ finally:
188
+ remove_tree(tempdir)
189
+
190
+
191
+ def parse_pre_build_instructions(requirements): # type: (str) -> list[PreBuild]
192
+ """Parse the given pip requirements and return a list of extracted pre-build instructions."""
193
+ # CAUTION: This code must be kept in sync with the sanity test hashing code in:
194
+ # test/lib/ansible_test/_internal/commands/sanity/__init__.py
195
+
196
+ pre_build_prefix = '# pre-build '
197
+ pre_build_requirement_prefix = pre_build_prefix + 'requirement: '
198
+ pre_build_constraint_prefix = pre_build_prefix + 'constraint: '
199
+
200
+ lines = requirements.splitlines()
201
+ pre_build_lines = [line for line in lines if line.startswith(pre_build_prefix)]
202
+
203
+ instructions = [] # type: list[PreBuild]
204
+
205
+ for line in pre_build_lines:
206
+ if line.startswith(pre_build_requirement_prefix):
207
+ instructions.append(PreBuild(line[len(pre_build_requirement_prefix):]))
208
+ elif line.startswith(pre_build_constraint_prefix):
209
+ instructions[-1].constraints.append(line[len(pre_build_constraint_prefix):])
210
+ else:
211
+ raise RuntimeError('Unsupported pre-build comment: ' + line)
212
+
213
+ return instructions
214
+
215
+
153
216
  def uninstall(pip, options): # type: (str, t.Dict[str, t.Any]) -> None
154
217
  """Perform a pip uninstall."""
155
218
  packages = options['packages']
@@ -1,155 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: ansible-core
3
- Version: 2.15.2rc1
4
- Summary: Radically simple IT automation
5
- Home-page: https://ansible.com/
6
- Author: Ansible, Inc.
7
- Author-email: info@ansible.com
8
- License: GPLv3+
9
- Project-URL: Bug Tracker, https://github.com/ansible/ansible/issues
10
- Project-URL: CI: Azure Pipelines, https://dev.azure.com/ansible/ansible/
11
- Project-URL: Code of Conduct, https://docs.ansible.com/ansible/latest/community/code_of_conduct.html
12
- Project-URL: Documentation, https://docs.ansible.com/ansible-core/
13
- Project-URL: Mailing lists, https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information
14
- Project-URL: Source Code, https://github.com/ansible/ansible
15
- Classifier: Development Status :: 5 - Production/Stable
16
- Classifier: Environment :: Console
17
- Classifier: Intended Audience :: Developers
18
- Classifier: Intended Audience :: Information Technology
19
- Classifier: Intended Audience :: System Administrators
20
- Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
21
- Classifier: Natural Language :: English
22
- Classifier: Operating System :: POSIX
23
- Classifier: Programming Language :: Python :: 3
24
- Classifier: Programming Language :: Python :: 3.9
25
- Classifier: Programming Language :: Python :: 3.10
26
- Classifier: Programming Language :: Python :: 3.11
27
- Classifier: Programming Language :: Python :: 3 :: Only
28
- Classifier: Topic :: System :: Installation/Setup
29
- Classifier: Topic :: System :: Systems Administration
30
- Classifier: Topic :: Utilities
31
- Requires-Python: >=3.9
32
- Description-Content-Type: text/x-rst
33
- License-File: COPYING
34
- Requires-Dist: jinja2 (>=3.0.0)
35
- Requires-Dist: PyYAML (>=5.1)
36
- Requires-Dist: cryptography
37
- Requires-Dist: packaging
38
- Requires-Dist: resolvelib (<1.1.0,>=0.5.3)
39
- Requires-Dist: importlib-resources (<5.1,>=5.0) ; python_version < "3.10"
40
-
41
- |PyPI version| |Docs badge| |Chat badge| |Build Status| |Code Of Conduct| |Mailing Lists| |License| |CII Best Practices|
42
-
43
- *******
44
- Ansible
45
- *******
46
-
47
- Ansible is a radically simple IT automation system. It handles
48
- configuration management, application deployment, cloud provisioning,
49
- ad-hoc task execution, network automation, and multi-node orchestration. Ansible makes complex
50
- changes like zero-downtime rolling updates with load balancers easy. More information on the Ansible `website <https://ansible.com/>`_.
51
-
52
- Design Principles
53
- =================
54
-
55
- * Have an extremely simple setup process with a minimal learning curve.
56
- * Manage machines quickly and in parallel.
57
- * Avoid custom-agents and additional open ports, be agentless by
58
- leveraging the existing SSH daemon.
59
- * Describe infrastructure in a language that is both machine and human
60
- friendly.
61
- * Focus on security and easy auditability/review/rewriting of content.
62
- * Manage new remote machines instantly, without bootstrapping any
63
- software.
64
- * Allow module development in any dynamic language, not just Python.
65
- * Be usable as non-root.
66
- * Be the easiest IT automation system to use, ever.
67
-
68
- Use Ansible
69
- ===========
70
-
71
- You can install a released version of Ansible with ``pip`` or a package manager. See our
72
- `installation guide <https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html>`_ for details on installing Ansible
73
- on a variety of platforms.
74
-
75
- Power users and developers can run the ``devel`` branch, which has the latest
76
- features and fixes, directly. Although it is reasonably stable, you are more likely to encounter
77
- breaking changes when running the ``devel`` branch. We recommend getting involved
78
- in the Ansible community if you want to run the ``devel`` branch.
79
-
80
- Get Involved
81
- ============
82
-
83
- * Read `Community
84
- Information <https://docs.ansible.com/ansible/latest/community>`_ for all
85
- kinds of ways to contribute to and interact with the project,
86
- including mailing list information and how to submit bug reports and
87
- code to Ansible.
88
- * Join a `Working Group
89
- <https://github.com/ansible/community/wiki>`_, an organized community devoted to a specific technology domain or platform.
90
- * Submit a proposed code update through a pull request to the ``devel`` branch.
91
- * Talk to us before making larger changes
92
- to avoid duplicate efforts. This not only helps everyone
93
- know what is going on, but it also helps save time and effort if we decide
94
- some changes are needed.
95
- * For a list of email lists, IRC channels and Working Groups, see the
96
- `Communication page <https://docs.ansible.com/ansible/latest/community/communication.html>`_
97
-
98
- Coding Guidelines
99
- =================
100
-
101
- We document our Coding Guidelines in the `Developer Guide <https://docs.ansible.com/ansible/devel/dev_guide/>`_. We particularly suggest you review:
102
-
103
- * `Contributing your module to Ansible <https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_checklist.html>`_
104
- * `Conventions, tips, and pitfalls <https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_best_practices.html>`_
105
-
106
- Branch Info
107
- ===========
108
-
109
- * The ``devel`` branch corresponds to the release actively under development.
110
- * The ``stable-2.X`` branches correspond to stable releases.
111
- * Create a branch based on ``devel`` and set up a `dev environment <https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#common-environment-setup>`_ if you want to open a PR.
112
- * See the `Ansible release and maintenance <https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html>`_ page for information about active branches.
113
-
114
- Roadmap
115
- =======
116
-
117
- Based on team and community feedback, an initial roadmap will be published for a major or minor version (ex: 2.7, 2.8).
118
- The `Ansible Roadmap page <https://docs.ansible.com/ansible/devel/roadmap/>`_ details what is planned and how to influence the roadmap.
119
-
120
- Authors
121
- =======
122
-
123
- Ansible was created by `Michael DeHaan <https://github.com/mpdehaan>`_
124
- and has contributions from over 5000 users (and growing). Thanks everyone!
125
-
126
- `Ansible <https://www.ansible.com>`_ is sponsored by `Red Hat, Inc.
127
- <https://www.redhat.com>`_
128
-
129
- License
130
- =======
131
-
132
- GNU General Public License v3.0 or later
133
-
134
- See `COPYING <COPYING>`_ to see the full text.
135
-
136
- .. |PyPI version| image:: https://img.shields.io/pypi/v/ansible-core.svg
137
- :target: https://pypi.org/project/ansible-core
138
- .. |Docs badge| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
139
- :target: https://docs.ansible.com/ansible/latest/
140
- .. |Build Status| image:: https://dev.azure.com/ansible/ansible/_apis/build/status/CI?branchName=devel
141
- :target: https://dev.azure.com/ansible/ansible/_build/latest?definitionId=20&branchName=devel
142
- .. |Chat badge| image:: https://img.shields.io/badge/chat-IRC-brightgreen.svg
143
- :target: https://docs.ansible.com/ansible/latest/community/communication.html
144
- .. |Code Of Conduct| image:: https://img.shields.io/badge/code%20of%20conduct-Ansible-silver.svg
145
- :target: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html
146
- :alt: Ansible Code of Conduct
147
- .. |Mailing Lists| image:: https://img.shields.io/badge/mailing%20lists-Ansible-orange.svg
148
- :target: https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information
149
- :alt: Ansible mailing lists
150
- .. |License| image:: https://img.shields.io/badge/license-GPL%20v3.0-brightgreen.svg
151
- :target: COPYING
152
- :alt: Repository License
153
- .. |CII Best Practices| image:: https://bestpractices.coreinfrastructure.org/projects/2372/badge
154
- :target: https://bestpractices.coreinfrastructure.org/projects/2372
155
- :alt: Ansible CII Best Practices certification
@@ -1,61 +0,0 @@
1
- """Sanity test for documentation of sanity tests."""
2
- from __future__ import annotations
3
-
4
- import os
5
-
6
- from . import (
7
- SanityVersionNeutral,
8
- SanityMessage,
9
- SanityFailure,
10
- SanitySuccess,
11
- SanityTargets,
12
- sanity_get_tests,
13
- )
14
-
15
- from ...test import (
16
- TestResult,
17
- )
18
-
19
- from ...config import (
20
- SanityConfig,
21
- )
22
-
23
- from ...data import (
24
- data_context,
25
- )
26
-
27
-
28
- class SanityDocsTest(SanityVersionNeutral):
29
- """Sanity test for documentation of sanity tests."""
30
-
31
- ansible_only = True
32
-
33
- @property
34
- def can_ignore(self) -> bool:
35
- """True if the test supports ignore entries."""
36
- return False
37
-
38
- @property
39
- def no_targets(self) -> bool:
40
- """True if the test does not use test targets. Mutually exclusive with all_targets."""
41
- return True
42
-
43
- def test(self, args: SanityConfig, targets: SanityTargets) -> TestResult:
44
- sanity_dir = 'docs/docsite/rst/dev_guide/testing/sanity'
45
- sanity_docs = set(part[0] for part in (os.path.splitext(os.path.basename(path)) for path in data_context().content.get_files(sanity_dir))
46
- if part[1] == '.rst')
47
- sanity_tests = set(sanity_test.name for sanity_test in sanity_get_tests())
48
-
49
- missing = sanity_tests - sanity_docs
50
-
51
- results = []
52
-
53
- results += [SanityMessage(
54
- message='missing docs for ansible-test sanity --test %s' % r,
55
- path=os.path.join(sanity_dir, '%s.rst' % r),
56
- ) for r in sorted(missing)]
57
-
58
- if results:
59
- return SanityFailure(self.name, messages=results)
60
-
61
- return SanitySuccess(self.name)