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.

Reply via email to