switch to duconet-wg service mesh
This commit is contained in:
9
k3s/hosts/README.md
Normal file
9
k3s/hosts/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Kubernetes Node Ansible
|
||||
|
||||
Updates /etc/hosts on each kubernetes node with the correct IP for democratic-csi-server.reeselink.com
|
||||
|
||||
## Update Hosts
|
||||
|
||||
```bash
|
||||
ansible-playbook -i ansible/inventory.yaml k3s/hosts/update_hosts.yaml
|
||||
```
|
||||
4
k3s/hosts/hosts
Normal file
4
k3s/hosts/hosts
Normal file
@@ -0,0 +1,4 @@
|
||||
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
|
||||
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
|
||||
# 172.20.0.1 democratic-csi-server.reeselink.com
|
||||
fd00:fd41:d0f1:1010::6 democratic-csi-server.reeselink.com
|
||||
20
k3s/hosts/update_hosts.yaml
Normal file
20
k3s/hosts/update_hosts.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
- name: Update /etc/hosts
|
||||
hosts: kubernetes
|
||||
become: true
|
||||
become_user: root
|
||||
become_method: sudo
|
||||
tasks:
|
||||
- name: Copy /etc/hosts
|
||||
ansible.builtin.copy:
|
||||
src: ./hosts
|
||||
dest: /etc/hosts
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
# - name: Add IP address of all hosts to /etc/hosts
|
||||
# lineinfile:
|
||||
# dest: /etc/hosts
|
||||
# regexp: '.*{{ item.value.address }}$'
|
||||
# line: "{{ item.value.address }} {{ item.value.hostname }}"
|
||||
# state: present
|
||||
# loop: "{{ ip | dict2items }}"
|
||||
Reference in New Issue
Block a user