Comment 16 for bug 1862739

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

Reviewed: https://review.opendev.org/711665
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=4a7b1dd726ed6015708f63838e470cd9f44e405b
Submitter: Zuul
Branch: stable/rocky

commit 4a7b1dd726ed6015708f63838e470cd9f44e405b
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
    (cherry picked from commit adbe115e39ef2320e2e1ab57f97d5191282951d7)
    (cherry picked from commit ac158d19f5d0b5085b8c2fb2ba17cebd164f6582)