53 lines
1.0 KiB
YAML
53 lines
1.0 KiB
YAML
---
|
|
|
|
- name: Ensure di-mtinfo-api is present
|
|
apt:
|
|
name: "{{ item }}"
|
|
state: latest
|
|
update_cache: yes
|
|
cache_valid_time: 3600
|
|
with_items:
|
|
- "di-mtinfo-api"
|
|
notify:
|
|
- restart di-mtinfo-api
|
|
|
|
- name: Restrict /etc/di directory
|
|
file:
|
|
path: "/etc/di"
|
|
owner: "root"
|
|
group: "di-config"
|
|
mode: "0750"
|
|
state: directory
|
|
|
|
- name: Template di-mtinfo-api config
|
|
template:
|
|
src: "mtinfo-api.yml.j2"
|
|
dest: "/etc/di/mtinfo-api.yml"
|
|
owner: "di"
|
|
group: "di-config"
|
|
mode: "0640"
|
|
notify:
|
|
- restart di-mtinfo-api
|
|
|
|
- name: Change database permissions for the mtinfo-api to allow regular users to manipulate it
|
|
file:
|
|
path: /var/lib/di/mtinfo-api.db
|
|
owner: di
|
|
group: di
|
|
mode: 0666
|
|
state: file
|
|
|
|
- name: Change database permissions for the mtinfo-api to allow regular users to manipulate it
|
|
file:
|
|
path: /var/lib/di
|
|
owner: di
|
|
group: di
|
|
mode: 0777
|
|
state: directory
|
|
|
|
- name: enable di-mtinfo-api
|
|
service:
|
|
name: "di-mtinfo-api"
|
|
enabled: yes
|
|
state: started
|