For small deployments, this kind of thing means One Less Thing To Understand. I like and use Ansible, but there is a mild learning curve and the occasional gotcha.
Given you generally have to know what you're trying to achieve in shell anyway, the shell versions are simpler, if less robust. For example,
sudo apt update && sudo apt install nginx
is easier than
become: True
tasks:
- name: install nginx for great justice
apt:
name: nginx
update_cache: yes
state: latest
There are also some edge cases where shell is better than ansible; some parameters are missing from some modules, meaning shell is more flexible; or if you want to read a command's STDOUT, it's a pain in Ansible.
Given you generally have to know what you're trying to achieve in shell anyway, the shell versions are simpler, if less robust. For example,
is easier than There are also some edge cases where shell is better than ansible; some parameters are missing from some modules, meaning shell is more flexible; or if you want to read a command's STDOUT, it's a pain in Ansible.