Interview Prep/Real-World Interview/Terraform and Ansible

Ansible `command` vs `shell` module?

IntermediateConceptTerraform and Ansible
Answer

command runs without a shell, so pipes, redirects and $VARS don't work, which also makes it safer. shell runs through /bin/sh. Prefer a dedicated module over either one.

All Real-World Interview questions Roadmap: Interview readiness

More on Terraform and Ansible