--- - hosts: all vars: resolv_conf_file: /etc/resolv.conf dest_dir: /opt/stack pre_tasks: - name: copy '{{ resolv_conf_file}}' file become: yes copy: src: '{{ resolv_conf_file }}' dest: /etc/resolv.conf owner: root group: root mode: '0644' - name: update APT database apt: update_cache: yes cache_valid_time: 3600 become: yes when: - ansible_os_family == 'Debian' roles: - devstack-tobiko-deploy - devstack-tobiko-run-tests