From 173ca8b0c978c61908269e4213d8ba5b24a69d79 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 15 Mar 2021 19:55:33 +0000 Subject: [PATCH] Add lua-unbound for more robust DNS resolution --- ansible/tasks/prosody.yml | 41 +++++++++++++++++++++++++++++++++++++++ docker/Dockerfile | 4 ++-- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/ansible/tasks/prosody.yml b/ansible/tasks/prosody.yml index 592ace5..36509aa 100644 --- a/ansible/tasks/prosody.yml +++ b/ansible/tasks/prosody.yml @@ -130,3 +130,44 @@ name: lua-luaossl state: present install_recommends: no + +- name: "Fetch luaunbound source" + get_url: + url: https://code.zash.se/dl/luaunbound/luaunbound-0.5.tar.gz + sha256sum: a6564ac1cca6bb350576eb2a5cfa03adb0aafd4f99d6cd491bd8028d046c62a7 + dest: /tmp/luaunbound-0.5.tar.gz + +- name: "Extract luaunbound" + unarchive: + src: /tmp/luaunbound-0.5.tar.gz + remote_src: yes + dest: /tmp + +- name: "Install libunbound-dev" + apt: + name: + - libunbound8 + - libunbound-dev + - liblua5.2-dev + state: present + +- name: "Build luaunbound" + make: + chdir: /tmp/luaunbound-0.5 + +- name: "Install luaunbound" + make: + chdir: /tmp/luaunbound-0.5 + target: install + +- name: "Remove luaunbound source" + file: + path: /tmp/luaunbound-0.5 + state: absent + +- name: "Remove libunbound-dev" + apt: + name: + - libunbound-dev + - liblua5.2-dev + state: absent diff --git a/docker/Dockerfile b/docker/Dockerfile index 318eb7b..274227b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -25,7 +25,7 @@ RUN apt-get update \ software-properties-common ca-certificates \ gpg gpg-agent \ ansible python-passlib python3-passlib \ - libcap2-bin \ + libcap2-bin build-essential\ && rm -rf /var/lib/apt/lists/* \ && c_rehash \ && ansible-playbook -c local -i localhost, --extra-vars "ansible_python_interpreter=/usr/bin/python2" /opt/ansible/snikket.yml \ @@ -34,7 +34,7 @@ RUN apt-get update \ software-properties-common \ gpg gpg-agent \ python-passlib python3-passlib \ - mercurial libcap2-bin \ + mercurial libcap2-bin build-essential \ && apt-get autoremove -y \ && rm -rf /var/cache/*