feat: add dns management for alpine and debian
This commit is contained in:
parent
63d9880750
commit
0ba18a512f
4 changed files with 27 additions and 1 deletions
11
tasks/dns.yaml
Normal file
11
tasks/dns.yaml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
|
||||
# manage resolve.conf
|
||||
- name: "configure resolv.conf"
|
||||
ansible.builtin.template:
|
||||
src: "dns/resolv.conf.j2"
|
||||
dest: "/etc/resolv.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
when: ansible_facts['distribution'] in ['Alpine', 'Debian']
|
||||
|
|
@ -11,6 +11,11 @@
|
|||
ansible.builtin.include_vars: "vars/{{ ansible_os_family }}.yaml"
|
||||
tags: "always"
|
||||
|
||||
# set dns
|
||||
- name: "set dns"
|
||||
ansible.builtin.import_tasks: "dns.yaml"
|
||||
tags: "dns"
|
||||
|
||||
# set hostname
|
||||
- name: "set hostname"
|
||||
ansible.builtin.import_tasks: "hostname.yaml"
|
||||
|
|
@ -46,7 +51,6 @@
|
|||
- "ansible_virtualization_type == 'kvm'"
|
||||
tags: "swap"
|
||||
|
||||
|
||||
# manage fstab
|
||||
- name: "manage fstab"
|
||||
ansible.builtin.import_tasks: "fstab.yaml"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue