On Tue, Jul 07, 2015 at 01:13:59PM +0100, Nigel Metheringham wrote:
> 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:-
I assume that below solution isn't the most elegant one, but what
about it?
- name: Check if I'm in a vagrant environment
stat: path=/vagrant/Vagrantfile
register: checkVagrant
- name: Let's do something if Vagrant is here
debug: msg="do something here"
when: checkVagrant.stat.exists
--
Adrià García-Alzórriz
0x09494C14
Una retirada a tiempo es una victoria.