Explorar o código

Konfiguration der DNS-Domain hinzugefügt

Hintergrund: Proxmox überschreibt die /etc/hosts bei jedem Neustart
erdo %!s(int64=7) %!d(string=hai) anos
pai
achega
5340fcb8ec
Modificáronse 1 ficheiros con 13 adicións e 0 borrados
  1. 13 0
      roles/config_server/tasks/tasks/dns-domain.yml

+ 13 - 0
roles/config_server/tasks/tasks/dns-domain.yml

@@ -0,0 +1,13 @@
+---
+ ## https://pve.proxmox.com/wiki/Linux_Container#_guest_operating_system_configuration
+ - name: Create /etc/.pve-ignore.hosts
+   file:
+        path: /etc/.pve-ignore.hosts
+        state: file 
+
+ - name: Set dns domain in /etc/hosts 
+   lineinfile: 
+        dest=/etc/hosts 
+        regexp='127.0.1.1.*'
+        line="127.0.1.1 {{ansible_hostname }}.{{ ansible_dns.domain }} {{ ansible_hostname }}" 
+        state=present