From bb8a5635c18e12785c7fef2a0419f60cfd4063f6 Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 11 Oct 2023 22:13:27 +0800 Subject: [PATCH 1/3] Pin linkchecker version (#4050) In linkchecker 10.3.1, the exit code is 1, but in 10.2.1, it's 0 ```log That's it. 360 links in 424 URLs checked. 65 warnings found. 0 errors found. Stopped checking at 2023-09-22 09:20:28+000 (35 seconds) docs: exit 1 (35.79 seconds) /home/runner/work/molecule/molecule> linkchecker -f linkcheckerrc site pid=3833 .pkg: _exit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta docs: FAIL code 1 (46.37=setup[2.92]+cmd[7.66,35.79] seconds) evaluation failed :( (46.53 seconds) ``` --- .config/requirements-docs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/requirements-docs.txt b/.config/requirements-docs.txt index 5f4bbb5aa6..884fe492ef 100644 --- a/.config/requirements-docs.txt +++ b/.config/requirements-docs.txt @@ -1,3 +1,3 @@ mkdocs-ansible[lock]>=0.1.4 pipdeptree>=2.4.0 -linkchecker +linkchecker==10.2.1 From 9a8f4e05f3d139f731f6a1d873046520c2fca11e Mon Sep 17 00:00:00 2001 From: Jonas L Date: Wed, 11 Oct 2023 16:22:10 +0200 Subject: [PATCH 2/3] Fix forbidden implicit octal value (#4049) Fix ansible-lint yaml[octal-values] https://ansible.readthedocs.io/projects/lint/rules/risky-octal/ Co-authored-by: Sorin Sbarnea --- molecule/default/create.yml | 2 +- molecule/default/destroy.yml | 2 +- src/molecule/data/templates/scenario/create.yml.j2 | 3 +-- src/molecule/data/templates/scenario/destroy.yml.j2 | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/molecule/default/create.yml b/molecule/default/create.yml index b33ceb6c82..c847720b32 100644 --- a/molecule/default/create.yml +++ b/molecule/default/create.yml @@ -34,4 +34,4 @@ {{ instance_conf | to_json | from_json | to_yaml }} dest: "{{ molecule_instance_config }}" - mode: 0600 + mode: "0600" diff --git a/molecule/default/destroy.yml b/molecule/default/destroy.yml index f4493abea5..37137c3de2 100644 --- a/molecule/default/destroy.yml +++ b/molecule/default/destroy.yml @@ -20,5 +20,5 @@ {{ instance_conf | to_json | from_json | to_yaml }} dest: "{{ molecule_instance_config }}" - mode: 0600 + mode: "0600" when: server.changed | default(false) | bool # noqa no-handler diff --git a/src/molecule/data/templates/scenario/create.yml.j2 b/src/molecule/data/templates/scenario/create.yml.j2 index d589bc2db4..1c9456a8e6 100644 --- a/src/molecule/data/templates/scenario/create.yml.j2 +++ b/src/molecule/data/templates/scenario/create.yml.j2 @@ -6,7 +6,6 @@ gather_facts: false # no_log: "{{ molecule_no_log }}" tasks: - # TODO: Developer must implement and populate 'server' variable - name: Create instance config @@ -34,5 +33,5 @@ {{ instance_conf | to_json | from_json | to_yaml }} dest: "{{ molecule_instance_config }}" - mode: 0600 + mode: "0600" {%- endraw %} diff --git a/src/molecule/data/templates/scenario/destroy.yml.j2 b/src/molecule/data/templates/scenario/destroy.yml.j2 index 08b95b329a..d1bd41897d 100644 --- a/src/molecule/data/templates/scenario/destroy.yml.j2 +++ b/src/molecule/data/templates/scenario/destroy.yml.j2 @@ -21,6 +21,6 @@ {{ instance_conf | to_json | from_json | to_yaml }} dest: "{{ molecule_instance_config }}" - mode: 0600 + mode: "0600" when: server.changed | default(false) | bool # noqa no-handler {%- endraw %} From 85258d116db4e8961e4f0ee1b2aeda971108cba3 Mon Sep 17 00:00:00 2001 From: Kate Case Date: Mon, 16 Oct 2023 10:54:20 -0400 Subject: [PATCH 3/3] Update docs to remove references to Docker being the default driver (#4065) Fixes https://github.com/ansible/molecule/issues/4059 There are probably other, subtler references I'm not aware of --- docs/examples.md | 2 +- docs/getting-started.md | 4 ++-- src/molecule/driver/delegated.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/examples.md b/docs/examples.md index ffdccb64c2..030c248691 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -39,7 +39,7 @@ scenario's generated `molecule.yml` file. ## Docker With Non-Privileged User -The default Molecule Docker driver executes Ansible playbooks as the +The Molecule Docker driver executes Ansible playbooks as the root user. If your workflow requires adding support for running as a non-privileged user, then adapt `molecule.yml` and `Dockerfile.j2` as follows. diff --git a/docs/getting-started.md b/docs/getting-started.md index 4225d951e8..9771be4ddf 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -118,8 +118,8 @@ components that Molecule provides. These are: uses [galaxy development guide] by default to resolve your role dependencies. - The [driver](configuration.md#driver) provider. Molecule uses - [Docker](https://docs.docker.com/) by default. Molecule uses the - driver to delegate the task of creating instances. + the [Delegated](configuration.md#delegated) driver by default. + Molecule uses the driver to delegate the task of creating instances. - The [platforms](configuration.md#platforms) definitions. Molecule relies on this to know which instances to create, name and to which group each instance belongs. If you need to test your role against diff --git a/src/molecule/driver/delegated.py b/src/molecule/driver/delegated.py index f6802aea98..b89865249f 100644 --- a/src/molecule/driver/delegated.py +++ b/src/molecule/driver/delegated.py @@ -32,7 +32,7 @@ class Delegated(Driver): r"""The class responsible for managing default instances. - Delegated is `not` the default driver used in Molecule. + Delegated is the default driver used in Molecule. Under this driver, it is the developers responsibility to implement the create and destroy playbooks. ``Managed`` is the default behaviour of all