Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
380d52cd13 | ||
|
|
7d11d23294 |
No files matched your search
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
# Merged under every scenario's molecule.yml. prerun off: the CI wrapper puts this checkout
|
||||||
|
# first on ANSIBLE_COLLECTIONS_PATH, so molecule's per-scenario install is unused.
|
||||||
|
prerun: false
|
||||||
|
provisioner:
|
||||||
|
config_options:
|
||||||
|
connection:
|
||||||
|
# Pipe each module over stdin: without it every task pays extra docker exec and docker cp
|
||||||
|
# calls to make a temp dir, copy the module in and clean up.
|
||||||
|
pipelining: true
|
||||||
|
defaults:
|
||||||
|
# Gather each host's facts once per playbook run, not in every play.
|
||||||
|
gathering: smart
|
||||||
@@ -85,9 +85,10 @@ issue.
|
|||||||
- **A role named in an include, import, play `roles:` entry or meta dependency is written out in
|
- **A role named in an include, import, play `roles:` entry or meta dependency is written out in
|
||||||
full**, never bare or templated. *Why:* the selector finds dependent roles by their FQCN.
|
full**, never bare or templated. *Why:* the selector finds dependent roles by their FQCN.
|
||||||
*Held:* control: a selector test fails a bare or templated name.
|
*Held:* control: a selector test fails a bare or templated name.
|
||||||
- **Scenarios load `mortis.kamino` from the checkout, never from molecule's installed copy, so
|
- **Scenarios load `mortis.kamino` from the checkout, never from an installed copy, so
|
||||||
`galaxy.yml` is on IGNORED.** *Why:* molecule installs the collection from `galaxy.yml` into
|
`galaxy.yml` is on IGNORED.** *Why:* the checkout is first on `ANSIBLE_COLLECTIONS_PATH` and the
|
||||||
each scenario's `ANSIBLE_HOME`, which is not on `ANSIBLE_COLLECTIONS_PATH`, so its changes
|
shared base config `.config/molecule/config.yml` turns off molecule's install of the collection
|
||||||
|
(`prerun: false`), so changes to `galaxy.yml`
|
||||||
(release versions, `build_ignore`) do not change what a scenario runs, and the Build check
|
(release versions, `build_ignore`) do not change what a scenario runs, and the Build check
|
||||||
proves the collection builds; they had caused about a third of full pull request runs and their
|
proves the collection builds; they had caused about a third of full pull request runs and their
|
||||||
minutes (#338). *Held:* control: `scripts/check_scenarios_load_checkout.py`, which
|
minutes (#338). *Held:* control: `scripts/check_scenarios_load_checkout.py`, which
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
minor_changes:
|
|
||||||
- >-
|
|
||||||
cloudflared - New input ``cloudflared_tunnel_lookup_delay``, the seconds between the three
|
|
||||||
retries of a 404 from the tunnel lookup while a new tunnel may not be visible yet. The default
|
|
||||||
is 5, as before.
|
|
||||||
@@ -39,6 +39,7 @@ build_ignore:
|
|||||||
- apm_modules
|
- apm_modules
|
||||||
- .apm-local
|
- .apm-local
|
||||||
- .claude
|
- .claude
|
||||||
|
- .config
|
||||||
- .gitea
|
- .gitea
|
||||||
- .gitignore
|
- .gitignore
|
||||||
- .pre-commit-config.yaml
|
- .pre-commit-config.yaml
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ The role targets Ubuntu hosts that run the tunnel daemon, not Proxmox nodes, so
|
|||||||
| `cloudflared_zone_name` | `""` (asserted while `cloudflared_manage_dns`) | Zone of the ingress hostnames. |
|
| `cloudflared_zone_name` | `""` (asserted while `cloudflared_manage_dns`) | Zone of the ingress hostnames. |
|
||||||
| `cloudflared_allow_dns_overwrite` | `[]` | Hostnames whose existing non-tunnel DNS record may be overwritten. |
|
| `cloudflared_allow_dns_overwrite` | `[]` | Hostnames whose existing non-tunnel DNS record may be overwritten. |
|
||||||
| `cloudflared_api_base_url` | `https://api.cloudflare.com/client/v4` | Cloudflare API base URL for the role's `uri` calls, no trailing slash. |
|
| `cloudflared_api_base_url` | `https://api.cloudflare.com/client/v4` | Cloudflare API base URL for the role's `uri` calls, no trailing slash. |
|
||||||
| `cloudflared_tunnel_lookup_delay` | `5` | Seconds between the three retries of a 404 from the tunnel lookup, at least 0. |
|
|
||||||
| `cloudflared_tunnel_name` | `{{ inventory_hostname }}-tunnel` | Tunnel name used by the `mint` entry point. |
|
| `cloudflared_tunnel_name` | `{{ inventory_hostname }}-tunnel` | Tunnel name used by the `mint` entry point. |
|
||||||
| `cloudflared_version` | pinned in `defaults/main.yml` | Release tag, `YYYY.M.P`. |
|
| `cloudflared_version` | pinned in `defaults/main.yml` | Release tag, `YYYY.M.P`. |
|
||||||
| `cloudflared_sha256_amd64` | pinned | SHA-256 of the amd64 binary. Update with the version. |
|
| `cloudflared_sha256_amd64` | pinned | SHA-256 of the amd64 binary. Update with the version. |
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ cloudflared_config_dir: "/etc/cloudflared"
|
|||||||
cloudflared_service_unit: "/etc/systemd/system/cloudflared.service"
|
cloudflared_service_unit: "/etc/systemd/system/cloudflared.service"
|
||||||
|
|
||||||
cloudflared_api_base_url: "https://api.cloudflare.com/client/v4"
|
cloudflared_api_base_url: "https://api.cloudflare.com/client/v4"
|
||||||
# Seconds between the three retries of a 404 from the tunnel lookup.
|
|
||||||
cloudflared_tunnel_lookup_delay: 5
|
|
||||||
|
|
||||||
cloudflared_tunnel_name: "{{ inventory_hostname }}-tunnel"
|
cloudflared_tunnel_name: "{{ inventory_hostname }}-tunnel"
|
||||||
|
|
||||||
|
|||||||
@@ -102,13 +102,6 @@ argument_specs:
|
|||||||
Base URL of the Cloudflare API, without a trailing slash. Prefixed to every request the role makes with
|
Base URL of the Cloudflare API, without a trailing slash. Prefixed to every request the role makes with
|
||||||
C(ansible.builtin.uri) (tunnel lookup and delete, zone lookup and DNS record listing). The
|
C(ansible.builtin.uri) (tunnel lookup and delete, zone lookup and DNS record listing). The
|
||||||
C(community.general.cloudflare_dns) tasks always use the public endpoint.
|
C(community.general.cloudflare_dns) tasks always use the public endpoint.
|
||||||
cloudflared_tunnel_lookup_delay:
|
|
||||||
type: int
|
|
||||||
default: 5
|
|
||||||
description:
|
|
||||||
- >-
|
|
||||||
Seconds between the three retries of the tunnel lookup when Cloudflare answers 404, which right
|
|
||||||
after a mint can be read-after-write lag rather than a deleted tunnel. At least 0.
|
|
||||||
cloudflared_tunnel_name:
|
cloudflared_tunnel_name:
|
||||||
type: raw
|
type: raw
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -23,8 +23,6 @@
|
|||||||
cloudflared_user: "{{ cloudflared_test_case.vars.cloudflared_user | default('cloudflared') }}"
|
cloudflared_user: "{{ cloudflared_test_case.vars.cloudflared_user | default('cloudflared') }}"
|
||||||
cloudflared_install_dir: "{{ cloudflared_test_case.vars.cloudflared_install_dir | default('/usr/local/bin') }}"
|
cloudflared_install_dir: "{{ cloudflared_test_case.vars.cloudflared_install_dir | default('/usr/local/bin') }}"
|
||||||
cloudflared_config_dir: "{{ cloudflared_test_case.vars.cloudflared_config_dir | default('/etc/cloudflared') }}"
|
cloudflared_config_dir: "{{ cloudflared_test_case.vars.cloudflared_config_dir | default('/etc/cloudflared') }}"
|
||||||
# The stub answers at once, so the retries need no wait; they still run.
|
|
||||||
cloudflared_tunnel_lookup_delay: "{{ cloudflared_test_case.vars.cloudflared_tunnel_lookup_delay | default(0) }}"
|
|
||||||
|
|
||||||
# Only reached when the include returned. The message must not contain the expected
|
# Only reached when the include returned. The message must not contain the expected
|
||||||
# text, so the rescue below cannot mistake it for the failure under test.
|
# text, so the rescue below cannot mistake it for the failure under test.
|
||||||
|
|||||||
@@ -157,9 +157,6 @@
|
|||||||
- name: tunnel-id-not-uuid
|
- name: tunnel-id-not-uuid
|
||||||
vars: {cloudflared_tunnel_id: not-a-uuid}
|
vars: {cloudflared_tunnel_id: not-a-uuid}
|
||||||
expect: must be a lowercase UUID
|
expect: must be a lowercase UUID
|
||||||
- name: lookup-delay-negative
|
|
||||||
vars: {cloudflared_tunnel_lookup_delay: -1}
|
|
||||||
expect: cloudflared_tunnel_lookup_delay must be a whole number of seconds, at least 0
|
|
||||||
- name: tunnel-not-minted
|
- name: tunnel-not-minted
|
||||||
vars: {cloudflared_tunnel_id: ""}
|
vars: {cloudflared_tunnel_id: ""}
|
||||||
expect: run the mint entry point first
|
expect: run the mint entry point first
|
||||||
@@ -175,7 +172,7 @@
|
|||||||
- name: tunnel-deleted
|
- name: tunnel-deleted
|
||||||
vars: {cloudflared_tunnel_id: 6f1a6e2c-0000-4000-8000-000000000002}
|
vars: {cloudflared_tunnel_id: 6f1a6e2c-0000-4000-8000-000000000002}
|
||||||
expect: no longer exists on Cloudflare
|
expect: no longer exists on Cloudflare
|
||||||
# Retried three times (with no delay here) before the 404 is trusted.
|
# Retried three times, 5 s apart, before the 404 is trusted.
|
||||||
- name: tunnel-unknown
|
- name: tunnel-unknown
|
||||||
vars: {cloudflared_tunnel_id: 6f1a6e2c-0000-4000-8000-00000000000f}
|
vars: {cloudflared_tunnel_id: 6f1a6e2c-0000-4000-8000-00000000000f}
|
||||||
expect: (HTTP 404)
|
expect: (HTTP 404)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
# briefly before trusting it.
|
# briefly before trusting it.
|
||||||
until: __cloudflared_tunnel_lookup.status | default(0) == 200
|
until: __cloudflared_tunnel_lookup.status | default(0) == 200
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: "{{ cloudflared_tunnel_lookup_delay }}"
|
delay: 5
|
||||||
# Running out of retries fails the task whatever its status, and no_log would hide why: the
|
# Running out of retries fails the task whatever its status, and no_log would hide why: the
|
||||||
# two tasks below fail instead, with the re-mint instructions for a 404.
|
# two tasks below fail instead, with the re-mint instructions for a 404.
|
||||||
ignore_errors: true # noqa: ignore-errors
|
ignore_errors: true # noqa: ignore-errors
|
||||||
|
|||||||
@@ -63,12 +63,6 @@
|
|||||||
newline or %, and the two directories must be absolute paths.
|
newline or %, and the two directories must be absolute paths.
|
||||||
quiet: true
|
quiet: true
|
||||||
|
|
||||||
- name: Require a non-negative tunnel lookup delay
|
|
||||||
ansible.builtin.assert:
|
|
||||||
that: cloudflared_tunnel_lookup_delay | int(-1) >= 0
|
|
||||||
fail_msg: cloudflared_tunnel_lookup_delay must be a whole number of seconds, at least 0.
|
|
||||||
quiet: true
|
|
||||||
|
|
||||||
# The role never creates the tunnel on its main entry point. Defined and empty (or null) counts
|
# The role never creates the tunnel on its main entry point. Defined and empty (or null) counts
|
||||||
# as missing, as in the mint entry point, so the two cannot disagree.
|
# as missing, as in the mint entry point, so the two cannot disagree.
|
||||||
- name: Require the minted tunnel secrets
|
- name: Require the minted tunnel secrets
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ else
|
|||||||
fi
|
fi
|
||||||
ansible --version
|
ansible --version
|
||||||
molecule --version
|
molecule --version
|
||||||
# The collection under test first; molecule also installs it into each scenario's ANSIBLE_HOME,
|
# The collection under test first; molecule does not install it again (prerun is off in
|
||||||
# which the run script keeps in the job tree.
|
# .config/molecule/config.yml).
|
||||||
export ANSIBLE_COLLECTIONS_PATH="$AC_ROOT:${extra_collections}/opt/collections"
|
export ANSIBLE_COLLECTIONS_PATH="$AC_ROOT:${extra_collections}/opt/collections"
|
||||||
# Facts are not injected as variables (deprecated in ansible-core 2.22, removal scheduled for 2.24, see #364), so a
|
# Facts are not injected as variables (deprecated in ansible-core 2.22, removal scheduled for 2.24, see #364), so a
|
||||||
# role that reads a bare `ansible_<fact>` fails its scenario here instead of in a consumer's inventory.
|
# role that reads a bare `ansible_<fact>` fails its scenario here instead of in a consumer's inventory.
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# The Molecule workflow's "Run the scenarios" step: `molecule test` for each scenario directory on
|
# The Molecule workflow's "Run the scenarios" step: `molecule test` for each scenario directory on
|
||||||
# stdin, MOLECULE_LANES (default 4) at a time, each with its own log and ANSIBLE_HOME under
|
# stdin, MOLECULE_LANES (default 4) at a time, each with its own log and ANSIBLE_HOME under
|
||||||
# <work-dir>/<n>/ (molecule reinstalls the collection there with --force). Exit 1 on a failure.
|
# <work-dir>/<n>/ (no collection is installed there: .config/molecule/config.yml sets prerun false).
|
||||||
|
# Exit 1 on a failure.
|
||||||
#
|
#
|
||||||
# scripts/run_molecule_scenarios.sh <work-dir> < scenario-dirs
|
# scripts/run_molecule_scenarios.sh <work-dir> < scenario-dirs
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|||||||
Reference in new issue
Block a user