Have you tried the shell module?

from the raw module doc:


   - This is useful and should only be done in a few cases. A common case
   is installing python on a system without python installed by default.
   Another is speaking to any devices such as routers that do not have any
   Python installed. In any other case, using the shell
   
<https://docs.ansible.com/ansible/latest/modules/shell_module.html#shell-module>
    or command
   
<https://docs.ansible.com/ansible/latest/modules/command_module.html#command-module>
module
   is much more appropriate.


On Wed, Jul 17, 2019 at 11:48 AM Eren Karaaslan <erenkaraas...@gmail.com>
wrote:

> I have a remote machine which I ssh to and this leads to a command shell
> from which I need to enter the command "shell" to enter into the bash
> shell. I have tried to use the raw module to execute the command and it
> works, however after entering the bash shell, the rest of my playbook is
> not preformed. Instead what occurs is that ansible stays in the bash shell
> for 10 minutes and then times out returning to the original shell. Then,
> ansible attempts to preform the rest of my playbook, which results in a
> failure as I need to execute these commands in the bash shell. Essentially,
> my question is how can I get my ansible playbook to pipe its tasks to be
> preformed while in the bash shell after I enter the shell using the raw
> module. Is there another way in which I can enter the bash shell directly
> using ansible or alternate methods to pipe in the playbook tasks?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-devel/0303f12b-c953-4b8e-bc2d-ee2e1091fd64%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-devel/0303f12b-c953-4b8e-bc2d-ee2e1091fd64%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

*Kosala (Ko) Atapattu **Technical Account Manager, NZ*
m +64 27 545 8680 <+61%20412%20315%20118> | kosala.atapa...@actifio.com |
actifio.com
<http://www.linkedin.com/company-beta/399246/> <http://twitter.com/actifio>
<http://www.youtube.com/c/Actifio_Official>
*Access your enterprise data as a service, instantly anywhere.*

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/CALXEEkNWZApxnSRsmvpY%3Dy6j71Lu2QPdiE3OvcQat__wgcZxQg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to