Did anything ever come of this? I would really like to be able to print 
friendly "Provisioning succeeded! Here's what to do next..." messages at 
the end of some of my playbooks.

--Brad

On Wednesday, September 11, 2013 at 8:24:34 AM UTC-4, Michael DeHaan wrote:
>
> Probably because it requires writing bash in the middle of your Ansible 
> playbook, which is something we want to avoid people having to do.
>
> It would be much better to enhance the debug module as it would make the 
> playbook more readable without resorting to hijinks.
>
>
>
>
> On Tue, Sep 10, 2013 at 5:06 PM, Jason Freeman <[email protected] 
> <javascript:>> wrote:
>
>> If you are really looking for specialized output, why bother using debug 
>> module? Add the following task and create some simple script to parse. The 
>> inventory_hostname will give the remote host corresponding to the stdout 
>> (you don't want to mix those up).
>>
>>     - local_action: command bash /my/local/path/writer.sh 
>> "$inventory_hostname" "{{ item }}"
>>       with_items: result.stdout_lines
>>       when: result.stdout
>>
>> A simple bash script on your local machine (writer.sh)...
>>
>>     #!/bin/sh
>>     echo $1 $2 >> out.log
>>
>> I came looking for something similar, but there doesn't seem to be a 
>> great way to format output (built in).
>>
>> hope it helps
>>
>>
>>
>> On Monday, September 9, 2013 9:46:44 AM UTC-5, Michael DeHaan wrote:
>>
>>> It seems what we really want is a better way for the debug module to 
>>> work with structured and multiline data, like:
>>>
>>> debug: var=foo.stdout_lines
>>>
>>>
>>>
>>>
>>> On Mon, Sep 9, 2013 at 2:29 AM, Firat Arig <[email protected]> 
>>> wrote:
>>>
>>>> I don't think what you want it is currently possible through ansible. 
>>>> Polling the output of a file would be a less hacky way to address your 
>>>> problem.
>>>>
>>>> 7 Eylül 2013 Cumartesi 16:16:28 UTC+3 tarihinde Nicolas Grilly yazdı:
>>>>
>>>>> On Sat, Sep 7, 2013 at 2:47 PM, Michael DeHaan <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Yep, we don't export random functions here.
>>>>>>
>>>>>> "{{ }}" is a call for string templating, it is not a place to insert 
>>>>>> arbitrary python code.
>>>>>>
>>>>>> You wouldn't want os.unlink() in there either!  :)
>>>>>>
>>>>>
>>>>> Hello Michael,
>>>>>
>>>>> Yes, I know :) It was the purpose of the small pull request James 
>>>>> accepted yesterday to update the documentation about Jinja2 expressions 
>>>>> in 
>>>>> playbooks.
>>>>>
>>>>> This is why I was a quite surprised by Jesse suggestion. I just gave 
>>>>> it a try to make sure I was not missing something, and hopefully it 
>>>>> doesn't 
>>>>> work :)
>>>>>
>>>>> Any idea on how to solve the problem I stated at the start of this 
>>>>> discussion: We have a playbook that executes database schema migrations, 
>>>>> and I want to print the list of applied migrations on the console?... The 
>>>>> list of applied migrations is printed on stdout by the migration command.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Nicolas
>>>>>  
>>>>  -- 
>>>> 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].
>>>>
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Michael DeHaan <[email protected]>
>>>
>>> CTO, AnsibleWorks, Inc.
>>> http://www.ansibleworks.com/
>>>
>>>   -- 
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Michael DeHaan <[email protected] <javascript:>>
> CTO, AnsibleWorks, Inc.
> http://www.ansibleworks.com/
>
> 

-- 
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/412046d8-02c2-4b6c-8899-56c1c78a0a8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to