Alternatives to exporting environment variables

38 views
Skip to first unread message

Chethan Aravind T S

unread,
Dec 15, 2016, 12:19:25 PM12/15/16
to Ansible Project
Hi, 
    I have attached a playbook to export environment variables for proxy and aws keys. Even if I run this or include this at the top of provisioning script, I am getting an error "NO HANDLER WAS READY TO AUTHENTICATE". But if I run those commands on terminal before running the provisioning script, I am able to get the job done. I don't want to run the commands manually, Is there an efficient way of running those commands from playbook itself? 

this is the playbook I wrote to export the environment variables
---
- name: Playbook to export Handlers
  hosts: localhost
  connection: local
  become: True
  gather_facts: True
  tasks:
  - name: Proxy variables
    raw:
       export http_proxy=http://<url>:<port>
       export https_proxy=https://<url>:<port>

  - name: AWS authentication environment variables
    raw:
       export AWS_ACCESS_KEY_ID=example123
       export AWS_SECRET_ACCESS_KEY=example3456


Thanks and Regards, 
Chethan Aravind T S

Mikael Sandström

unread,
Dec 15, 2016, 2:17:01 PM12/15/16
to Ansible Project
Reply all
Reply to author
Forward
0 new messages