Hello Dick,

Thanks for your response.

I am trying to perform installation on I server (Microstrategy component)
and binaries along with shell script should be available in bit bucket
repository.

Ansible should be able to pull that tar file and unzip it.

After this it should be able to trigger the shell script and for this
script it needs some parameters to be passed.

I have seen in documentation that we can pass these parameters in play book
it self however that will be hard coding directly in the playbook, hence I
was thinking to read it from file and pass it to shell script.

Let me know if you need any further details to this.

Appreciate your inputs on this.

Regards
Amit

On Tue, Jan 7, 2020 at 3:35 AM Dick Visser <[email protected]> wrote:

> The shell module just executes what you tell it to - including arguments.
> So no problem there. Read again
> https://docs.ansible.com/ansible/latest/modules/shell_module.html.
>
> The -e arguments to ansible are a way to provide/override variables. Don’t
> mix those up.
>
> You mention things like “reading a file which is kept in a package”. That
> is something different than running a shell command.
>
> So, could you please tell clearly:
>
>
> - What you are trying to achieve.
>
> - How you are doing this.
>
> - What problems you encounter.
>
> - Which command did you run, and what output did you get from that (copied
> as text, not as images/attachments/screenshots)
>
> - What the relevant tasks/playbooks/code/variables look like
>
>
>
>
> On Tue, 7 Jan 2020 at 02:57, Amit Kulkarni <[email protected]> wrote:
>
>> Hello All,
>>
>> I need to execute shell script using ansible but need to pass arguments
>> to this script without using -e arguments.
>>
>> Is there anyway if we can read the file kept inside the package and read
>> those variables in ansible playbooks and pass it to shell script.
>>
>> Let me know if there is anyway to achieve this.
>>
>> Regards
>> Amit
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CAON3ZR2HX2DoJunckcUC1OSp1d2px8z-rcQ0%2BNTXQ26dcPqONA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/CAON3ZR2HX2DoJunckcUC1OSp1d2px8z-rcQ0%2BNTXQ26dcPqONA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> Sent from a mobile device - please excuse the brevity, spelling and
> punctuation.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwNMhuc8aJOEZuJ8LC7munQTzPJv7U4%2BLO2tw3KN9JbK-w%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAL8fbwNMhuc8aJOEZuJ8LC7munQTzPJv7U4%2BLO2tw3KN9JbK-w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAON3ZR1akx58P8gDJPz0sG2wgUeihzJ%2B-cqSy%3DMT3v9%3DrtmAxQ%40mail.gmail.com.

Reply via email to