To run multiple shell commands with ansible you can use the shell module with a multi-line string (note the pipe after shell:
), as shown in this example:
- name: Build nginx
shell: |
cd nginx-1.11.13
sudo ./configure
sudo make
sudo make install