From 7a693c096093a6bd5fee6bba23b6fa1aed548cc5 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 29 Jul 2017 13:22:30 +0200 Subject: [PATCH] Using ppa instead of Ubuntu provided package --- tasks/install-with-package-ubuntu.yml | 3 +++ tasks/install-with-package.yml | 8 ++++++++ vars/Ubuntu-16.04.yml | 1 - 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 tasks/install-with-package-ubuntu.yml delete mode 100644 vars/Ubuntu-16.04.yml diff --git a/tasks/install-with-package-ubuntu.yml b/tasks/install-with-package-ubuntu.yml new file mode 100644 index 0000000..262e17d --- /dev/null +++ b/tasks/install-with-package-ubuntu.yml @@ -0,0 +1,3 @@ +--- +- name: Add Certbot-repository + apt_repository: repo='ppa:certbot/certbot' state=present \ No newline at end of file diff --git a/tasks/install-with-package.yml b/tasks/install-with-package.yml index 10490ff..5fa61d8 100644 --- a/tasks/install-with-package.yml +++ b/tasks/install-with-package.yml @@ -1,4 +1,12 @@ --- +- name: Load a tasks file based on the OS type. + include: "{{ item }}" + with_first_found: + - "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml" + - "{{ ansible_distribution }}.yml" + - "{{ ansible_os_family }}.yml" + ignore_errors: true + - name: Install Certbot. package: "name={{ certbot_package }} state=present" diff --git a/vars/Ubuntu-16.04.yml b/vars/Ubuntu-16.04.yml deleted file mode 100644 index 90e9138..0000000 --- a/vars/Ubuntu-16.04.yml +++ /dev/null @@ -1 +0,0 @@ -certbot_package: letsencrypt