ansible-role-renovate/tasks/main.yml

46 lines
1.0 KiB
YAML
Raw Normal View History

2022-04-27 16:55:07 +00:00
---
- name: Create directory to store configuration files
2023-02-08 17:24:39 +00:00
ansible.builtin.file:
2022-04-27 16:55:07 +00:00
path: "{{ renovate_dir }}"
owner: root
group: docker
2023-02-26 21:21:13 +00:00
mode: "0775"
2022-04-27 16:55:07 +00:00
state: directory
2023-02-08 17:24:39 +00:00
recurse: true
2022-04-27 16:55:07 +00:00
- name: Create configuration files
2023-02-08 17:24:39 +00:00
ansible.builtin.template:
2022-04-27 16:55:07 +00:00
src: "{{ item }}.j2"
dest: "{{ renovate_dir }}/{{ item | basename }}"
owner: root
group: docker
2023-02-26 21:21:13 +00:00
mode: "0664"
2022-04-27 16:55:07 +00:00
with_items:
- srv/docker/renovate/docker-compose.yml
- srv/docker/renovate/config.json
- name: Create start and stop scripts
ansible.builtin.template:
src: "{{ item }}.j2"
dest: "/{{ item }}"
owner: root
group: docker
mode: "0770"
with_items:
- usr/local/bin/start-renovate.sh
- usr/local/bin/stop-renovate.sh
2022-04-27 16:55:07 +00:00
- name: Create systemd unit files
2023-02-08 17:24:39 +00:00
ansible.builtin.template:
2022-04-27 16:55:07 +00:00
src: "{{ item }}.j2"
dest: "{{ renovate_systemd_dir }}/{{ item | basename }}"
2023-02-08 17:24:39 +00:00
owner: root
group: root
2023-02-26 21:21:13 +00:00
mode: "0644"
2022-04-27 16:55:07 +00:00
with_items:
- etc/systemd/system/renovate.service
- etc/systemd/system/renovate.timer
notify:
- Enable renovate