It is not a good practice to have scripts specific to an environment. Instead you should have scripts which will behave differently based on environment. Let me show you how; there are two steps you will need to do for this to work:
- Define environments
You will have to define environments - I would suggest directory based environments (Because config based environment support will be dropped eventually). How to setup environments is an intimate topic and I suggest you check out the documentation
- Use environments in your code
Let's say you have defined environments such as dev, qa, uat, prod etc. You can get the name of current environment by using $environment variable. Your manifests should leverage the environment variable to decide weather a firewall should be enabled/disabled etc. For example:
(Modified based on Felix's comment, thanks @Felix)
include profile::webserver
if $environment != 'dev'
include profile::firewall
In above piece of code if the $environment does not match to "dev" only then the firewall role is applied!