Comment 10 for bug 1862739

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.opendev.org/707364
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=adbe115e39ef2320e2e1ab57f97d5191282951d7
Submitter: Zuul
Branch: master

commit adbe115e39ef2320e2e1ab57f97d5191282951d7
Author: Radosław Piliszek <email address hidden>
Date: Wed Feb 12 12:08:28 2020 +0100

    Use more permissive regex to remove the offending 127.0.1.1

    line from /etc/hosts

    Ubuntu always uses 127.0.1.1 for that with some tricky sauce
    around `hostname` depending on whether it contains '.' or not.
    And when I mean `hostname` it's the one returned by `hostname`
    command with no arguments.

    ansible_hostname is always a single word so we can match on that.

    I did not want to remove just any 127.0.1.1 in case someone
    is using it for other purposes. :-)

    Change-Id: I8bd3d42a5e3bd0f63336ed60a0af90d52b1650d6
    Closes-bug: #1862739