Skip to content

Commit 6aae498

Browse files
authored
Merge branch 'main' into fix_3839
2 parents f011c79 + a7174f1 commit 6aae498

File tree

10 files changed

+46
-45
lines changed

10 files changed

+46
-45
lines changed

.config/requirements-docs.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
mkdocs-ansible>=24.2.1
1+
mkdocs-ansible>=24.3.0
22
pipdeptree>=2.4.0
33
linkchecker>=10.4.0

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ jobs:
2929
with:
3030
fetch-depth: 0 # needed by setuptools-scm
3131
- name: Build dists
32-
run: python -m tox -e pkg
32+
run: python3 -m tox -e pkg
3333
- name: Publish to pypi.org
3434
uses: pypa/gh-action-pypi-publish@release/v1

.pre-commit-config.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
hooks:
2424
- id: codespell
2525
- repo: https://github.com/psf/black
26-
rev: 24.2.0
26+
rev: 24.3.0
2727
hooks:
2828
- id: black
2929
language_version: python3
@@ -47,12 +47,12 @@ repos:
4747
types: [file, yaml]
4848
entry: yamllint --strict
4949
- repo: https://github.com/astral-sh/ruff-pre-commit
50-
rev: "v0.2.2"
50+
rev: "v0.3.4"
5151
hooks:
5252
- id: ruff
5353
args: [--fix, --exit-non-zero-on-fix]
5454
- repo: https://github.com/pre-commit/mirrors-mypy
55-
rev: v1.8.0
55+
rev: v1.9.0
5656
hooks:
5757
- id: mypy
5858
# empty args needed in order to match mypy cli behavior
@@ -77,7 +77,7 @@ repos:
7777
- types-setuptools
7878
- wcmatch
7979
- repo: https://github.com/pycqa/pylint
80-
rev: v3.0.3
80+
rev: v3.1.0
8181
hooks:
8282
- id: pylint
8383
args:
@@ -94,6 +94,6 @@ repos:
9494
- pytest-testinfra
9595
- wcmatch
9696
- repo: https://github.com/ansible/ansible-lint
97-
rev: v24.2.0
97+
rev: v24.2.1
9898
hooks:
9999
- id: ansible-lint

docs/ci.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pipeline, much like any others, that's built into GitHub.
1212
An action to clone a repo as `molecule_demo`, and run `molecule test` in
1313
ubuntu.
1414

15+
{% raw %}
16+
1517
```yaml
1618
---
1719
name: Molecule Test
@@ -41,20 +43,26 @@ jobs:
4143
molecule test
4244
```
4345
46+
{% endraw %}
47+
4448
If you need access to requirements in private repositories, [create a
4549
token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)
4650
with the required privileges, then define a `GIT_CREDENTIALS` secret for
4751
your repository with a value looking like
4852
`https://username:token@github.com/`, and finally add the
4953
following step before "Test with molecule".
5054

55+
{% raw %}
56+
5157
```yaml
5258
- name: Setup git credentials
5359
uses: fusion-engineering/setup-git-credentials@v2
5460
with:
55-
credentials: ${{secrets.GIT_CREDENTIALS}}
61+
credentials: ${{ secrets.GIT_CREDENTIALS }}
5662
```
5763

64+
{% endraw %}
65+
5866
## Travis CI
5967

6068
[Travis](https://travis-ci.com/) is a CI platform, which can be used to
@@ -189,10 +197,10 @@ steps:
189197
inputs:
190198
versionSpec: "3.10"
191199
192-
- script: python -m pip install "molecule[lint]" "python-vagrant" "molecule-vagrant" "ansible"
200+
- script: python3 -m pip install "molecule[lint]" "python-vagrant" "molecule-vagrant" "ansible"
193201
displayName: Install dependencies
194202
195-
- script: python -m pip install "python-tss-sdk"
203+
- script: python3 -m pip install "python-tss-sdk"
196204
displayName: Role-specific dependencies
197205
198206
- script: |
@@ -327,11 +335,13 @@ pipeline {
327335
of the role root directory. For example :
328336

329337
``` yaml
338+
{% raw %}
330339
---
331340
- name: Converge
332341
hosts: all
333342
roles:
334343
- role: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
344+
{% endraw %}
335345
```
336346

337347
This is the cleaner of the current choices. See

docs/guides/docker-rootless.md

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ variable `SUDO_GROUP` depends on the target distribution as Debian uses `sudo`
1717
instead of `wheel` group.
1818

1919
```docker
20+
{% raw %}
2021
# Create `ansible` user with sudo permissions and membership in `DEPLOY_GROUP`
2122
# This template gets rendered using `loop: "{{ molecule_yml.platforms }}"`, so
2223
# each `item` is an element of platforms list from the molecule.yml file for this scenario.
@@ -29,6 +30,7 @@ RUN set -xe \
2930
&& usermod -aG ${SUDO_GROUP} ${ANSIBLE_USER} \
3031
&& usermod -aG ${DEPLOY_GROUP} ${ANSIBLE_USER} \
3132
&& sed -i "/^%${SUDO_GROUP}/s/ALL\$/NOPASSWD:ALL/g" /etc/sudoers
33+
{% endraw %}
3234
```
3335

3436
Modify `provisioner.inventory` in `molecule.yml` as follows:

docs/installation.md

+12-24
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Installation
22

3-
This document assumes the developer has a basic understanding of python
4-
packaging, and how to install and manage python on the system executing
3+
This document assumes the developer has a basic understanding of Python
4+
packaging, and how to install and manage Python on the system executing
55
Molecule.
66

77
## Requirements
@@ -28,27 +28,17 @@ packages.
2828

2929
[pip] is the only supported installation method.
3030

31-
!!! warning
32-
33-
Ansible is not listed as a direct dependency of molecule package because
34-
we only call it as a command line tool. You may want to install it using
35-
your distribution package installer.
31+
{{ install_from_adt("ansible-navigator") }}
3632

3733
```bash
3834
$ python3 -m pip install molecule ansible-core
3935
```
4036

41-
!!! warning
42-
43-
`ansible` and `ansible-base` pip **extras** were removed in molecule
44-
`4.0.0`. If you used them, please switch to explicit package mention to
45-
avoid problem with newer versions of molecule.
46-
4737
Keep in mind that on selinux supporting systems, if you install into a
4838
virtual environment, you may face [issue 34340](https://github.com/ansible/ansible/issues/34340) even if
4939
selinux is not enabled or is configured to be permissive.
5040

51-
It is your responsibility to assure that soft dependencies of Ansible
41+
It is your responsibility to ensure that soft dependencies of Ansible
5242
are available on your controller or host machines.
5343

5444
!!! warning
@@ -67,8 +57,7 @@ $ python3 -m pip install --upgrade --user setuptools
6757
### Requirements
6858

6959
Depending on the driver chosen, you may need to install additional
70-
python packages. See the driver's documentation or `INSTALL.rst`, which
71-
is created when initializing a new scenario.
60+
Python packages. See the driver's documentation in that case.
7261

7362
### Install
7463

@@ -104,20 +93,20 @@ $ python3 -m pip install --user "molecule-plugins[podman]"
10493

10594
Installing molecule package also installed its main script `molecule`,
10695
usually in `PATH`. Users should know that molecule can also be called as
107-
a python module, using `python -m molecule ...`. This alternative method
96+
a python module, using `python3 -m molecule ...`. This alternative method
10897
has some benefits:
10998

110-
- allows to explicitly control which python interpreter is used by
99+
- allows to explicitly control which Python interpreter is used by
111100
molecule
112-
- allows molecule installation at user level without even needing to
101+
- allows molecule installation at the user level without even needing to
113102
have the script in `PATH`.
114103

115104
## Container
116105

117-
Molecule is built into a container image by the [Ansible Creator Execution
106+
`Molecule` is built into a container image by the [Ansible Creator Execution
118107
Environment](https://github.com/ansible/creator-ee) project, `creator-ee`.
119108

120-
Any questions or bugs related to use of Molecule from within a container
109+
Any questions or bugs related to the use of Molecule from within a container
121110
should be addressed by the Ansible Creator Execution Environment
122111
project.
123112

@@ -129,9 +118,8 @@ Follow the instructions below to do the initial install and subsequent
129118
updates.
130119

131120
The package distribution that you'll get installed will be
132-
autogenerated and will contain a commit hash information making it
133-
easier to refer to certain unstable version should the need to send a
134-
bug report arise.
121+
autogenerated and will contain commit hash information, making it
122+
easier to refer to.
135123

136124
### Requirements
137125

mkdocs.yml

+3
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ nav:
7272
- guides/custom-image.md
7373
- guides/docker-rootless.md
7474
- guides/monolith.md
75+
- guides/inside-a-container.md
7576
- guides/parallel.md
7677
- guides/podman-inside-docker.md
7778
- guides/sharing.md
@@ -81,6 +82,8 @@ nav:
8182

8283
plugins:
8384
- autorefs
85+
- macros:
86+
modules: [mkdocs-ansible:mkdocs_ansible]
8487
- material/search:
8588
separator: '[\s\-,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'
8689
- material/social

pyproject.toml

+2-4
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ profile = "black"
7676
known_first_party = "molecule"
7777

7878
[tool.mypy]
79-
python_version = 3.10
79+
python_version = "3.10"
8080
# strict = true
8181
color_output = true
8282
error_summary = true
@@ -222,9 +222,7 @@ known-first-party = ["molecule"]
222222
[tool.setuptools.dynamic]
223223
optional-dependencies.docs = { file = [".config/requirements-docs.txt"] }
224224
optional-dependencies.test = { file = [".config/requirements-test.txt"] }
225-
optional-dependencies.testinfra = { file = [
226-
".config/requirements-testinfra.txt",
227-
] }
225+
optional-dependencies.testinfra = { file = [".config/requirements-testinfra.txt"] }
228226
dependencies = { file = [".config/requirements.in"] }
229227

230228
[tool.setuptools_scm]

test/scenarios/verifier/.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ repos:
44
hooks:
55
- id: flake8
66
name: flake8
7-
entry: python -m flake8 --max-line-length=120
7+
entry: python3 -m flake8 --max-line-length=120
88
language: system
99
types: [python]

tox.ini

+6-6
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ commands =
5555
# failsafe as pip may install incompatible dependencies
5656
pip check
5757
# failsafe for preventing changes that may break pytest collection
58-
sh -c "PYTEST_ADDOPTS= python -m pytest -p no:cov --collect-only >>/dev/null"
58+
sh -c "PYTEST_ADDOPTS= python3 -m pytest -p no:cov --collect-only >>/dev/null"
5959
sh -c "rm -f .tox/.coverage.*"
6060
# html report is used by Zuul CI to display reports
6161
coverage run -m pytest {env:_EXTRAS} {env:PYTEST_ADDOPTS:} {posargs}
@@ -71,7 +71,7 @@ description = Runs all linting tasks
7171
basepython = python3.10
7272
commands =
7373
# to run a single linter you can do "pre-commit run flake8"
74-
python -m pre_commit run {posargs:--all --show-diff-on-failure}
74+
python3 -m pre_commit run {posargs:--all --show-diff-on-failure}
7575
deps =
7676
pre-commit>=2.21.0
7777
check-jsonschema>=0.20.0
@@ -86,8 +86,8 @@ description = Build documentation
8686
passenv = *
8787
usedevelop = true
8888
commands =
89-
linkchecker -f linkcheckerrc docs
90-
mkdocs build -c --strict {posargs:}
89+
linkchecker -q -f linkcheckerrc docs
90+
mkdocs {posargs:build -c --strict}
9191
extras =
9292
docs
9393

@@ -105,11 +105,11 @@ deps =
105105
setenv =
106106
commands =
107107
rm -rfv {toxinidir}/dist/
108-
python -m build \
108+
python3 -m build \
109109
--outdir {toxinidir}/dist/ \
110110
{toxinidir}
111111
# metadata validation
112-
sh -c "python -m twine check --strict {toxinidir}/dist/*"
112+
sh -c "python3 -m twine check --strict {toxinidir}/dist/*"
113113

114114
[testenv:snap]
115115
description = Builds a snap package

0 commit comments

Comments
 (0)