From 83b78a5c6f1ef319f75684283e55a02da66c10bd Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Tue, 16 Feb 2016 17:32:51 +0100 Subject: [PATCH] Checking for python-argparse before installing it from URL. --- roles/setup/tasks/ansible.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/setup/tasks/ansible.yml b/roles/setup/tasks/ansible.yml index fb6f97c..779d6cb 100644 --- a/roles/setup/tasks/ansible.yml +++ b/roles/setup/tasks/ansible.yml @@ -10,11 +10,20 @@ become: yes tags: ansible +- name: Checking for python-argparse + shell: rpm -q python-argparse + become: yes + register: check_argparse + ignore_errors: yes + changed_when: "check_argparse.rc == 1" + tags: ansible + - name: Installazione python-argparse yum: name: "ftp://fr2.rpmfind.net/linux/centos/6.7/extras/i386/Packages/python-argparse-1.2.1-2.el6.centos.noarch.rpm" state: present become: yes + when: check_argparse|changed tags: ansible #- name: Download della gestione client con ansible