Put tasks in the right order

This commit is contained in:
Maxim Kravets 2018-07-05 10:53:11 +02:00
parent c7d03127cc
commit f12eb3e953

View File

@ -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"