💻 Coding

Ansible Playbook Role Map from Host Inventory (No Invented Host Counts)

Turn an Ansible host inventory into a playbook role map only. No invented host counts, runtime minutes, or secret values beyond the inventory.

0.0
0Reviews
P
September 9, 2026

Prompt

Act as an Ansible playbook architect who only uses a pasted host inventory. You write a playbook role map the inventory already supports. You do not invent host counts, runtime minutes, secret values, or uptime SLAs. This is not a live ansible-playbook run and not a secrets audit.
You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs.

Inputs:
- Host inventory I lock (group stubs, role cues, status notes): [Inventory]
- Ansible / collection version notes I lock: [Version]
- Project or workspace label I may quote (or UNKNOWN): [Workspace]
- Required group or role names I may quote (or UNKNOWN): [SpecNames]
- Words I must not use: [Banned]
- What I must never invent (host counts, runtime minutes, secret values, uptime SLAs): [Never]
- Output format: [Format]
- Language: [Lang]

Generate:
1. Honesty ledger: Inventory nouns, Version, Workspace, SpecNames, Lang. Forbidden: invented host counts, runtime minutes, secret values, uptime SLAs. Banner: not a live ansible-playbook run; not a secrets audit.
2. Role map table: one row per Inventory group stub or role cue. Missing status notes write NOT IN INPUTS. Use Ansible hosts, roles, handlers, vars_files, and ansible.cfg language when Inventory supports it. Never print host-count VALUES not in Inventory. Never print secret VALUES.
3. Spec name set: only names in SpecNames. Unnamed groups stay NOT IN INPUTS. Never print runtime or uptime VALUES not in Inventory.
4. Version lock: print Version. Refuse Ansible features newer than Version if Version is named (no unreleased ansible-navigator claims).
5. Refuse list: inventing host counts, inventing runtime minutes, inventing secret values, inventing uptime SLAs.
6. Compliance pass: quote Banned and Never hits. Cut them. Format as Format.

Constraints:
- Map from Inventory only. No invented host-count VALUES. Teach Ansible playbook role mapping, not a generic YAML swap.
- Honor Version. No emojis.

Instructions

Replace every [bracket] with your details before running. Works on ChatGPT, Claude, and Gemini.

Generated Output

This image was generated using the prompt above.

Ansible Playbook Role Map from Host Inventory (No Invented Host Counts) - Result

Examples

Example Input

Inventory: group Harbor Quay berth_edge as pasted role cue common_base as pasted status note draft as pasted; group River Ops lock_controllers as pasted role cue wireguard_mesh as pasted. Host count NOT IN INPUTS. Runtime NONE.
Version: Ansible 2.16 community.general as pasted (do not invent unreleased ansible-navigator APIs)
Workspace: Harbor Quay Harbor Ops Repo as pasted
SpecNames: berth_edge as pasted; lock_controllers as pasted. tide_sensors UNKNOWN.
Banned: guaranteed host count, runtime invent, secret invent, uptime invent
Never: invent host counts, invent runtime minutes, invent secret values, invent uptime SLAs
Format: ledger + table + specs + version + refuse + compliance
Lang: English

Example Output

1. Ledger. Inventory: group Harbor Quay berth_edge role cue common_base status note draft; group River Ops lock_controllers role cue wireguard_mesh. Host count NOT IN INPUTS. Runtime NONE. Version Ansible 2.16 community.general. Workspace Harbor Quay Harbor Ops Repo. SpecNames berth_edge; lock_controllers; tide_sensors UNKNOWN. Lang English. Banner: not a live ansible-playbook run; not a secrets audit. Forbidden: invented host counts, runtime minutes, secret values, uptime SLAs, guaranteed host count, runtime invent, secret invent, uptime invent.

2. Role map.
1. Harbor Quay berth_edge | role common_base as pasted | status draft as pasted | hosts NOT IN INPUTS | runtime NONE | Ansible hosts / roles map only. Host-count VALUES not printed. Secrets not printed.
2. River Ops lock_controllers | role wireguard_mesh as pasted | status NOT IN INPUTS | hosts NOT IN INPUTS | runtime NONE.
Uptime SLAs not invented.

3. Spec name set. berth_edge; lock_controllers as SpecNames. tide_sensors UNKNOWN so write tide_sensors NOT IN INPUTS. No host-count VALUES printed. No third group invented.

4. Version lock. Ansible 2.16 community.general as pasted. Unreleased ansible-navigator APIs not used. collections path NOT IN INPUTS.

5. Refuse. Host-count invent: refused. Runtime invent: refused. Secret invent: refused. Uptime invent: refused. Guaranteed host count: refused.

6. Compliance. Banned hits none. Format ledger+table+specs+version+refuse+compliance. Gaps: status for River Ops lock_controllers, tide_sensors decision, vars_files path, handler names, become policy if any.

Missing-data policy: if a field was blank, write NOT IN INPUTS rather than guessing. Lock any tool version named in Inputs; if unnamed, write unknown. No invented testimonials, star ratings, or press logos. If legal, clinical, insurance, HR, education-plan, or veterinary content appears, add a one-line not-advice and de-identify banner. Quote banned-word hits and cut them. End with a gaps list of five bullets the user still owes you. Character and byte caps in the job are hard; print counts when relevant. Refuse to backfill DOIs, exam dumps, PHI, PII, or compensation promises not in Inputs.

Reviews (0)

Please login to leave a review.
Loading reviews...