blob: 64838313b95c0b825e6bdc890fed2543f08582fd [file] [log] [blame]
Zack Williams70996442020-10-01 22:09:49 -07001---
2# timesheets tasks/Debian.yml
3#
4# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
5# SPDX-License-Identifier: Apache-2.0
6#
7
8- name: Install Timesheets Prereqs
9 apt:
10 name:
11 - "git"
Zack Williamscb334032020-11-29 22:46:32 -070012 - "ghostscript"
13 - "graphicsmagick"
Zack Williams70996442020-10-01 22:09:49 -070014 state: "present"
15 update_cache: true
16 cache_valid_time: 3600
17
Zack Williamsa771dd72021-05-04 14:28:35 -070018- name: Add Chromium browser (Debian)
19 when: 'ansible_distribution == "Debian"'
20 apt:
21 name:
22 - "chromium"
23 state: "present"
24 update_cache: true
25 cache_valid_time: 3600
26
27- name: Add Chromium browser (Ubuntu)
28 when: 'ansible_distribution == "Ubuntu"'
29 apt:
30 name:
31 - "chromium-browser"
32 state: "present"
33 update_cache: true
34 cache_valid_time: 3600
35
Zack Williams952bc002020-10-04 09:45:59 -070036- name: Create environment config for timesheetsdb service
37 template:
38 src: "default.timesheetsdb.j2"
39 dest: "/etc/default/timesheetsdb"
40 owner: "root"
41 group: "root"
42 mode: "0640"
43 notify:
44 - restart-timesheetsdb
Zack Williams70996442020-10-01 22:09:49 -070045
46- name: Create systemd service unit files for timesheetsdb service
47 template:
48 src: "{{ item }}.j2"
49 dest: "/etc/systemd/system/{{ item }}"
50 owner: "root"
51 group: "root"
52 mode: "0644"
53 with_items:
54 - "timesheetsdb.service"
Zack Williams952bc002020-10-04 09:45:59 -070055 notify:
56 - start-timesheetsdb
57 - restart-timesheetsdb