You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
594 B
YAML
20 lines
594 B
YAML
- name: set service name base
|
|
set_fact:
|
|
touch_file_service_name_base: "touch-file-{{ file|replace('/', '-') }}"
|
|
|
|
- name: create touch-file.service
|
|
template:
|
|
src=touch-file.service.j2
|
|
dest=/etc/systemd/system/{{ touch_file_service_name_base }}.service
|
|
notify: systemd-daemon-reload
|
|
|
|
- name: create touch-file.timer
|
|
template:
|
|
src=touch-file.timer.j2
|
|
dest=/etc/systemd/system/{{ touch_file_service_name_base }}.timer
|
|
notify: systemd-daemon-reload
|
|
|
|
- name: enable touch-file.timer
|
|
service:
|
|
name={{ touch_file_service_name_base }}.timer state=started enabled=yes
|