Excluding servers from all

Just a though I had today. I would like to make sure nobody ever runs ansible against our production servers unless explicitly called by server name or group name. I want the servers/groups to be excluded from “all”. Is this, or something like it valid?

all!prodenv`

test1-apps
prod1-db

[nonprod]
test[01:20]-apps
test[01:5]-db

[prodenv]
prod[01:20]-apps
prod[01:5]-db
`

I am hoping for a quick way to prevent other uses (not using tower yet) from executing all and having it stop on any production servers on accident.

Just put production in separate non default inventory. All host are always part of all, only way to avoid is host not existing.

Worth saying when you need to run against everything you can pass multiple inventory files to the ansible-playbook command.