mirror of
https://gitea.0xace.cc/ansible-galaxy/bird.git
synced 2024-11-25 08:06:38 +00:00
43 lines
863 B
YAML
43 lines
863 B
YAML
---
|
|
- name: Install bird
|
|
package:
|
|
name: "{{ bird_package }}"
|
|
state: present
|
|
register: bird_setup
|
|
|
|
- name: Add bird.conf
|
|
template:
|
|
src: bird.conf.j2
|
|
dest: /etc/bird.conf
|
|
notify:
|
|
- Reload bird
|
|
|
|
- name: Template default bird.conf config
|
|
when: bird_config_override is not defined
|
|
block:
|
|
- name: Add bird.conf
|
|
template:
|
|
src: "bird.conf.j2"
|
|
dest: "/etc/bird.conf"
|
|
notify:
|
|
- Reload bird
|
|
|
|
- name: Template bird.conf override
|
|
when: bird_config_override is defined
|
|
block:
|
|
- name: Override bird.conf
|
|
copy:
|
|
content: "{{ bird_config_override }}"
|
|
dest: "/etc/bird.conf"
|
|
notify:
|
|
- Reload bird
|
|
|
|
- name: Enable and start bird service
|
|
systemd:
|
|
name: "{{ bird_unit_name }}"
|
|
state: started
|
|
enabled: yes
|
|
masked: no
|
|
daemon_reload: yes
|
|
register: bird_enable_and_start
|