The virtualisation will change depending on what vagrant provider you
use - and you people may use virtualbox without vagrant.

I suspect that there are a few signals that can be used to pick out
vagrant - specifically I am thinking of ansible being run from vagrant
provision rather than other access to a vagrant produced box:-

  * the ssh user is likely to be vagrant
  * there are probably some magic environment variables
  * the vagrant provided hosts file seems to have some magic in it


    Nigel.

> Mischa ter Smitten <mailto:[email protected]>
> 7 July 2015 08:16
> We use
>
> {% if ansible_virtualization_type == 'virtualbox' %}
>
> Phill Pafford <mailto:[email protected]>
> 6 July 2015 17:33
> Is there something I can check to see if the playbook is being
> executed on a vagrant server?
>
> Example:
>
> If vagrant run this additional role 
>
> or
>
> If vagrant skip this role
>
> Thoughts on how I can do this?
> -- 
> 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]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/44224986-111d-4c79-9c87-56f59353adc8%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/44224986-111d-4c79-9c87-56f59353adc8%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

-- 

[ Nigel Metheringham ------------------------------ [email protected] ] 
[                 Ellipsis Intangible Technologies                  ]
 


-- 
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/559BC287.7020809%40dotdot.it.
For more options, visit https://groups.google.com/d/optout.

Reply via email to