shell or a Module?
A task runs shell: echo "MaxSessions 4" >> /etc/ssh/sshd_config. What is the better way to write it?
shell: echo "MaxSessions 4" >> /etc/ssh/sshd_config
Choose one answer
ansible.builtin.command, since it avoids shell parsing
ansible.builtin.command
ansible.builtin.lineinfile with a regexp and a line
ansible.builtin.lineinfile
regexp
line
ansible.builtin.raw, so it works without Python
ansible.builtin.raw
The same shell task, with changed_when: false added
shell
changed_when: false