add centos 7/8 varians

This commit is contained in:
ace 2021-10-25 14:24:40 +03:00
parent d172925447
commit 84425da4c2
No known key found for this signature in database
GPG Key ID: 2E47CC17BA7F8CF0
3 changed files with 54 additions and 25 deletions

26
tasks/RedHat/7.yaml Normal file
View File

@ -0,0 +1,26 @@
---
- name: install bird
package:
name: bird2
state: present
- name: add bird config
template:
src: bird.conf.j2
dest: /etc/bird.conf
notify:
- restart bird
- name: update ifcfg-lo config
template:
src: ifcfg-lo.j2
dest: /etc/sysconfig/network-scripts/ifcfg-lo
notify:
- restart loopback
- name: start bird service
systemd:
name: bird
state: started
enabled: yes
daemon_reload: yes

26
tasks/RedHat/8.yaml Normal file
View File

@ -0,0 +1,26 @@
---
- name: install bird
package:
name: bird
state: present
- name: add bird config
template:
src: bird.conf.j2
dest: /etc/bird.conf
notify:
- restart bird
- name: update ifcfg-lo config
template:
src: ifcfg-lo.j2
dest: /etc/sysconfig/network-scripts/ifcfg-lo
notify:
- restart loopback
- name: start bird service
systemd:
name: bird
state: started
enabled: yes
daemon_reload: yes

View File

@ -1,26 +1,3 @@
---
- name: install bird
package:
name: bird2
state: present
- name: add bird config
template:
src: bird.conf.j2
dest: /etc/bird.conf
notify:
- restart bird
- name: update ifcfg-lo config
template:
src: ifcfg-lo.j2
dest: /etc/sysconfig/network-scripts/ifcfg-lo
notify:
- restart loopback
- name: start bird service
systemd:
name: bird
state: started
enabled: yes
daemon_reload: yes
- name: Include BIRD installation tasks
include: "{{ ansible_os_family }}/{{ ansible_distribution_version }}.yaml"