Hi, I'm new to ansible but liking what I see so far. I'm using it to configure a bunch of machines acting as routers across a region, and I like the model so far.
Now I'm trying to set up a couple of machines as a staging environment so I can check out configuration changes before I push them to production machines. In http://docs.ansible.com/playbooks_best_practices.html a separate inventory file for stage and production is recommended. OK, but how do I actually apply a different configuration to the staging machines from production? I see further down it's recommended to keep the playbooks and inventory files in git. Am I supposed to branch the whole thing and use a test branch which gets applied to staging machines? Or is there an ansible feature to switch between staging and production? I have a simple file copy which I want to do different on staging vs. production. I could set up a template and choose different content depending on whether we're deploying to staging or production, but that seems the wrong way to do it. It's really just a different version of the same file, and I want to choose one version for staging servers and another for production. How do others do this? Cheers, Alex -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2423c0ad-5a15-4d32-be13-0535344fe7bd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
