Add transip client provisioning
This commit is contained in:
parent
b7d5b72345
commit
f052126445
10 changed files with 223 additions and 0 deletions
3
templates/transip_client/env.j2
Normal file
3
templates/transip_client/env.j2
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
SENTRY_DSN="{{ transip_client_sentry_dsn }}"
|
||||
VERSION="{{ transip_client_app_ref }}"
|
||||
ENVIRONMENT="production"
|
||||
10
templates/transip_client/service.j2
Normal file
10
templates/transip_client/service.j2
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# {{ ansible_managed }}
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Transip client service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=sonny
|
||||
ExecStart={{ transip_client_start_script }}
|
||||
10
templates/transip_client/start.j2
Normal file
10
templates/transip_client/start.j2
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
/usr/bin/docker container run \
|
||||
--rm \
|
||||
--volume {{ transip_client_private_key_src_path }}:{{ transip_client_private_key_dest_path }} \
|
||||
--volume {{ transip_client_env_src_path }}:{{ transip_client_env_dest_path }} \
|
||||
{{ transip_client_image_name }} \
|
||||
{{ transip_client_login }} \
|
||||
{{ transip_client_private_key_dest_path }} \
|
||||
{{ transip_client_app_domains|join(' ') }}
|
||||
14
templates/transip_client/timer.j2
Normal file
14
templates/transip_client/timer.j2
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# {{ ansible_managed }}
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Transip client timer
|
||||
|
||||
[Timer]
|
||||
OnBootSec=15min
|
||||
OnUnitActiveSec=35min
|
||||
Unit=transip-client.service
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue