Install todoist-github
This commit is contained in:
parent
4c92e2df3b
commit
81d2be3b74
10
ansible/roles/docker/files/todoist-github/docker-compose.yml
Normal file
10
ansible/roles/docker/files/todoist-github/docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
todoist-github:
|
||||||
|
image: theorangeone/todoist-github:latest
|
||||||
|
container_name: todoist-github
|
||||||
|
restart: unless-stopped
|
||||||
|
command: python3 -m todoist_github --interval 900
|
||||||
|
environment:
|
||||||
|
- TODOIST_TOKEN={{ todoist_github.todoist_token }}
|
||||||
|
- GITHUB_TOKEN={{ todoist_github.github_token }}
|
@ -54,3 +54,6 @@
|
|||||||
|
|
||||||
- name: Install nextcloud
|
- name: Install nextcloud
|
||||||
include: nextcloud.yml
|
include: nextcloud.yml
|
||||||
|
|
||||||
|
- name: Install todoist-github
|
||||||
|
include: todoist-github.yml
|
||||||
|
34
ansible/roles/docker/tasks/todoist-github.yml
Normal file
34
ansible/roles/docker/tasks/todoist-github.yml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
- name: Include todoist-github variables
|
||||||
|
include_vars: todoist-github.yml
|
||||||
|
|
||||||
|
- name: Create todoist-github directory
|
||||||
|
file:
|
||||||
|
path: '/opt/todoist-github'
|
||||||
|
state: directory
|
||||||
|
owner: "{{ docker_user.name }}"
|
||||||
|
mode: "{{ docker_compose_directory_mask }}"
|
||||||
|
become: true
|
||||||
|
become_user: root
|
||||||
|
|
||||||
|
- name: Install todoist-github compose file
|
||||||
|
template:
|
||||||
|
src: files/todoist-github/docker-compose.yml
|
||||||
|
dest: "/opt/todoist-github/docker-compose.yml"
|
||||||
|
mode: "{{ docker_compose_file_mask }}"
|
||||||
|
owner: "{{ docker_user.name }}"
|
||||||
|
validate: /usr/bin/docker-compose -f %s config
|
||||||
|
register: compose_file
|
||||||
|
become: true
|
||||||
|
become_user: root
|
||||||
|
|
||||||
|
- name: Cycle todoist-github container
|
||||||
|
docker_compose:
|
||||||
|
project_src: /opt/todoist-github
|
||||||
|
pull: true
|
||||||
|
remove_orphans: true
|
||||||
|
remove_volumes: true
|
||||||
|
state: "{{ item }}"
|
||||||
|
when: compose_file.changed
|
||||||
|
loop:
|
||||||
|
- absent
|
||||||
|
- present
|
17
ansible/roles/docker/vars/todoist-github.yml
Normal file
17
ansible/roles/docker/vars/todoist-github.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
todoist_github:
|
||||||
|
github_token: !vault |
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
38636136313732653936343433346331623531306562663731306365346165323331343266303064
|
||||||
|
6565356165333030666130366134383539663631613261350a666537653430356633383339313434
|
||||||
|
37663032333362623035393665633663663065373032616131326239646465616666313838333536
|
||||||
|
3166353065613232630a666539396136306534646164346634373335666164396630646261626261
|
||||||
|
65323163633661326631623363346239373332343037613765313063623338306563616566336136
|
||||||
|
6632616363306462376161323437383137623738366332393033
|
||||||
|
todoist_token: !vault |
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
39373238353963623932643335303864346431346162656464663631656631343335316535396333
|
||||||
|
6462303133643333633930333337666435326461656337370a386130636661656633643666396432
|
||||||
|
32336631393738323633353233333837346634353439363962623832323635633230613830326161
|
||||||
|
3133623634376336640a303733613164306665333638386635353466386638643131343264656138
|
||||||
|
38373236343136323138626436383035616262626434313334353364653563303361326530346565
|
||||||
|
6533313763383333353664303836626332636234336537356635
|
Loading…
x
Reference in New Issue
Block a user