Fork me on GitHub
---
- name: jedi
  gather_facts: false
  no_log: false
  hosts: 127.0.0.1
  tasks:
  - name: Set facts
    set_fact:
      remove_packages:
        - thunderbird
        - firefox
  - name: MSG Remove packages
    debug: msg="{% if remove_packages -%} {{- remove_packages|join( ' ' ) -}} {%- endif %}"