aboutsummaryrefslogtreecommitdiff
path: root/tnet/bird-gen.yml
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2024-06-13 22:39:18 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2024-06-13 22:39:18 +0200
commit972364516ba400878b9e06fe239c1f07d751d4fa (patch)
tree192cbde5b2502db476b237baa9f973b406f1951e /tnet/bird-gen.yml
parent76e3c7f247f16056129d945e9002730329e57ad6 (diff)
downloadinfra-master.tar.gz
infra-master.tar.bz2
infra-master.tar.xz
infra-master.zip
Diffstat (limited to 'tnet/bird-gen.yml')
-rw-r--r--tnet/bird-gen.yml20
1 files changed, 17 insertions, 3 deletions
diff --git a/tnet/bird-gen.yml b/tnet/bird-gen.yml
index 17e8128..9fa71b1 100644
--- a/tnet/bird-gen.yml
+++ b/tnet/bird-gen.yml
@@ -1,11 +1,25 @@
+- name: Remove old configuration
+ hosts: localhost
+ connection: local
+ gather_facts: False
+ tasks:
+ - file:
+ path: files
+ state: absent
+ changed_when: False
+
- name: Generate Bird configuration
- hosts: tnet
+ hosts: tnet_bird
connection: local
gather_facts: False
tasks:
- file:
path: files/{{ inventory_hostname }}
state: directory
+ changed_when: False
- template:
- src: bird-tnet.conf.j2
- dest: files/{{ inventory_hostname }}/bird-tnet.conf
+ src: "{{ item }}.j2"
+ dest: "files/{{ inventory_hostname }}/{{ item }}"
+ loop:
+ - bird-tnet-pre.conf
+ - bird-tnet.conf