aboutsummaryrefslogtreecommitdiff
path: root/tnet/bird-gen.yml
diff options
context:
space:
mode:
Diffstat (limited to 'tnet/bird-gen.yml')
-rw-r--r--tnet/bird-gen.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/tnet/bird-gen.yml b/tnet/bird-gen.yml
new file mode 100644
index 0000000..9fa71b1
--- /dev/null
+++ b/tnet/bird-gen.yml
@@ -0,0 +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_bird
+ connection: local
+ gather_facts: False
+ tasks:
+ - file:
+ path: files/{{ inventory_hostname }}
+ state: directory
+ changed_when: False
+ - template:
+ src: "{{ item }}.j2"
+ dest: "files/{{ inventory_hostname }}/{{ item }}"
+ loop:
+ - bird-tnet-pre.conf
+ - bird-tnet.conf