Simplify the task to install cronjob
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
This commit is contained in:
parent
fb63dfdce1
commit
cd161cae68
1 changed files with 5 additions and 4 deletions
|
@ -19,11 +19,12 @@
|
||||||
|
|
||||||
- name: Install the meta-data fetch cron job
|
- name: Install the meta-data fetch cron job
|
||||||
when: inventory_hostname.startswith(('mdapi01'))
|
when: inventory_hostname.startswith(('mdapi01'))
|
||||||
template: src={{ item.file }}
|
template:
|
||||||
dest={{ item.location }}/{{ item.file }}
|
src: "{{ item | basename }}"
|
||||||
|
dest: "{{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { file: 'mdapi.cron', location: /etc/cron.d }
|
- /etc/cron.d/mdapi.cron
|
||||||
- { file: 'mdapi.cfg', location: /etc/mdapi }
|
- /etc/mdapi/mdapi.cfg
|
||||||
tags:
|
tags:
|
||||||
- mdapi
|
- mdapi
|
||||||
- config
|
- config
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue