You could pass the variable through SSH with SendEnv/AcceptEnv, but it
would be much easier to modify your shell script to read in $1 then pass
the URL variable like:

shell: sh /opt/install_script/test.sh "{{ URL }}"

On Mon, Mar 21, 2016 at 5:24 AM, Pandithurai S <pandithurai....@gmail.com>
wrote:

> How to use my jenkins variable( (defined from jenkins environment) in
> remote server using Ansible play book.
>
> I am able to get my variable using
>
> RPM_URL_PATH = is defined in  jenkins environment variable
>
>  vars:
>    URL: "{{ lookup('env','RPM_URL_PATH') }}"
>
>
> I need to use value of RPM_URL_PATH in the shell script of my remote host.
>
> i am running my shell script using shell module
>
>   shell: sh /opt/install_script/test.sh
>
> can you please help me on this ?
>
> Thanks,
> Pandithurai.
>
> --
> 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/d78071bd-fd3a-441f-b945-e71af147a18a%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/d78071bd-fd3a-441f-b945-e71af147a18a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Chad Anderson
DevOps Engineer
DomainTools

cander...@domaintools.com
www.domaintools.com

-- 
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/CADCir8NU9x%2BueAf44iONS8%2B6Qn%3DMyFrJfQ%2BgZjBYAMG5XYccvw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to