Re: [ansible-project] Changing the delimiter for lookup results

2016-01-09 Thread Matt Martz
What I am saying is to literally do:

key="{{ ssh_keys|join('\n') }}"

There is no need to use any lookup plugin.

Just join the list with a \n

On Saturday, January 9, 2016, Jesse Schlüter 
wrote:

> If I understand you correctly this would work like this, yes?
>
> vars:
>   ssh_keys_string: "{{ lookup('items', ssh_keys, wantlist=True) |
> join('\n') }}"
>
> I know my example does not make much sense, but I do not actually have the
> ssh_key variable as a list of all ssh-keys, but create it via lookup. I
> just used the items lookup to simplify the example.
>
> Am Samstag, 9. Januar 2016 00:07:21 UTC+1 schrieb Matt Martz:
>>
>> I would instead of looping, just use the |join filter.
>>
>> On Friday, January 8, 2016, Jesse Schlüter 
>> wrote:
>>
>>> Hey everyone,
>>>
>>> as I understand, normally a lookup returning a list, will be joined to a
>>> string using "," as a delimiter. Is it possible to change this behavior?
>>>
>>> I only found the solution by patching the code. The background of the
>>> question is, that I would like to do something like this:
>>>
>>>   vars:
>>> ssh_keys:
>>>   - key1
>>>   - key2
>>>   - key3
>>>   tasks:
>>> - name: set authorized keys exclusive
>>>   authorized_key: user=root exclusive=yes key="{{ lookup('items',
>>> ssh_keys, delimiter='\n') }}"
>>>
>>> Unfortunately authorized_key using the exclusive flag is not loop aware.
>>> I do already have a patch for 1.9 enabling the delimiter keyword, but I
>>> wanted to ask whether there is a "native" solution before bothering the
>>> developers with a pull request.
>>>
>>> Best regards,
>>> Jesse
>>>
>>> --
>>> 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/bc5227af-2a8d-4532-a352-880dbe27d588%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Matt Martz
>> @sivel
>> sivel.net
>>
>> --
> 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/069b1d16-6bfc-4cf7-8efa-1228be56674c%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Matt Martz
@sivel
sivel.net

-- 
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/CAD8N0v-YJXeg8hxxZWZpCP5MGOEfUriWU6fHJnHnrLC5XNiHZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Ansible 2.0 release delay

2016-01-09 Thread knacktus
I just want to use the moment to thank all people helping developing 
Ansible. When taking a step back and thinking about the huge value you guys 
are creating for everyone for free I can only be very grateful.


Cheers,

Jan

-- 
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/09e1bf68-6ec2-4d36-a216-3c0105977a90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible-galaxy with http/s proxy

2016-01-09 Thread Александр Костырев
forgot to mention!

ansible-1.9.4-1.fc23.noarch

cat Ansiblefile.yml
- src: jtyr.environment
  path: roles

if Ansiblefile.yml contains

- src: https://github.com/picotrading/ansible-sudo.git
  name: jtyr.sudo
  path: roles


script succeeds

On Sunday, 10 January 2016 10:15:37 UTC+3, Александр Костырев wrote:
>
> I've got the same problem.
> I've set up cntlm. It listens
>
>
> $ sudo netstat -nlp --inet | grep 3128
> tcp0  0 127.0.0.1:3128  0.0.0.0:*   
> LISTEN  13673/cntlm 
>
> I've got a bash script that suppose to install all my roles:
>
> #!/bin/bash
>
> https_proxy="http://127.0.0.1:3128;
> http_proxy="http://127.0.0.1:3128;
>
> cat Ansiblefile_external_roles.yml > Ansiblefile.yml
> ansible-galaxy install -r Ansiblefile.yml
>
>
> but if fails:
>
> bash -x ansible_install_roles.sh
> + https_proxy=http://127.0.0.1:3128
> + http_proxy=http://127.0.0.1:3128
> + cat Ansiblefile_external_roles.yml
> + ansible-galaxy install -r Ansiblefile.yml --force
> - the API server (galaxy.ansible.com) is not responding, please try again 
> later.
>
>
>
>
> On Friday, 28 August 2015 19:34:53 UTC+3, Greg DeKoenigsberg wrote:
>>
>> If it fails for you again, give us some more specific info and we'll dig 
>> in. 
>>
>> --g 
>>
>> On Fri, Aug 28, 2015 at 11:36 AM, Emilio Del Plato  
>> wrote: 
>> > when we tried that it did not appear to work. Ill give it another try. 
>> > 
>> > Thanks for the reply. 
>> > ~Emilio 
>> > 
>> > On Friday, August 28, 2015 at 10:57:37 AM UTC-4, Greg DeKoenigsberg 
>> wrote: 
>> >> 
>> >> A quote from someone smarter than me: 
>> >> 
>> >> "It's using urllib/httplib so setting the http{s}_proxy environment 
>> >> variable should have it use the proxy." 
>> >> 
>> >> (Hint: the person is jimi-c.) 
>> >> 
>> >> --g 
>> >> 
>> >> On Thu, Aug 27, 2015 at 5:37 PM, Emilio Del Plato  
>>
>> >> wrote: 
>> >> > Apologies if this has been covered somewhere and I missed it. 
>> >> > 
>> >> > Is it possible to have ansible-galaxy (CLI) connect using a proxy? 
>> we 
>> >> > have 
>> >> > our primary ansible box walled off and it needs to use a proxy to 
>> >> > connect to 
>> >> > the web (galaxy.ansible.com, github.com) 
>> >> > I have tried using tsocks as well as setting environment variables 
>> but 
>> >> > none 
>> >> > of these options seem to be honored by galaxy cli. 
>> >> > 
>> >> > Is anyone aware of anyother method to use ansible-galaxy with a 
>> proxy? 
>> >> > 
>> >> > -- 
>> >> > 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-proje...@googlegroups.com. 
>> >> > To post to this group, send email to ansible...@googlegroups.com. 
>> >> > To view this discussion on the web visit 
>> >> > 
>> >> > 
>> https://groups.google.com/d/msgid/ansible-project/53effa7d-bd7b-4cc4-9eb7-8d2ed12ad839%40googlegroups.com.
>>  
>>
>> >> > For more options, visit https://groups.google.com/d/optout. 
>> >> 
>> >> 
>> >> 
>> >> -- 
>> >> Greg DeKoenigsberg 
>> >> Ansible Community Guy 
>> >> 
>> >> Find out why SD Times named Ansible 
>> >> their #1 Company to Watch in 2015: 
>> >> http://sdtimes.com/companies-watch-2015/ 
>> > 
>> > -- 
>> > 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-proje...@googlegroups.com. 
>> > To post to this group, send email to ansible...@googlegroups.com. 
>> > To view this discussion on the web visit 
>> > 
>> https://groups.google.com/d/msgid/ansible-project/88c45261-ac74-4283-a65d-26f64389c802%40googlegroups.com.
>>  
>>
>> > 
>> > For more options, visit https://groups.google.com/d/optout. 
>>
>>
>>
>> -- 
>> Greg DeKoenigsberg 
>> Ansible Community Guy 
>>
>> Find out why SD Times named Ansible 
>> their #1 Company to Watch in 2015: 
>> http://sdtimes.com/companies-watch-2015/ 
>>
>

-- 
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/dd7728de-777d-4b36-b6b0-cee65aa016cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible-galaxy with http/s proxy

2016-01-09 Thread Александр Костырев
I've got the same problem.
I've set up cntlm. It listens


$ sudo netstat -nlp --inet | grep 3128
tcp0  0 127.0.0.1:3128  0.0.0.0:*   LISTEN 
 13673/cntlm 

I've got a bash script that suppose to install all my roles:

#!/bin/bash

https_proxy="http://127.0.0.1:3128;
http_proxy="http://127.0.0.1:3128;

cat Ansiblefile_external_roles.yml > Ansiblefile.yml
ansible-galaxy install -r Ansiblefile.yml


but if fails:

bash -x ansible_install_roles.sh
+ https_proxy=http://127.0.0.1:3128
+ http_proxy=http://127.0.0.1:3128
+ cat Ansiblefile_external_roles.yml
+ ansible-galaxy install -r Ansiblefile.yml --force
- the API server (galaxy.ansible.com) is not responding, please try again 
later.




On Friday, 28 August 2015 19:34:53 UTC+3, Greg DeKoenigsberg wrote:
>
> If it fails for you again, give us some more specific info and we'll dig 
> in. 
>
> --g 
>
> On Fri, Aug 28, 2015 at 11:36 AM, Emilio Del Plato  > wrote: 
> > when we tried that it did not appear to work. Ill give it another try. 
> > 
> > Thanks for the reply. 
> > ~Emilio 
> > 
> > On Friday, August 28, 2015 at 10:57:37 AM UTC-4, Greg DeKoenigsberg 
> wrote: 
> >> 
> >> A quote from someone smarter than me: 
> >> 
> >> "It's using urllib/httplib so setting the http{s}_proxy environment 
> >> variable should have it use the proxy." 
> >> 
> >> (Hint: the person is jimi-c.) 
> >> 
> >> --g 
> >> 
> >> On Thu, Aug 27, 2015 at 5:37 PM, Emilio Del Plato  
> >> wrote: 
> >> > Apologies if this has been covered somewhere and I missed it. 
> >> > 
> >> > Is it possible to have ansible-galaxy (CLI) connect using a proxy? we 
> >> > have 
> >> > our primary ansible box walled off and it needs to use a proxy to 
> >> > connect to 
> >> > the web (galaxy.ansible.com, github.com) 
> >> > I have tried using tsocks as well as setting environment variables 
> but 
> >> > none 
> >> > of these options seem to be honored by galaxy cli. 
> >> > 
> >> > Is anyone aware of anyother method to use ansible-galaxy with a 
> proxy? 
> >> > 
> >> > -- 
> >> > 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-proje...@googlegroups.com. 
> >> > To post to this group, send email to ansible...@googlegroups.com. 
> >> > To view this discussion on the web visit 
> >> > 
> >> > 
> https://groups.google.com/d/msgid/ansible-project/53effa7d-bd7b-4cc4-9eb7-8d2ed12ad839%40googlegroups.com.
>  
>
> >> > For more options, visit https://groups.google.com/d/optout. 
> >> 
> >> 
> >> 
> >> -- 
> >> Greg DeKoenigsberg 
> >> Ansible Community Guy 
> >> 
> >> Find out why SD Times named Ansible 
> >> their #1 Company to Watch in 2015: 
> >> http://sdtimes.com/companies-watch-2015/ 
> > 
> > -- 
> > 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-proje...@googlegroups.com . 
> > To post to this group, send email to ansible...@googlegroups.com 
> . 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/ansible-project/88c45261-ac74-4283-a65d-26f64389c802%40googlegroups.com.
>  
>
> > 
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> Greg DeKoenigsberg 
> Ansible Community Guy 
>
> Find out why SD Times named Ansible 
> their #1 Company to Watch in 2015: 
> http://sdtimes.com/companies-watch-2015/ 
>

-- 
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/3b2b411e-942b-4e56-8f1a-2996fefaf24c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.