From 9d4683897129cfd93e9351ab9555ae1b81f67297 Mon Sep 17 00:00:00 2001 From: Jim Grady Date: Fri, 22 Mar 2024 14:17:24 -0400 Subject: [PATCH] Fix patterns for updating /etc/hosts --- deploy/ansible/roles/wifi_ap/tasks/install.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/ansible/roles/wifi_ap/tasks/install.yml b/deploy/ansible/roles/wifi_ap/tasks/install.yml index 2ac3d87e7f..1db948b4c7 100644 --- a/deploy/ansible/roles/wifi_ap/tasks/install.yml +++ b/deploy/ansible/roles/wifi_ap/tasks/install.yml @@ -54,9 +54,9 @@ - name: Update localhost name lineinfile: path: /etc/hosts - regexp: ^127\.0\.1\.1 + regexp: ^127\.0\.0\.1 state: present - line: 127.0.0.1 {{ ansible_hostname }} + line: 127.0.0.1 localhost {{ ansible_hostname }} owner: root group: root mode: "0644" @@ -64,9 +64,9 @@ - name: Redirect traffic for The Combine to the AP gateway lineinfile: path: /etc/hosts - regexp: ^{{ ap_gateway.replace(".", "\\.") }} + regexp: ^{{ ap_gateway.replace(".", "\.") }} state: present - line: "{{ ap_gateway }} {{ ap_hostname }}.{{ ap_domain }} {{ ap_hostname }} rancher.{{ ap_domain }}" + line: "{{ ap_gateway }} {{ ap_hostname }}.{{ ap_domain }} {{ ap_hostname }}" - name: Install hosts lists for access point template: