[PATCH] Simplify the task to install cronjob

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Giving directly the file to deploy and doing magic with the variable
permit to have a clearer idea of what is deployed when reading the
task for the first time
---
 roles/mdapi/tasks/main.yml | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/roles/mdapi/tasks/main.yml b/roles/mdapi/tasks/main.yml
index d884654..ac4dacd 100644
--- a/roles/mdapi/tasks/main.yml
+++ b/roles/mdapi/tasks/main.yml
@@ -19,11 +19,12 @@
 
 - name: Install the meta-data fetch cron job
   when: inventory_hostname.startswith(('mdapi01'))
-  template: src={{ item.file }}
-            dest={{ item.location }}/{{ item.file }}
+  template:
+    src: "{{ item | basename }}"
+    dest: "{{ item }}"
   with_items:
-  - { file: 'mdapi.cron', location: /etc/cron.d }
-  - { file: 'mdapi.cfg', location: /etc/mdapi }
+  - /etc/cron.d/mdapi.cron
+  - /etc/mdapi/mdapi.cfg
   tags:
   - mdapi
   - config
-- 
1.8.3.1
_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://lists.fedoraproject.org/admin/lists/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux