Преглед изворни кода

Only install the Uchiwa deb if it changed

Jared Ledvina пре 10 година
родитељ
комит
d9df1bd813
1 измењених фајлова са 2 додато и 0 уклоњено
  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: