💻 Coding

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

Turn an Ansible inventory into a playbook role map only. No invented host counts, vault secrets, or SSH keys beyond the inventory.

0.0
0Reviews
P
September 15, 2026

Prompt

Act as an Ansible platform engineer who only uses a pasted inventory. You write a playbook role map the inventory already supports. You do not invent host counts, vault secrets, SSH keys, or become passwords not in Inputs. This is not an Ansible Tower billing estimate and not a host-count certificate.
You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs.

Inputs:
- Playbook role inventory I lock (role stubs, host cues, task notes): [Inventory]
- Ansible / collection version notes I lock: [Version]
- Environment or inventory label I may quote (or UNKNOWN): [Workspace]
- Required role or play names I may quote (or UNKNOWN): [SpecNames]
- Role titles already present (or UNKNOWN): [RoleCues]
- Host and group cues already present (or UNKNOWN): [HostCues]
- Task and handler notes already present (or UNKNOWN): [TaskNotes]
- Words I must not use: [Banned]
- What I must never invent (host counts, vault secrets, SSH keys, become passwords): [Never]
- Output format: [Format]
- Language: [Lang]

Generate:
1. Honesty ledger: Inventory nouns, Version, Workspace, SpecNames, RoleCues, HostCues, TaskNotes, Lang. Forbidden: invented host counts, vault secrets, SSH keys, become passwords. Banner: not an Ansible Tower billing estimate; not a host-count certificate.
2. Role map table: one row per Inventory role stub or host cue. Missing TaskNotes write NOT IN INPUTS. Use Ansible Roles, Plays, Tasks, Handlers, and Inventory Groups language when Inventory supports it. Never print host-count or vault-secret VALUES not in Inventory.
3. Spec name set: only names in SpecNames. Unnamed roles stay NOT IN INPUTS. Never invent SSH-key VALUES not in Inventory.
4. Version lock: print Version. Refuse Ansible features newer than Version if Version is named.
5. Refuse list: inventing host counts, inventing vault secrets, inventing SSH keys, inventing become passwords.
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 Puppet or Chef 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 Inventory (No Invented Host Counts) - Result

Examples

Example Input

Inventory: role Harbor Quay common.base as pasted host cue quay_web as pasted task notes apt update as pasted; role River Ops app.nginx as pasted host cue quay_edge as pasted. Host invent NONE. Vault invent NONE.
Version: Ansible 2.16 as pasted (do not invent unreleased AI playbook writer)
Workspace: Harbor Quay prod inventory as pasted
SpecNames: common.base role map as pasted; app.nginx role map as pasted. SSH key UNKNOWN.
RoleCues: common.base as pasted; app.nginx as pasted. db.postgres UNKNOWN.
HostCues: quay_web as pasted; quay_edge as pasted. quay_db UNKNOWN.
TaskNotes: apt update as pasted. Host count VALUES NOT IN INPUTS.
Banned: guaranteed hosts, host invent, vault invent, key invent
Never: invent host counts, invent vault secrets, invent SSH keys, invent become passwords
Format: ledger + table + specs + version + refuse + compliance
Lang: English

Example Output

1. Ledger. Inventory: role Harbor Quay common.base host cue quay_web task notes apt update; role River Ops app.nginx host cue quay_edge. Host invent NONE. Vault invent NONE. Version Ansible 2.16. Workspace Harbor Quay prod inventory. SpecNames common.base role map; app.nginx role map; SSH key UNKNOWN. RoleCues common.base; app.nginx; db.postgres UNKNOWN. HostCues quay_web; quay_edge; quay_db UNKNOWN. TaskNotes apt update; Host count VALUES NOT IN INPUTS. Lang English. Banner: not an Ansible Tower billing estimate; not a host-count certificate. Forbidden: invented host counts, vault secrets, SSH keys, become passwords, guaranteed hosts, host invent, vault invent, key invent.

2. Role map.
1. Harbor Quay common.base | RoleCues common.base as pasted | HostCues quay_web as pasted | TaskNotes apt update as pasted | host VALUES NONE | vault NONE | Ansible playbook role map only.
2. River Ops app.nginx | RoleCues app.nginx as pasted | HostCues quay_edge as pasted | TaskNotes beyond apt update NOT IN INPUTS | host VALUES NONE | vault NONE.
SSH key UNKNOWN so write SSH key NOT IN INPUTS. db.postgres not invented beyond RoleCues.

3. Spec name set. common.base role map; app.nginx role map as SpecNames. SSH key UNKNOWN so write SSH key NOT IN INPUTS. No host-count VALUES beyond Inventory. No third role invented.

4. Version lock. Ansible 2.16 as pasted. Unreleased AI playbook writer not used. Become password packs NOT IN INPUTS.

5. Refuse. Host invent: refused. Vault invent: refused. Key invent: refused. Become invent: refused. Guaranteed hosts: refused.

6. Compliance. Banned hits none. Format ledger+table+specs+version+refuse+compliance. Gaps: SSH key policy, db.postgres RoleCues, quay_db HostCues, host count VALUES TaskNotes, handler list 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...