--- - name: get {{ devstack_host_interface }} host IP shell: >- ip addr list {{ devstack_host_interface }} | grep 'inet ' | awk '{print $2}' register: get_devstack_host_ip - name: parse host IP set_fact: devstack_host_ip: >- {{ get_devstack_host_ip.stdout.split('/', 1)[0] }} - name: copy local.conf file become: true template: owner: stack group: stack src: '{{ devstack_local_conf_file }}' dest: '{{ devstack_dir }}/local.conf'