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

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/371fbf81-4bd3-4a9e-808c-14c3d78dd44f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to