- hosts: localhost tasks: - name: Enable openssh service service: name: sshd state: started enabled: true - name: Require lo interface lineinfile: state: present path: /etc/conf.d/sshd insertafter: EOF line: rc_need="networking"