Prechádzať zdrojové kódy

Merge pull request #5 from jaredledvina/feature/install-deb-if-changed

Only install the Uchiwa deb if it changed
Calum MacRae 10 rokov pred
rodič
commit
dc11e67118
1 zmenil súbory, kde vykonal 2 pridanie a 0 odobranie
  1. 2 0
      tasks/Debian/dashboard.yml

+ 2 - 0
tasks/Debian/dashboard.yml

@@ -5,6 +5,7 @@
   - include_vars: "{{ ansible_distribution }}.yml"
   - include_vars: "{{ ansible_distribution }}.yml"
 
 
   - name: Retrieve the Uchiwa deb package
   - name: Retrieve the Uchiwa deb package
+    register: uchiwa_deb
     get_url:
     get_url:
       url: "{{ uchiwa_pkg_download_url }}"
       url: "{{ uchiwa_pkg_download_url }}"
       dest: "{{ uchiwa_pkg_download_path }}"
       dest: "{{ uchiwa_pkg_download_path }}"
@@ -12,6 +13,7 @@
 
 
   - name: Install Uchiwa from the retrieved deb package
   - name: Install Uchiwa from the retrieved deb package
     apt: deb={{ uchiwa_pkg_download_path }} 
     apt: deb={{ uchiwa_pkg_download_path }} 
+    when: uchiwa_deb|changed
 
 
   - name: Deploy Uchiwa config
   - name: Deploy Uchiwa config
     template:
     template: