Generate a template dynamically using environment attribute
I have two environments setup Development and Production on PE 4.2.2. The basic thing I want to do is to isolate code and getting it deployed as per the environment chosen.
I am trying to write a template having the same code
<environment = $environment>
which is suppose to generate lines dynamically like below as per the environment selected:
<environment = Development> : if code is deployed on dev env
<environment = Production> : if code is deployed on prod env
I see, there is no facter "environment" available and if possible we can make this using environment variable. But I am not very sure how to implement this. Any help would be appreciated.