Skip to content

Commit fc8e80a

Browse files
author
Martin Jackson
committed
Remove duplicate playbook to remove confusion
1 parent 392baaf commit fc8e80a

5 files changed

Lines changed: 26 additions & 41 deletions

File tree

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,10 @@ already completed (duplicate inject is skipped).
5454
the configured backend.
5555

5656
- **`playbooks/load_bootstrap_secrets.yml`**
57-
Convenience wrapper: `determine_pattern_dir`, `determine_pattern_name`, then imports `load_secrets.yml` (same behavior
58-
as install).
59-
60-
- **`playbooks/load_bootstrap_secrets_only.yml`**
61-
**Early bootstrap inject only**: same pattern discovery plays and `pattern_settings`, then only the Kubernetes inject
62-
for bootstrap-tagged secrets in the primary file (with retries). **Fails** if no primary file exists or there are no
63-
bootstrap-tagged v2 entries. Does **not** read `secretLoader.disabled` or load into Vault / primary backend.
57+
**Early bootstrap inject only**: `determine_pattern_dir`, `determine_pattern_name`, `pattern_settings`, then only the
58+
Kubernetes inject for bootstrap-tagged secrets in the primary file (with retries). **Fails** if no primary file exists
59+
or there are no bootstrap-tagged v2 entries. Does **not** read `secretLoader.disabled` or load into Vault / primary
60+
backend. For the full early-then-primary flow, use `load_secrets.yml` (or `install.yml`).
6461

6562
- **`playbooks/display_secrets_info.yml`**
6663
Loads and displays parsed secrets (using the backend from `values-global`). For v2 files with any bootstrap-tagged
@@ -82,7 +79,7 @@ Outer retries (parse plus Kubernetes apply) are controlled on the role defaults
8279
- `vp_secrets_bootstrap_retry_max` (default `20`)
8380
- `vp_secrets_bootstrap_retry_delay` (seconds between attempts, default `30`)
8481

85-
These apply to the early inject path inside `load_secrets` and to `load_bootstrap_secrets_only.yml`.
82+
These apply to the early inject path inside `load_secrets` and to `load_bootstrap_secrets.yml`.
8683

8784
Per-secret namespace readiness (before each `kubernetes.core.k8s` apply) uses role defaults on `k8s_secret_utils`:
8885

@@ -95,8 +92,8 @@ all secret injections from the start.
9592

9693
- `roles/load_secrets/tasks/main.yml` implements the **combined** flow (early inject from primary file, then primary
9794
backend load).
98-
- `roles/load_secrets/tasks/bootstrap_only.yml` is used only when you invoke the `load_secrets` role with
99-
`tasks_from: bootstrap_only.yml` (as `load_bootstrap_secrets_only.yml` does).
95+
- `roles/load_secrets/tasks/bootstrap_only.yml` is used when you invoke the `load_secrets` role with
96+
`tasks_from: bootstrap_only.yml` (as `playbooks/load_bootstrap_secrets.yml` does).
10097
- `roles/find_vp_secrets` resolves the primary file (`tasks/main.yml`).
10198
- v2 parsing and phase filters (`bootstrap_only`, `exclude_bootstrap`, `all`) are implemented in
10299
`plugins/module_utils/parse_secrets_v2.py` (single `bootstrap` normalizer: off / dual / early-only).

playbooks/determine_pattern_dir.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
# Resolves pattern_dir the same way as the pattern_settings role (extra-vars, PATTERN_DIR, PWD, pwd),
3-
# then fails if still unset. Used by display_secrets_info, load_values_global, load_bootstrap_secrets*, etc.
3+
# then fails if still unset. Used by display_secrets_info, load_values_global, load_bootstrap_secrets, etc.
44
- name: Determine pattern dir
55
hosts: localhost
66
connection: local
Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
---
2-
# Post-install alias: runs the same secrets load as load_secrets.yml (early bootstrap-tagged inject
3-
# from the primary file when present, then primary backend load).
2+
# Inject only bootstrap-tagged secrets from the primary values-secret file (none backend, with retries).
3+
# Does not load secrets into Vault or the primary Kubernetes backend. Does not honor
4+
# secretLoader.disabled from values-global. Fails if no primary file exists or there are no
5+
# bootstrap-tagged v2 entries.
46
# Optional extra-vars: vp_secrets_bootstrap_retry_max, vp_secrets_bootstrap_retry_delay (seconds).
57
- name: Determine pattern directory
68
ansible.builtin.import_playbook: ./determine_pattern_dir.yml
79

810
- name: Determine pattern name
911
ansible.builtin.import_playbook: ./determine_pattern_name.yml
1012

11-
- name: Load secrets (optional bootstrap then standard)
12-
ansible.builtin.import_playbook: ./load_secrets.yml
13+
- name: Load bootstrap secrets
14+
hosts: localhost
15+
connection: local
16+
gather_facts: false
17+
become: false
18+
roles:
19+
- pattern_settings
20+
21+
tasks:
22+
- name: Run bootstrap-only secrets load
23+
ansible.builtin.include_role:
24+
name: load_secrets
25+
tasks_from: bootstrap_only.yml

playbooks/load_bootstrap_secrets_only.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

roles/vault_utils/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The paths can be overridden by setting the environment variable `VALUES_SECRET`
7070
secret file.
7171

7272
Optional **early bootstrap** behavior (Kubernetes inject for `bootstrap`-tagged v2 secrets in the **primary**
73-
values-secret file only), the early-then-primary loading order, `load_bootstrap_secrets_only.yml`, and
73+
values-secret file only), the early-then-primary loading order, `load_bootstrap_secrets.yml`, and
7474
`display_secrets_info.yml` are documented under **Secrets loading** in the collection `README.md` at the repository root.
7575

7676
For **v2.0** primary files, each `secrets[]` entry may set `bootstrap`: use boolean `true` (or strings like `yes`,

0 commit comments

Comments
 (0)