a few tasks one after the other

Hi,

I am new in ansible world so please excuse my lack of knowledge.
I’d like to copy script to several remote systems, run it, read its output and then delete the script.
How could I do it in ansible ? Especially running a few tasks one after the other is a bit mysterious for me …

Thanks

So “tasks:” in an Ansible playbook is a list of steps.

However, there’s no need at all to do this as a list of steps, because the “script” module is exactly that.

It pushes a remote script to a machine, returns the output, and cleans up afterwards :slight_smile:

Hi Michael,

the script module is exactly what I was looking for. Thanks :slight_smile:
How about reading the output ? If I prepare my script to print in a “pretty”
way what about ansible output ? Is there any ansible-native way
of reading just my script output or I have to use “grep -v”-like syntax ?