Fork me on GitHub
Permalink: 02/10/16, 14:02 by k0ste in misc tags: ansible jinja2 join
---
- 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 %}"