blob: 088da0f6e1435d3191127d2e983e4feb03f8a94c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
- name: login to docker hub
community.docker.docker_login:
username: "{{ lookup('aws_ssm', '/jinwei-me/docker/username') }}"
password: "{{ lookup('aws_ssm', '/jinwei-me/docker/token') }}"
- name: pull ledger Docker image
community.docker.docker_image:
name: "{{ bean_image }}:{{ bean_image_tag }}"
source: pull
- name: Create directory
file:
path: "{{ bean_home }}"
state: directory
mode: '0755'
- name: render config file
template:
src: docker-compose.yaml.j2
dest: "{{ bean_home }}/docker-compose.yaml"
mode: 0644
- name: setup cronjob for upgrade
cron:
cron_file: ledger_upgrade
user: root
state: present
name: "ledger upgrade"
minute: "0"
hour: "*"
day: "*"
job: "cd {{ bean_home }} && /usr/local/bin/docker-compose pull && /usr/local/bin/docker-compose up -d --force-recreate"
|