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




                                  


               

                         
                                 
                     


               
                                     
         
                    
 



                                                                      


               

                                                            
                                                                                      
                                 


               






                                  

                          


                                                                                   
              

                        
---
- name: Make sure directory exists
  file:
    dest: '/etc/systemd/network'
    state: directory
    owner: root
    group: root
    mode: 0755
- name: Configure network
  copy:
    dest: '/etc/systemd/network/'
    src: '{{ item }}'
    owner: root
    group: root
    mode: 0644
  with_fileglob: 'networkd/network/*'
  notify:
  - restart networkd

- name: Create systemd-networkd-wait-online drop-in directory
  file:
    dest: '/etc/systemd/system/systemd-networkd-wait-online.service.d'
    state: directory
    owner: root
    group: root
    mode: 0755
- name: Don't wait for lan and mgt interfaces to come online
  copy:
    dest: '/etc/systemd/system/systemd-networkd-wait-online.service.d/no-lan-mgt.conf'
    src: networkd/no-lan-mgt.conf
    owner: root
    group: root
    mode: 0644

- name: Enable systemd-networkd
  systemd:
    name: systemd-networkd.service
    enabled: yes
    masked: no
    state: started
  when: not chroot
- name: '- when in chroot'
  command: systemctl enable systemd-networkd.service
  args:
    creates: '/etc/systemd/system/multi-user.target.wants/systemd-networkd.service'
  when: chroot

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