소스 검색

puppet:
- fix dns name on lxc-container

erdo_king 4 년 전
부모
커밋
8db37d3a61
1개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 15 0
      roles/puppet/tasks/main.yml

+ 15 - 0
roles/puppet/tasks/main.yml

@@ -1,4 +1,19 @@
 ---
+## https://pve.proxmox.com/wiki/Linux_Container#_guest_operating_system_configuration
+- name: Create /etc/.pve-ignore.hosts
+  file:
+       path: /etc/.pve-ignore.hosts
+       state: touch 
+
+- 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
+
+######################
+
 - name: install the puppet rpm from a remote repo
   apt:
     deb: https://apt.puppet.com/puppet7-release-buster.deb