Re: [vagrant-up] Re: vagrant and ansible provisionning fails with INFO interface: error: The Ansible software could not be found! Please verify that Ansible is correctly installed on your host system.

2018-01-11 Thread Alvaro Miranda Aguilera
yeah no idea why, i tried localhost, change name etc, so i went for host:
all to get it running

On Thu, Jan 11, 2018 at 6:43 PM, Jean-Luc Pinardon 
wrote:

> Well... that's not what I wanted to do... But never mind, I tried with
> ansible_local.
> It automatically installs ansible on the guest and run it.
> Ok, ansible runs on the guest, but it fails with a :
>
> PLAY [Configure CI server] **
> ***
> skipping: no hosts matched
>
> error.
>
> It means that it actually try to run the playbook, but it can find the
> server where to run it.
> As it runs on the guest, I have tried to run the playbook directly on the
> guest.
> ==> Same error.
> So, I have changed the hosts line of the playbook to *hosts: localhost*.
> .
> Running it again *from the guest*, it worked !
> So far so good, I therefor changed to localhost within the playbook on the
> host and redo from scratch.
> But I retrieved the error again.
> ... and have no idea why...
>
> Thanks again for your help, and have a good evening.
> Best regards
> J.L.P.
>
> Le jeudi 11 janvier 2018 11:33:36 UTC+1, Jean-Luc Pinardon a écrit :
>>
>> Dear all,
>>
>> I am new to vagrant and ansible, and I am currently making some trials.
>> My host environment is a WIndows 7 machine (sorry) with cygwin64.
>> Ansible and Vagrant are both installed :
>> $ ansible --version  &&  vagrant --version
>> ansible 2.4.2.0
>>   config file = None
>>   configured module search path = ['/home/jeanlupi/.ansible/plug
>> ins/modules', '/usr/share/ansible/plugins/modules']
>>   ansible python module location = /usr/lib/python3.6/site-packages/
>> ansible
>>   executable location = /usr/bin/ansible
>>   python version = 3.6.3 (default, Oct 31 2017, 19:00:36) [GCC 6.4.0]
>> Vagrant 2.0.1
>>
>>
>> At the moment, I know how to create a Vagrantfile, have a brand new VM
>> automatically created with Vagrant, and access it through ssh.
>> Also, I succeed in using an ansible playbook to provision this new VM.
>> So, each vagrant and ansible can run correctly when launched one by one.
>>
>> Now, I want to make it to work together using config.vm.provider. But it
>> fails with the following trace :
>>  INFO provision: Writing provisioning sentinel so we don't provision
>> again
>>  INFO interface: info: Running provisioner: ansible...
>>  INFO interface: info: ==> default: Running provisioner: ansible...
>> ==> default: Running provisioner: ansible...
>>  INFO environment: Running hook: provisioner_run
>>  INFO runner: Preparing hooks for middleware sequence...
>>  INFO runner: 1 hooks defined.
>>  INFO runner: Running action: provisioner_run #> Vagrant::Action::Builtin::Provision#run_provisioner>
>>  INFO warden: Calling IN action: #> ashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/warden.rb:94
>> (lambda)>
>>  INFO subprocess: Starting process: ["C:/Program
>> Files/Oracle/VirtualBox/VBoxManage.exe", "showvminfo",
>> "2ace896f-293d-442b-9c62-bb8281960435", "--machinereadable"]
>>  INFO subprocess: Command not in installer, restoring original
>> environment...
>>  INFO subprocess: Starting process: ["C:/Program
>> Files/Oracle/VirtualBox/VBoxManage.exe", "showvminfo",
>> "2ace896f-293d-442b-9c62-bb8281960435", "--machinereadable"]
>>  INFO subprocess: Command not in installer, restoring original
>> environment...
>>  INFO interface: warn: Windows is not officially supported for the
>> Ansible Control Machine.
>> Please check https://docs.ansible.com/intro_installation.html#control-
>> machine-requirements
>>
>> Windows is not officially supported for the Ansible Control Machine.
>> Please check https://docs.ansible.com/intro_installation.html#control-
>> machine-requirements
>> ERROR ansible_host: Error while gathering the ansible version: The
>> Ansible software could not be found! Please verify
>> that Ansible is correctly installed on your host system.
>>
>> *So, it incorrectly says that "The Ansible software could not be found!*",
>> and I don't clearly understand why it claims that "Windows is not
>> officially supported for the Ansible Control Machine", though ansible
>> clearly runs correctly.
>>
>> For information :
>> The Vagrantfile is :
>> Vagrant.configure(2) do |config|
>>   config.vm.box = "geerlingguy/centos7"
>>   config.vm.network "forwarded_port", guest: 8080, host: 8080
>>   config.vm.synced_folder "../", "/var/data",create: true
>>   config.vm.provider "virtualbox" do |v|
>> # Add a name
>> v.name="CI_Env"
>> # Add enough memory
>> v.memory = 4048
>>   end
>>   config.vm.provision :ansible do |ansible|
>> ansible.playbook="../ansible/configure-ci-server.yml"
>> ansible.tags=["geerlingguy.java","git"]
>>   end
>> end
>>
>> And the directory tree is :
>> $ tree -d -L 3 .
>> .
>> ├── ansible
>> │   └── roles
>> │   ├── geerlingguy.java
>> │   ├── geerlingguy.jenkins
>> │   ├── git
>> │   └── LTS-2_89.jenkins
>> ├── 

[vagrant-up] Re: vagrant and ansible provisionning fails with INFO interface: error: The Ansible software could not be found! Please verify that Ansible is correctly installed on your host system.

2018-01-11 Thread Jean-Luc Pinardon
Well... that's not what I wanted to do... But never mind, I tried with 
ansible_local.
It automatically installs ansible on the guest and run it.
Ok, ansible runs on the guest, but it fails with a :

PLAY [Configure CI server] 
*
skipping: no hosts matched

error.

It means that it actually try to run the playbook, but it can find the 
server where to run it.
As it runs on the guest, I have tried to run the playbook directly on the 
guest. 
==> Same error.
So, I have changed the hosts line of the playbook to *hosts: localhost*.
.
Running it again *from the guest*, it worked !
So far so good, I therefor changed to localhost within the playbook on the 
host and redo from scratch.
But I retrieved the error again.
... and have no idea why...

Thanks again for your help, and have a good evening.
Best regards
J.L.P.

Le jeudi 11 janvier 2018 11:33:36 UTC+1, Jean-Luc Pinardon a écrit :
>
> Dear all,
>
> I am new to vagrant and ansible, and I am currently making some trials.
> My host environment is a WIndows 7 machine (sorry) with cygwin64.
> Ansible and Vagrant are both installed :
> $ ansible --version  &&  vagrant --version
> ansible 2.4.2.0
>   config file = None
>   configured module search path = [
> '/home/jeanlupi/.ansible/plugins/modules', 
> '/usr/share/ansible/plugins/modules']
>   ansible python module location = /usr/lib/python3.6/site-packages/
> ansible
>   executable location = /usr/bin/ansible
>   python version = 3.6.3 (default, Oct 31 2017, 19:00:36) [GCC 6.4.0]
> Vagrant 2.0.1
>
>
> At the moment, I know how to create a Vagrantfile, have a brand new VM 
> automatically created with Vagrant, and access it through ssh.
> Also, I succeed in using an ansible playbook to provision this new VM.
> So, each vagrant and ansible can run correctly when launched one by one.
>
> Now, I want to make it to work together using config.vm.provider. But it 
> fails with the following trace :
>  INFO provision: Writing provisioning sentinel so we don't provision again
>  INFO interface: info: Running provisioner: ansible...
>  INFO interface: info: ==> default: Running provisioner: ansible...
> ==> default: Running provisioner: ansible...
>  INFO environment: Running hook: provisioner_run
>  INFO runner: Preparing hooks for middleware sequence...
>  INFO runner: 1 hooks defined.
>  INFO runner: Running action: provisioner_run # Vagrant::Action::Builtin::Provision#run_provisioner>
>  INFO warden: Calling IN action: 
> #  
> (lambda)>
>  INFO subprocess: Starting process: ["C:/Program 
> Files/Oracle/VirtualBox/VBoxManage.exe", "showvminfo", 
> "2ace896f-293d-442b-9c62-bb8281960435", "--machinereadable"]
>  INFO subprocess: Command not in installer, restoring original 
> environment...
>  INFO subprocess: Starting process: ["C:/Program 
> Files/Oracle/VirtualBox/VBoxManage.exe", "showvminfo", 
> "2ace896f-293d-442b-9c62-bb8281960435", "--machinereadable"]
>  INFO subprocess: Command not in installer, restoring original 
> environment...
>  INFO interface: warn: Windows is not officially supported for the Ansible 
> Control Machine.
> Please check 
> https://docs.ansible.com/intro_installation.html#control-machine-requirements
>
> Windows is not officially supported for the Ansible Control Machine.
> Please check 
> https://docs.ansible.com/intro_installation.html#control-machine-requirements
> ERROR ansible_host: Error while gathering the ansible version: The Ansible 
> software could not be found! Please verify
> that Ansible is correctly installed on your host system.
>
> *So, it incorrectly says that "The Ansible software could not be found!*", 
> and I don't clearly understand why it claims that "Windows is not 
> officially supported for the Ansible Control Machine", though ansible 
> clearly runs correctly.
>
> For information :
> The Vagrantfile is :
> Vagrant.configure(2) do |config|
>   config.vm.box = "geerlingguy/centos7"
>   config.vm.network "forwarded_port", guest: 8080, host: 8080
>   config.vm.synced_folder "../", "/var/data",create: true
>   config.vm.provider "virtualbox" do |v|
> # Add a name
> v.name="CI_Env"
> # Add enough memory
> v.memory = 4048
>   end
>   config.vm.provision :ansible do |ansible|
> ansible.playbook="../ansible/configure-ci-server.yml"
> ansible.tags=["geerlingguy.java","git"]
>   end
> end
>
> And the directory tree is :
> $ tree -d -L 3 .
> .
> ├── ansible
> │   └── roles
> │   ├── geerlingguy.java
> │   ├── geerlingguy.jenkins
> │   ├── git
> │   └── LTS-2_89.jenkins
> ├── doc
> ├── etc
> ├── tools
> ├── Vagrant
>
>
> Thanks in advance for your help.
> Best Regards
> J-L
>
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your 

Re: [vagrant-up] Re: vagrant and ansible provisionning fails with INFO interface: error: The Ansible software could not be found! Please verify that Ansible is correctly installed on your host system.

2018-01-11 Thread Alvaro Miranda Aguilera
you can use ansible_local that runs in the guest.

and there was couple of typos in one for the files..

https://github.com/JiElPe-Fr38/myKnowledge/pull/1

you can test mine here:
https://github.com/kikitux/myKnowledge

On Thu, Jan 11, 2018 at 3:15 PM, Jean-Luc Pinardon 
wrote:

> Ok, I put it there :
> https://github.com/JiElPe-Fr38/myKnowledge.git
>
> Note that I have sligthly modified the directory tree and the Vagrantfile
> according to this Vagrant documentation page
> ,
> and assuming that I needed to pass the same parameters as when running
> manually ansible.
>
> Thanks for your help.
> J-L
>
> Le jeudi 11 janvier 2018 11:33:36 UTC+1, Jean-Luc Pinardon a écrit :
>>
>> Dear all,
>>
>> I am new to vagrant and ansible, and I am currently making some trials.
>> My host environment is a WIndows 7 machine (sorry) with cygwin64.
>> Ansible and Vagrant are both installed :
>> $ ansible --version  &&  vagrant --version
>> ansible 2.4.2.0
>>   config file = None
>>   configured module search path = ['/home/jeanlupi/.ansible/plug
>> ins/modules', '/usr/share/ansible/plugins/modules']
>>   ansible python module location = /usr/lib/python3.6/site-packages/
>> ansible
>>   executable location = /usr/bin/ansible
>>   python version = 3.6.3 (default, Oct 31 2017, 19:00:36) [GCC 6.4.0]
>> Vagrant 2.0.1
>>
>>
>> At the moment, I know how to create a Vagrantfile, have a brand new VM
>> automatically created with Vagrant, and access it through ssh.
>> Also, I succeed in using an ansible playbook to provision this new VM.
>> So, each vagrant and ansible can run correctly when launched one by one.
>>
>> Now, I want to make it to work together using config.vm.provider. But it
>> fails with the following trace :
>>  INFO provision: Writing provisioning sentinel so we don't provision
>> again
>>  INFO interface: info: Running provisioner: ansible...
>>  INFO interface: info: ==> default: Running provisioner: ansible...
>> ==> default: Running provisioner: ansible...
>>  INFO environment: Running hook: provisioner_run
>>  INFO runner: Preparing hooks for middleware sequence...
>>  INFO runner: 1 hooks defined.
>>  INFO runner: Running action: provisioner_run #> Vagrant::Action::Builtin::Provision#run_provisioner>
>>  INFO warden: Calling IN action: #> ashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/warden.rb:94
>> (lambda)>
>>  INFO subprocess: Starting process: ["C:/Program
>> Files/Oracle/VirtualBox/VBoxManage.exe", "showvminfo",
>> "2ace896f-293d-442b-9c62-bb8281960435", "--machinereadable"]
>>  INFO subprocess: Command not in installer, restoring original
>> environment...
>>  INFO subprocess: Starting process: ["C:/Program
>> Files/Oracle/VirtualBox/VBoxManage.exe", "showvminfo",
>> "2ace896f-293d-442b-9c62-bb8281960435", "--machinereadable"]
>>  INFO subprocess: Command not in installer, restoring original
>> environment...
>>  INFO interface: warn: Windows is not officially supported for the
>> Ansible Control Machine.
>> Please check https://docs.ansible.com/intro_installation.html#control-
>> machine-requirements
>>
>> Windows is not officially supported for the Ansible Control Machine.
>> Please check https://docs.ansible.com/intro_installation.html#control-
>> machine-requirements
>> ERROR ansible_host: Error while gathering the ansible version: The
>> Ansible software could not be found! Please verify
>> that Ansible is correctly installed on your host system.
>>
>> *So, it incorrectly says that "The Ansible software could not be found!*",
>> and I don't clearly understand why it claims that "Windows is not
>> officially supported for the Ansible Control Machine", though ansible
>> clearly runs correctly.
>>
>> For information :
>> The Vagrantfile is :
>> Vagrant.configure(2) do |config|
>>   config.vm.box = "geerlingguy/centos7"
>>   config.vm.network "forwarded_port", guest: 8080, host: 8080
>>   config.vm.synced_folder "../", "/var/data",create: true
>>   config.vm.provider "virtualbox" do |v|
>> # Add a name
>> v.name="CI_Env"
>> # Add enough memory
>> v.memory = 4048
>>   end
>>   config.vm.provision :ansible do |ansible|
>> ansible.playbook="../ansible/configure-ci-server.yml"
>> ansible.tags=["geerlingguy.java","git"]
>>   end
>> end
>>
>> And the directory tree is :
>> $ tree -d -L 3 .
>> .
>> ├── ansible
>> │   └── roles
>> │   ├── geerlingguy.java
>> │   ├── geerlingguy.jenkins
>> │   ├── git
>> │   └── LTS-2_89.jenkins
>> ├── doc
>> ├── etc
>> ├── tools
>> ├── Vagrant
>>
>>
>> Thanks in advance for your help.
>> Best Regards
>> J-L
>>
>> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: 

[vagrant-up] Re: vagrant and ansible provisionning fails with INFO interface: error: The Ansible software could not be found! Please verify that Ansible is correctly installed on your host system.

2018-01-11 Thread Jean-Luc Pinardon
Ok, I put it there :
https://github.com/JiElPe-Fr38/myKnowledge.git

Note that I have sligthly modified the directory tree and the Vagrantfile 
according to this Vagrant documentation page 
,
 
and assuming that I needed to pass the same parameters as when running 
manually ansible.

Thanks for your help.
J-L

Le jeudi 11 janvier 2018 11:33:36 UTC+1, Jean-Luc Pinardon a écrit :
>
> Dear all,
>
> I am new to vagrant and ansible, and I am currently making some trials.
> My host environment is a WIndows 7 machine (sorry) with cygwin64.
> Ansible and Vagrant are both installed :
> $ ansible --version  &&  vagrant --version
> ansible 2.4.2.0
>   config file = None
>   configured module search path = [
> '/home/jeanlupi/.ansible/plugins/modules', 
> '/usr/share/ansible/plugins/modules']
>   ansible python module location = /usr/lib/python3.6/site-packages/
> ansible
>   executable location = /usr/bin/ansible
>   python version = 3.6.3 (default, Oct 31 2017, 19:00:36) [GCC 6.4.0]
> Vagrant 2.0.1
>
>
> At the moment, I know how to create a Vagrantfile, have a brand new VM 
> automatically created with Vagrant, and access it through ssh.
> Also, I succeed in using an ansible playbook to provision this new VM.
> So, each vagrant and ansible can run correctly when launched one by one.
>
> Now, I want to make it to work together using config.vm.provider. But it 
> fails with the following trace :
>  INFO provision: Writing provisioning sentinel so we don't provision again
>  INFO interface: info: Running provisioner: ansible...
>  INFO interface: info: ==> default: Running provisioner: ansible...
> ==> default: Running provisioner: ansible...
>  INFO environment: Running hook: provisioner_run
>  INFO runner: Preparing hooks for middleware sequence...
>  INFO runner: 1 hooks defined.
>  INFO runner: Running action: provisioner_run # Vagrant::Action::Builtin::Provision#run_provisioner>
>  INFO warden: Calling IN action: 
> #  
> (lambda)>
>  INFO subprocess: Starting process: ["C:/Program 
> Files/Oracle/VirtualBox/VBoxManage.exe", "showvminfo", 
> "2ace896f-293d-442b-9c62-bb8281960435", "--machinereadable"]
>  INFO subprocess: Command not in installer, restoring original 
> environment...
>  INFO subprocess: Starting process: ["C:/Program 
> Files/Oracle/VirtualBox/VBoxManage.exe", "showvminfo", 
> "2ace896f-293d-442b-9c62-bb8281960435", "--machinereadable"]
>  INFO subprocess: Command not in installer, restoring original 
> environment...
>  INFO interface: warn: Windows is not officially supported for the Ansible 
> Control Machine.
> Please check 
> https://docs.ansible.com/intro_installation.html#control-machine-requirements
>
> Windows is not officially supported for the Ansible Control Machine.
> Please check 
> https://docs.ansible.com/intro_installation.html#control-machine-requirements
> ERROR ansible_host: Error while gathering the ansible version: The Ansible 
> software could not be found! Please verify
> that Ansible is correctly installed on your host system.
>
> *So, it incorrectly says that "The Ansible software could not be found!*", 
> and I don't clearly understand why it claims that "Windows is not 
> officially supported for the Ansible Control Machine", though ansible 
> clearly runs correctly.
>
> For information :
> The Vagrantfile is :
> Vagrant.configure(2) do |config|
>   config.vm.box = "geerlingguy/centos7"
>   config.vm.network "forwarded_port", guest: 8080, host: 8080
>   config.vm.synced_folder "../", "/var/data",create: true
>   config.vm.provider "virtualbox" do |v|
> # Add a name
> v.name="CI_Env"
> # Add enough memory
> v.memory = 4048
>   end
>   config.vm.provision :ansible do |ansible|
> ansible.playbook="../ansible/configure-ci-server.yml"
> ansible.tags=["geerlingguy.java","git"]
>   end
> end
>
> And the directory tree is :
> $ tree -d -L 3 .
> .
> ├── ansible
> │   └── roles
> │   ├── geerlingguy.java
> │   ├── geerlingguy.jenkins
> │   ├── git
> │   └── LTS-2_89.jenkins
> ├── doc
> ├── etc
> ├── tools
> ├── Vagrant
>
>
> Thanks in advance for your help.
> Best Regards
> J-L
>
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vagrant-up+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/d099b566-dd82-4ecb-964d-046068e7c440%40googlegroups.com.
For