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


                                       


           
                  
       
            




                                  

               


                                 
                      
                     


               
                         
         
                



                                                
                               
               

              

         






                                                   


               

                                                 
                                                                
                         


               







                              

         

                          



                                                                             

         
              

                        
---
- name: Install bird and bird6 packages
  dnf:
    name:
    - bird
    - bird6
    state: present
  tags:
  - packages

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

- name: Create bird.conf and bird6.conf symlinks
  file:
    path: '/etc/{{ item }}.conf'
    src: 'bird/{{ item }}.conf'
    state: link
    force: yes
  with_items:
  - bird
  - bird6

# bird6 wants the link to have a link-local address
# when starting, so wait for it
- name: Create bird6 service drop-in directory
  file:
    dest: '/etc/systemd/system/bird6.service.d'
    state: directory
    owner: root
    group: root
    mode: 0755
- name: Start bird6 after networks are configured
  copy:
    dest: '/etc/systemd/system/bird6.service.d/wait-online.conf'
    src: wait-online.conf
    owner: root
    group: root
    mode: 0644

- name: Enable bird and bird6
  systemd:
    name: '{{ item }}.service'
    enabled: yes
    masked: no
    state: started
  with_items:
  - bird
  - bird6
  when: not chroot
- name: '- when in chroot'
  command: 'systemctl enable {{ item }}.service'
  args:
    creates: '/etc/systemd/system/multi-user.target.wants/{{ item }}.service'
  with_items:
  - bird
  - bird6
  when: chroot

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