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:
---
#vim:ts=2:sts=2:sw=2:et
- hosts: all
serial: 1
tasks:
- name: Gather package facts
package_facts:
manager: auto
- name: Run puppet to apply last changes
puppet:
- include_tasks: update_packages.yaml
- include_tasks: reboot.yaml
- name: "Puppet test result"
debug:
msg: "Puppet found"
when: "'puppet' in ansible_facts.packages"
- name: Run puppet to fix possible changes
puppet:
Problem is: on nodes where "puppet" is installed, puppet is skipped and on nodes, where puppet is NOT install, the task fails. What I'm doing wrong ?
cu denny