Hi, Take a look at this: http://docs.ansible.com/ansible/playbooks_environment.html
regards /Micke On Thursday, December 15, 2016 at 6:19:25 PM UTC+1, Chethan Aravind T S wrote: > > 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 > > -- 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/12b95f76-cecc-46cc-84ad-0c141e0a3515%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
