Execute module only, if package is installed

hi,

I’m pretty new to Ansible (2.8 on Debian Stretch) and we have very simple playbook for upgrading packages, including run rkhunter / puppet / reboot etc. My problem is, that I do not have puppet an all nodes installed, so I tried: