--- - name: install cinder packages action: "{{ ansible_pkg_mgr }} name={{ item }} state=present" with_items: packages | union(packages_noarch) - name: generate common cinder service list shell: echo {{ item }} >> /opt/service with_items: services | union(services_noarch)