aboutsummaryrefslogblamecommitdiffstats
path: root/roles/space_server/tasks/resolved.yml
blob: 9196e1c21689a536a4295e3ecfc9e3d6e935afc7 (plain) (tree)
1
2
3
4
5
6
7
8
9






                                   

                           


                                                                                    
               












                                                                  

                          


                                                                                   
              

                        
---
#- name: Enable systemd-resolved
#  systemd:
#    name: systemd-resolved.service
#    enabled: yes
#    masked: no
#    state: started
#  when: not chroot
#- name: '- when in chroot'
#  command: systemctl enable systemd-resolved.service
#  args:
#    creates: '/etc/systemd/system/multi-user.target.wants/systemd-resolved.service'
#  when: chroot
#
#- name: Use systemd-resolved
#  lineinfile:
#    path: /etc/nsswitch.conf
#    regexp: '^hosts:'
#    line: 'hosts: files resolve [!UNAVAIL=return] dns myhostname'

- name: Disable systemd-resolved
  systemd:
    name: systemd-resolved.service
    enabled: no
    masked: no
    state: stopped
  when: not chroot
- name: '- when in chroot'
  command: systemctl disable systemd-resolved.service
  args:
    removes: '/etc/systemd/system/multi-user.target.wants/systemd-resolved.service'
  when: chroot

# vim: set ts=2 sw=2 et: