From f12eb3e953dc80851b78fd8c24625654847258fc Mon Sep 17 00:00:00 2001 From: Maxim Kravets Date: Thu, 5 Jul 2018 10:53:11 +0200 Subject: [PATCH] Put tasks in the right order --- tasks/mms-agent.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tasks/mms-agent.yml b/tasks/mms-agent.yml index 0da4d02a..901af58d 100644 --- a/tasks/mms-agent.yml +++ b/tasks/mms-agent.yml @@ -5,16 +5,16 @@ register: mongodb_mms_agent_loaded when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' +- name: Install MMS agent (Debian) + apt: + deb: "{{mongodb_storage_dbpath}}/mms-agent.deb" + when: mongodb_mms_agent_loaded.changed #and (ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu') + - name: Download MMS Agent (RHEL) get_url: url={{mongodb_mms_agent_pkg}} dest={{mongodb_storage_dbpath}}/mms-agent.rpm register: mongodb_mms_agent_loaded when: ansible_distribution == 'CentOS' or ansible_distribution == 'RedHat' -- name: Install MMS agent (Debian) - apt: - deb: "{{mongodb_storage_dbpath}}/mms-agent.deb" - when: mongodb_mms_agent_loaded.changed and (ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu') - - name: Install MMS agent (RHEL) yum: name: "{{mongodb_storage_dbpath}}/mms-agent.rpm"