Shell script does NOT run on target system?

I have a task that does this

`

  • name: Generate certs using the example.sh script from zip file
    shell: >
    cd “/tmp/{{ sg_ssl_dir }}/example-pki-scripts”
    chmod +x *.sh
    ./example.sh pw pw
    `

Which should generate cert/key pairs, but I don’t see them. I do NOT get errors. If I run the script myself after ssh’ng into the target system, it works. Any clues?

SOLVED! I had to put a semi-colon at the end of each command, except the last one. so

`

  • name: Generate certs using the example.sh script from zip file
    shell: >
    cd “/tmp/{{ sg_ssl_dir }}/example-pki-scripts”;
    chmod +x *.sh;
    ./example.sh pw pw
    `

next time you might want to do:

shell: |

which preserves literal whitespace, vs

shell: >

which does not.

Nice, thank you. I changed my script accordingly.