From 17e31604aff9d481710801b8379dc18619a9cc3b Mon Sep 17 00:00:00 2001 From: Tristan PILAT Date: Wed, 4 Jul 2018 11:14:36 +0200 Subject: [PATCH] We need some packages installed beforehand --- uvrrpd/tasks/main.yml | 45 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/uvrrpd/tasks/main.yml b/uvrrpd/tasks/main.yml index d6ace507..f8f1d9d2 100644 --- a/uvrrpd/tasks/main.yml +++ b/uvrrpd/tasks/main.yml @@ -1,6 +1,26 @@ --- -- include_role: - name: remount-usr +- name: Make sure unzip is present + command: 'dpkg -l unzip' + check_mode: no + ignore_errors: yes + register: unzip_is_installed + tags: + - uvrrpd + +- name: Make sure dh-autoreconf is present + command: 'dpkg -l dh-autoreconf' + check_mode: no + ignore_errors: yes + register: autoreconf_is_installed + tags: + - uvrrpd + +- name: Make sure unzip and dh-autoreconf are installed + apt: + name: "{{item}}" + with_items: + - unzip + - dh-autoreconf tags: - uvrrpd @@ -24,9 +44,30 @@ tags: - uvrrpd +- include_role: + name: remount-usr + tags: + - uvrrpd + - name: Make install make: chdir: /root/uvrrpd-master/ target: install tags: - uvrrpd + +- name: Remove unzip if initially not present + apt: + name: unzip + state: absent + when: unzip_is_installed.rc == 0 + tags: + - uvrrpd + +- name: Remove dh-autoreconf if initially not present + apt: + name: dh-autoreconf + state: absent + when: autoreconf_is_installed.rc == 0 + tags: + - uvrrpd