Skip to content
This repository was archived by the owner on May 27, 2024. It is now read-only.
This repository was archived by the owner on May 27, 2024. It is now read-only.

Add "best practices" example of separate staging/production inventories #290

@alexqfredrickson

Description

@alexqfredrickson

Per the Ansible Tips and tricks documentation:

Separate production and staging inventory

You can keep your production environment separate from development, test, and staging environments by using separate inventory files or directories for each environment. This way you pick with -i what you are targeting. Keeping all your environments in one file can lead to surprises!

There aren't any examples of this in the documentation. I couldn't find any here either.

It sounds like a good idea to separate hosts into groups like development, staging, production (etc.) - but I can't figure out how to run a playbook against development:staging on some occasions, and production on others (at least not without copy/pasting roles all over a project).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions