I'm using a role in my playbook that uses the apt_key module:

- name: import repository key
  apt_key: url=http://www.rabbitmq.com/rabbitmq-signing-key-public.asc 
state=present

The target host sits behind a proxy, and I have the usual proxy environment 
variables already set.  This is enough to get various apt, apt_repository 
and other external-resource-calling tasks to work without a problem. 
However apt_key fails:

msg: Failed to download key at 
> http://www.rabbitmq.com/rabbitmq-signing-key-public.asc: Request failed: 
> <urlopen error timed out>


If I explicitly set the environment proxy variables on the task then the 
problem is resolved (as below).  Why do I explicitly have to set the 
environment for apt_key and not other modules?  Is this intended?

- name: import repository key
  apt_key: url=http://www.rabbitmq.com/rabbitmq-signing-key-public.asc 
state=present
  environment:
    http_proxy: http://proxy.domain.com:8080

-- 
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/7f11b62f-acf0-455a-900f-586f61318ed5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to