- name: Disable systemd-networkd.service (OS's other than centos)
  service:
    name: systemd-networkd.service
    enabled: no
  when: not is_centos

- name: Mask systemd-networkd.service (OS's other than centos)
  shell: 'systemctl mask systemd-networkd'
  when: not is_centos

- name: Disable systemd-hostnamed.service
  service:
    name: systemd-hostnamed.service
    enabled: no

- name: Disable dbus-org.freedesktop.hostname1.service
  service:
    name: dbus-org.freedesktop.hostname1
    enabled: no

- name: Mask dbus-org.freedesktop.hostname1.service
  shell: 'systemctl mask dbus-org.freedesktop.hostname1'

- name: Disable network.service
  service:
    name: network
    enabled: no

- name: Mask network.service
  shell: 'systemctl mask network.service'

# Network Manager starts this if needed
- name: Disable wpa_supplicant
  service:
    name: wpa_supplicant
    enabled: no
