-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpayment.yaml
More file actions
60 lines (49 loc) · 1.24 KB
/
payment.yaml
File metadata and controls
60 lines (49 loc) · 1.24 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
- name: conigure payment server
become: yes
hosts: payment
tasks:
- name: install python3 packages
ansible.builtin.dnf:
name: "{{ item }}"
state: installed
loop:
- python3
- gcc
- python3-devel
- name: create app directory
ansible.builtin.file:
path: /app
state: directory
- name: create roboshop system user
ansible.builtin.user:
name: roboshop
shell: /sbin/nologin
system: true
home: /app
- name: download payment code
ansible.builtin.get_url:
url: https://roboshop-artifacts.s3.amazonaws.com/payment-v3.zip
dest: /tmp/payment.zip
- name: extract payment code
ansible.builtin.unarchive:
src: /tmp/payment.zip
dest: /app
remote_src: yes
- name: install dependencies
ansible.builtin.pip:
requirements: requirements.txt
executable: pip3.9
args:
chdir: /app
- name: copy payment service
ansible.builtin.copy:
src: payment.service
dest: /etc/systemd/system/payment.service
- name: daemon reload
ansible.builtin.systemd_service:
daemon_reload: true
- name: enable and start payment
ansible.builtin.service:
name: payment
state: started
enabled: yes