- name: setup lilo gather_facts: no hosts: "{{target}}" become: "{{become_var}}" tasks: - name: assume lilo is insalled command: which lilo changed_when: false check_mode: false - name: deploy lilo.conf template: src: lilo.conf dest: /etc/lilo.conf notify: lilo - name: console goes ttyS0 lineinfile: path: /etc/inittab regexp: '^s1:' line: s1:12345:respawn:/sbin/agetty --noclear --local-line ttyS0 115200 linux handlers: - name: apply lilo command: lilo register: output listen: lilo - debug: var=output.msg listen: lilo - debug: var=output.stdout listen: lilo - debug: var=output.stderr listen: lilo