--- - name: remove packages apt: name='{{item}}' state=removed with_items: - "{{os_security_packages_list}}" when: os_security_packages_clean