I export ANSIBLE_CONSUL_URL in order for the Consul lookup pluging to 
search against a remote server. I'm not able to set this environment 
variable within my playbook. It still defaults to localhost. Is it not 
possible?

# group_vars/all

consul_url_env:
   ANSIBLE_CONSUL_URL: http://MY_REMOTE_IP:8500

tasks:
    - name: Grab environment info from aria.conf and set a variable
      set_fact: environment_id="sf"

    - name: Build list of modules and its associated tag
      set_fact: deploy_list="{{ item | replace("deploys/" + environment_id 
 + "/",'') }}-{{ lookup('consul_kv','deploys/' + environment_id + '/' + 
item) }}"
      with_items: "{{ modules }}"
      environment: "{{ consul_url_env }}"
      register: deploy_list_result

-- 
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/f7008a74-3a21-4717-92ff-31a0b7393f58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to