[ansible-project] Re: Fatal error - Ambiguous output redirect

2015-08-29 Thread Francisco Reyes
On Friday, August 28, 2015 at 10:44:10 PM UTC-4, Francisco Reyes wrote:
>
> ansible-playbook 2.0.0 (devel 6154ed1dda) last updated 2015/08/28 22:28:56 
> (GMT -400)
>
>

Tracked down the issue. it is an issue with this
>/dev/null 2>&1

I rolled back to version stable-1.9 and the problem does not exist there.

Was also trying ansible_shell_type=csh (freeBSD machine with shell as csh) 
and did not help in version 2. It seems version 2 expects bash and does not 
seem to be working with neither sh or csh. I had one machine (freebsd) with 
sh and another with  csh (also freebsd) and neither worked. Changed shell 
to bash in one of the machines that that worked.

I guess going to stick with 1.9 for now.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/70156e78-eba1-46f1-9eac-a81b9353b4f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Can't find boto for ansible EC2 module

2015-08-29 Thread Justin Phelps
Thanks James.

That is easier and I can confirm it works in CircleCI.

On Saturday, August 29, 2015 at 2:51:26 PM UTC-5, James Martin wrote:
>
> Yay, 2 year old thread :).
>
> The way you solve this is by modifying your inventory for localhost with 
> the proper setting:
>
> #inventory file
> localhost ansible_python_interpreter="/usr/bin/env python"
>
>
> This will automatically pick up the active virtualenv's python interpreter 
> and modules that you've installed there, including boto.  You don't need to 
> run any tasks to discover the path to the python interpreter.
>
>
> On Friday, August 28, 2015 at 6:02:39 PM UTC-5, Justin Phelps wrote:
>>
>> I managed to fix this with these two tasks:
>>
>>   - name: Find the path to the python interpreter
>> command: which python
>> register: pythonpath
>> when: lookup('env', 'CI') == "true"
>>
>>   - name: Set python interpreter path when in CI
>> set_fact: ansible_python_interpreter={{ pythonpath.stdout }}
>> when: lookup('env', 'CI') == "true"
>>
>> You would take out the when statements as they are specific to my testing 
>> environment.
>>
>> On Friday, August 2, 2013 at 9:52:32 AM UTC-5, Dan McKean wrote:
>>>
>>> I've been considering Ansible for creating our EC2 instances, and have 
>>> run into a problem with ansible not finding boto from either the command 
>>> line or a playbook.
>>>
>>> Here's the command line and response; the playbook is similar:
>>>
>>> ansible localhost -m ec2 -a "image=ami-0358ce33 instance_type=t1.micro 
>>> keypair=myKeypairName group=default wait=true"
>>>
>>> localhost | FAILED >> {
>>> "failed": true,
>>> "msg": "boto required for this module"
>>> }
>>>
>>>
>>> I'm running Ansible from an activated virtualenv.  Ansible was installed 
>>> with pip install ansible, and boto's installed as well in the venv (as well 
>>> as globally).
>>>
>>> If I activate the venv and open a command prompt, I can import boto 
>>> without any problem, and a boto.connect_ec2() succeeds (there is a ~/.boto 
>>> config file present).  Importing ansible and creating a Runner works 
>>> succeeds as well.  I'm running this on Mac OS X.
>>>
>>> Any suggestions on how to fix this?   Thanks!
>>>
>>> -- Dan
>>>
>>>
>>>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/859b0572-7b3a-4716-99d1-6ef5134eb10a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Is there something like puppet librarian or R10K for Ansible?

2015-08-29 Thread Serge van Ginderachter
On 29 August 2015 at 22:38, James Martin  wrote:

> Check this out:
>
>
> http://docs.ansible.com/ansible/galaxy.html#advanced-control-over-role-requirements-files
>


​This sets one time requirements on which role to install​ when starting up
a project, this by no means manages versions of the code to deploy an
application, depending on versions of applications/hosts/... which would
come from inventory data.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAEhzMJA4jwaZieBQuz6HE7Dz2bdtgKTsq%2BXqhqY0mk_cwtiUCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Missing callback hook for task_started_for_host

2015-08-29 Thread James Martin
Brian,

Have you seen this project? https://github.com/jlafon/ansible-profile

On Friday, August 28, 2015 at 10:58:25 PM UTC-5, Brian Swanson wrote:
>
> I'd like to know how I can get a playbook callback hook that tells me when 
> a task has first been dispatched to a specific host.  
>
> I have already hooked into the callback modules for every event, but none 
> of the events indicates that a task was dispatched to a particular host. 
>  I'm only allowed to know if the host was skipped, if the host failed, when 
> the task completed for the host, or if the host was unreachable.  
>
> I want to know when the task was started for each given host.  This will 
> allow me to produce an easily parseable database activity log that shows 
> what is currently running, and on behalf of what hosts, and for which I 
> don't currently have a result for.  Also, when I do get the result, it will 
> enable me to record the duration that the host took in order to complete 
> the task.
>
> Any ideas or comments as to what I may be missing?
>
> Thanks
>
> Brian
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/aeba869d-c324-4681-9ec8-f70276ee605c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Is there something like puppet librarian or R10K for Ansible?

2015-08-29 Thread James Martin
Check this out:

http://docs.ansible.com/ansible/galaxy.html#advanced-control-over-role-requirements-files

On Friday, August 28, 2015 at 3:12:12 PM UTC-5, Jeffrey Lee wrote:
>
> I'm looking for a way to manage different versions of Ansible roles that I 
> am writing when deploying applications. For instance if one application 
> needs v1 of an Ansible role I wrote and another application needs v2 of an 
> Ansible role, is there a tool like puppet librarian or R10K that I can use 
> with Ansible that will assemble the entire Ansible package for me with the 
> correct versions of the roles?
>
> Thanks for any help!
>
> -Jeff
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6ab2cd91-614e-4b85-8231-8a7785dfae78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Can't find boto for ansible EC2 module

2015-08-29 Thread James Martin
Yay, 2 year old thread :).

The way you solve this is by modifying your inventory for localhost with 
the proper setting:

#inventory file
localhost ansible_python_interpreter="/usr/bin/env python"


This will automatically pick up the active virtualenv's python interpreter 
and modules that you've installed there, including boto.  You don't need to 
run any tasks to discover the path to the python interpreter.


On Friday, August 28, 2015 at 6:02:39 PM UTC-5, Justin Phelps wrote:
>
> I managed to fix this with these two tasks:
>
>   - name: Find the path to the python interpreter
> command: which python
> register: pythonpath
> when: lookup('env', 'CI') == "true"
>
>   - name: Set python interpreter path when in CI
> set_fact: ansible_python_interpreter={{ pythonpath.stdout }}
> when: lookup('env', 'CI') == "true"
>
> You would take out the when statements as they are specific to my testing 
> environment.
>
> On Friday, August 2, 2013 at 9:52:32 AM UTC-5, Dan McKean wrote:
>>
>> I've been considering Ansible for creating our EC2 instances, and have 
>> run into a problem with ansible not finding boto from either the command 
>> line or a playbook.
>>
>> Here's the command line and response; the playbook is similar:
>>
>> ansible localhost -m ec2 -a "image=ami-0358ce33 instance_type=t1.micro 
>> keypair=myKeypairName group=default wait=true"
>>
>> localhost | FAILED >> {
>> "failed": true,
>> "msg": "boto required for this module"
>> }
>>
>>
>> I'm running Ansible from an activated virtualenv.  Ansible was installed 
>> with pip install ansible, and boto's installed as well in the venv (as well 
>> as globally).
>>
>> If I activate the venv and open a command prompt, I can import boto 
>> without any problem, and a boto.connect_ec2() succeeds (there is a ~/.boto 
>> config file present).  Importing ansible and creating a Runner works 
>> succeeds as well.  I'm running this on Mac OS X.
>>
>> Any suggestions on how to fix this?   Thanks!
>>
>> -- Dan
>>
>>
>>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/10e039cc-c274-4013-afcc-a9a6beb70b38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.