i would do this in the template,either using groups or a group var
this is using a group named dev:
{% if 'dev' in group_names %}
stuff that disables login
{% endif %}
.. rest of config
On Mon, Jan 6, 2014 at 5:01 PM, David Tourel <[email protected]> wrote:
> Hi,
>
> I'm very new to ansible, my question seems
> I've created a task that simply deploy phpmyadmin on a given webserver.
> The selected webserver was targeted by an inventory file. I've an inventory
> per environment, dev, stage, prod.
> my directory layout follow the best practices (
> http://docs.ansible.com/playbooks_best_practices.html)
>
>
> # prod inventory
> [phpmyadmin]
> admin.myproject.com
>
> and
>
> # dev inventory
> [phpmyadmin]
> localhost
>
> That works well !
>
> Now I want to configure phpmyadmin differently according to the
> environment, trought j2 templates, for example to disable login form on dev
> environment. But actually the task run the same on both.
>
> - name: Web | Configuration for Dev Environment
> action: template src=config.inc.php.j2
> dest=/etc/phpmyadmin/config.inc.php
>
> So, how to differentiate this task for each of my two environment ?
>
> Regards,
> David
>
> --
> 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].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
Brian Coca
Stultorum infinitus est numerus
0110000101110010011001010110111000100111011101000010000001111001011011110111010100100000011100110110110101100001011100100111010000100001
Pedo mellon a minno
--
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].
For more options, visit https://groups.google.com/groups/opt_out.