mirror of
https://github.com/famedly/ansible-collection-matrix
synced 2024-12-12 12:22:26 +00:00
chore(timetracking_bot): fix lints
This commit is contained in:
parent
5b2d02b802
commit
a6af40ef94
7 changed files with 28 additions and 19 deletions
|
@ -1,7 +0,0 @@
|
|||
---
|
||||
# handlers file for timetracking-bot
|
||||
- name: restart timetracking-bot
|
||||
docker_container:
|
||||
name: "timetracking-bot"
|
||||
state: started
|
||||
restart: yes
|
|
@ -14,7 +14,12 @@ timetracking_bot_pg_db: "matrix-timetracking"
|
|||
timetracking_bot_version: "0.4.4"
|
||||
timetracking_bot_container_image_tag: ~
|
||||
timetracking_bot_container_image: "registry.gitlab.com/famedly/bots/timetracking"
|
||||
timetracking_bot_container_image_ref: '{{ timetracking_bot_container_image }}:{{ timetracking_bot_container_image_tag | default("v" + timetracking_bot_version, true) }}'
|
||||
timetracking_bot_container_image_ref: >-
|
||||
{{
|
||||
timetracking_bot_container_image
|
||||
~ ':'
|
||||
~ timetracking_bot_container_image_tag | default("v" + timetracking_bot_version, true)
|
||||
}}
|
||||
|
||||
timetracking_bot_docker_ports: []
|
||||
timetracking_bot_docker_env: {}
|
8
roles/timetracking_bot/handlers/main.yml
Normal file
8
roles/timetracking_bot/handlers/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
# handlers file for timetracking-bot
|
||||
- name: Restart timetracking-bot
|
||||
community.docker.docker_container:
|
||||
name: "timetracking-bot"
|
||||
state: started
|
||||
restart: true
|
||||
listen: restart-timetracking-bot
|
|
@ -1,7 +1,9 @@
|
|||
---
|
||||
galaxy_info:
|
||||
author: Jan Christian Grünhage
|
||||
description: deploys a dockerized matrix timetracking bot
|
||||
company: Famedly GmbH
|
||||
min_ansible_version: 2.9
|
||||
license: AGPL-3.0-only
|
||||
min_ansible_version: "6"
|
||||
galaxy_tags: []
|
||||
dependencies: []
|
|
@ -1,16 +1,16 @@
|
|||
---
|
||||
# tasks file for timetracking-bot
|
||||
- name: create timetracking bot user
|
||||
- name: Create timetracking bot user
|
||||
user:
|
||||
name: matrix-timetracking
|
||||
state: present
|
||||
system: yes
|
||||
system: true
|
||||
register: timetracking_bot_user_res
|
||||
|
||||
- name: create application directories
|
||||
- name: Create application directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
mode: 0750
|
||||
mode: "0755"
|
||||
owner: "{{ timetracking_bot_user_res.uid }}"
|
||||
group: "{{ timetracking_bot_user_res.group }}"
|
||||
state: directory
|
||||
|
@ -19,20 +19,21 @@
|
|||
- "{{ timetracking_bot_store_path }}"
|
||||
- "{{ timetracking_bot_session_path }}"
|
||||
|
||||
- name: template config
|
||||
- name: Template config
|
||||
copy:
|
||||
# default required to make linter happy
|
||||
content: |
|
||||
{{ 'Managed by ansible' | comment('plain', prefix='#####', postfix='#####') }}
|
||||
{{ timetracking_bot_config | to_nice_yaml }}
|
||||
{{ timetracking_bot_config | default({}) | to_nice_yaml }}
|
||||
dest: "{{ timetracking_bot_config_path }}"
|
||||
mode: 0640
|
||||
mode: "0640"
|
||||
owner: "{{ timetracking_bot_user_res.uid }}"
|
||||
group: "{{ timetracking_bot_user_res.group }}"
|
||||
notify:
|
||||
- restart timetracking-bot
|
||||
- restart-timetracking-bot
|
||||
|
||||
- name: start container
|
||||
docker_container:
|
||||
- name: Start container
|
||||
community.docker.docker_container:
|
||||
name: "timetracking-bot"
|
||||
image: "{{ timetracking_bot_container_image_ref }}"
|
||||
restart_policy: "unless-stopped"
|
Loading…
Reference in a new issue