you are viewing a single comment's thread
view the rest of the comments
[–] 4 points 1 year ago (1 child)

You can use || between two commands as well. If the first command returns exit code != 0, the second command will run.

I.e. which ansible || pip install ansible.

  • source
  • parent
  • hideshow 1 child comment