Skip to content

Commit

Permalink
Fix patterns for updating /etc/hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgrady committed Mar 22, 2024
1 parent 6a2f5d4 commit 9d46838
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions deploy/ansible/roles/wifi_ap/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@
- 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"

- 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:
Expand Down

0 comments on commit 9d46838

Please sign in to comment.