--- # - name: Pre-IP override setup # hosts: all # gather_facts: false # tasks: # - name: Capture static IP and override ansible_host with ansible_oldip # set_fact: # ansible_newip: "{{ hostvars[inventory_hostname]['ansible_host'] }}" # ansible_host: "{{ ansible_oldip }}" # when: ansible_oldip is defined - hosts: all become: true roles: - serv-01-baselinux