From 581484d2078d91835d4ba61ff44b2671742f634f Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Wed, 29 Sep 2021 18:38:23 +0000 Subject: [PATCH] unbound: Change static configs to templates --- roles/unbound/files/unbound.conf.nms02.home.foo.sh | 1 - roles/unbound/tasks/main.yml | 4 ++-- .../unbound.conf.dna-gw01.home.foo.sh.j2} | 0 .../unbound.conf.dna-gw02.home.foo.sh.j2} | 0 .../unbound.conf.nms01.home.foo.sh.j2} | 0 roles/unbound/templates/unbound.conf.nms02.home.foo.sh.j2 | 1 + .../unbound.conf.print01.home.foo.sh.j2} | 0 .../unbound.conf.zm02.home.foo.sh.j2} | 0 8 files changed, 3 insertions(+), 3 deletions(-) delete mode 120000 roles/unbound/files/unbound.conf.nms02.home.foo.sh rename roles/unbound/{files/unbound.conf.dna-gw01.home.foo.sh => templates/unbound.conf.dna-gw01.home.foo.sh.j2} (100%) rename roles/unbound/{files/unbound.conf.dna-gw02.home.foo.sh => templates/unbound.conf.dna-gw02.home.foo.sh.j2} (100%) rename roles/unbound/{files/unbound.conf.nms01.home.foo.sh => templates/unbound.conf.nms01.home.foo.sh.j2} (100%) create mode 120000 roles/unbound/templates/unbound.conf.nms02.home.foo.sh.j2 rename roles/unbound/{files/unbound.conf.print01.home.foo.sh => templates/unbound.conf.print01.home.foo.sh.j2} (100%) rename roles/unbound/{files/unbound.conf.zm02.home.foo.sh => templates/unbound.conf.zm02.home.foo.sh.j2} (100%) diff --git a/roles/unbound/files/unbound.conf.nms02.home.foo.sh b/roles/unbound/files/unbound.conf.nms02.home.foo.sh deleted file mode 120000 index 828eef3..0000000 --- a/roles/unbound/files/unbound.conf.nms02.home.foo.sh +++ /dev/null @@ -1 +0,0 @@ -unbound.conf.nms01.home.foo.sh \ No newline at end of file diff --git a/roles/unbound/tasks/main.yml b/roles/unbound/tasks/main.yml index d9d4e8c..aa2443b 100644 --- a/roles/unbound/tasks/main.yml +++ b/roles/unbound/tasks/main.yml @@ -16,9 +16,9 @@ notify: restart unbound - name: copy config - copy: + template: dest: "{{ unbound_conf }}" - src: "unbound.conf.{{ inventory_hostname }}" + src: "unbound.conf.{{ inventory_hostname }}.j2" mode: 0644 owner: root group: "{{ ansible_wheel }}" diff --git a/roles/unbound/files/unbound.conf.dna-gw01.home.foo.sh b/roles/unbound/templates/unbound.conf.dna-gw01.home.foo.sh.j2 similarity index 100% rename from roles/unbound/files/unbound.conf.dna-gw01.home.foo.sh rename to roles/unbound/templates/unbound.conf.dna-gw01.home.foo.sh.j2 diff --git a/roles/unbound/files/unbound.conf.dna-gw02.home.foo.sh b/roles/unbound/templates/unbound.conf.dna-gw02.home.foo.sh.j2 similarity index 100% rename from roles/unbound/files/unbound.conf.dna-gw02.home.foo.sh rename to roles/unbound/templates/unbound.conf.dna-gw02.home.foo.sh.j2 diff --git a/roles/unbound/files/unbound.conf.nms01.home.foo.sh b/roles/unbound/templates/unbound.conf.nms01.home.foo.sh.j2 similarity index 100% rename from roles/unbound/files/unbound.conf.nms01.home.foo.sh rename to roles/unbound/templates/unbound.conf.nms01.home.foo.sh.j2 diff --git a/roles/unbound/templates/unbound.conf.nms02.home.foo.sh.j2 b/roles/unbound/templates/unbound.conf.nms02.home.foo.sh.j2 new file mode 120000 index 0000000..4b3c596 --- /dev/null +++ b/roles/unbound/templates/unbound.conf.nms02.home.foo.sh.j2 @@ -0,0 +1 @@ +unbound.conf.nms01.home.foo.sh.j2 \ No newline at end of file diff --git a/roles/unbound/files/unbound.conf.print01.home.foo.sh b/roles/unbound/templates/unbound.conf.print01.home.foo.sh.j2 similarity index 100% rename from roles/unbound/files/unbound.conf.print01.home.foo.sh rename to roles/unbound/templates/unbound.conf.print01.home.foo.sh.j2 diff --git a/roles/unbound/files/unbound.conf.zm02.home.foo.sh b/roles/unbound/templates/unbound.conf.zm02.home.foo.sh.j2 similarity index 100% rename from roles/unbound/files/unbound.conf.zm02.home.foo.sh rename to roles/unbound/templates/unbound.conf.zm02.home.foo.sh.j2