fix: issue with debian when migrate to resolved-systemd
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
8c5e4a266b
commit
6c2ddb35a6
@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Ensure dhcpcd is instaled
|
||||
community.general.pacman:
|
||||
ansible.builtin.package:
|
||||
name: dhcpcd
|
||||
state: present
|
||||
become: true
|
||||
@ -11,3 +11,19 @@
|
||||
line: "hostname"
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: start and enable dhcpcd
|
||||
ansible.builtin.service:
|
||||
name: dhcpcd
|
||||
state: started
|
||||
enabled: true
|
||||
become: true
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: stop and disable networking
|
||||
ansible.builtin.service:
|
||||
name: networking
|
||||
state: stopped
|
||||
enabled: false
|
||||
become: true
|
||||
when: ansible_os_family == "Debian"
|
||||
|
@ -9,15 +9,15 @@
|
||||
ansible.builtin.include_tasks: hostname.yml
|
||||
- name: Include hosts
|
||||
ansible.builtin.include_tasks: hosts.yml
|
||||
- name: Inclide systemd-resolved
|
||||
ansible.builtin.include_tasks: systemd-resolved.yml
|
||||
- name: Include tasks.sysctl
|
||||
ansible.builtin.include_tasks: tasks.sysctl.yml
|
||||
- name: Include wol
|
||||
ansible.builtin.include_tasks: wol.yml
|
||||
- name: Include dhcpcd
|
||||
ansible.builtin.include_tasks: dhcpcd.yml
|
||||
when: ansible_os_family == "Archlinux"
|
||||
when: ansible_os_family == "Archlinux" or ansible_os_family == "Debian"
|
||||
- name: Inclide systemd-resolved
|
||||
ansible.builtin.include_tasks: systemd-resolved.yml
|
||||
- name: Include locales
|
||||
ansible.builtin.include_tasks: locales.yml
|
||||
when: ansible_os_family == "Archlinux"
|
||||
|
@ -6,14 +6,31 @@
|
||||
become: true
|
||||
when: ansible_os_family == "RedHat" or ansible_os_family == "Debian"
|
||||
|
||||
- name: install systemd-resolvconf
|
||||
- name: Install systemd-resolvconf
|
||||
ansible.builtin.package:
|
||||
name: systemd-resolvconf
|
||||
state: present
|
||||
when: ansible_os_family == "Archlinux"
|
||||
- name: enable Systemd-resolved
|
||||
become: true
|
||||
|
||||
- name: Enable Systemd-resolved
|
||||
ansible.builtin.service:
|
||||
name: systemd-resolved
|
||||
state: started
|
||||
enabled: true
|
||||
become: true
|
||||
|
||||
- name: Restart Systemd-resolved
|
||||
ansible.builtin.service:
|
||||
name: systemd-resolved
|
||||
state: restarted
|
||||
become: true
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: Restart Systemd-resolved
|
||||
ansible.builtin.service:
|
||||
name: dhcpcd
|
||||
state: restarted
|
||||
become: true
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user