--- - name: install common programs with zypper and transactional-update community.general.zypper: pkg: - borgbackup - tmux - lynis - toolbox state: present register: zypper_result - name: reboot if software needed to be installed ansible.builtin.reboot: when: zypper_result.changed