Why create a role that is specific to the environment? And why make it
variable? Seems like you'd just use the same role, but give each host group
different group inventory variables to override the role defaults.
On Wednesday, October 15, 2014 2:14:58 AM UTC-4, Denis J. Cirulis wrote:
>
> Hello,
>
> let's suppose I have multiple groups of virtual guests, all are split to
> different environments and are running 2 kinds of applications but with
> different configurations.
> In /etc/environment there env variables APPENV and APPNAME which contain
> belonging to env like
> APPENV=test,APPENV=stage,APPENV=dev,APPNAME=app1,APPNAME=app2 and so on.
> There is one common role 'common' where all the provisioning and initial
> configuration tasks and files are stored (this works good).
> I want to populate roles list in top main.yml playbook with registering
> these env variables as Ansible vars and use it in
>
> roles:
> - { common }
> - { $appenv_$appname }
>
> Is it normal or I do have to think of something different ?
>
--
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/00a85f56-0dab-493c-b1b7-0ece770859a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.