File tree Expand file tree Collapse file tree 7 files changed +27
-12
lines changed Expand file tree Collapse file tree 7 files changed +27
-12
lines changed Original file line number Diff line number Diff line change 8
8
prompt : " The base directory for the container"
9
9
default : /data
10
10
private : no
11
+ - name : " podman_network"
12
+ prompt : " The podman network to use for the container (empty = none)"
13
+ default : " "
14
+ private : no
11
15
- name : " patchew_server"
12
16
prompt : " The address of patchew server"
13
17
default : " https://patchew.org"
Original file line number Diff line number Diff line change 8
8
prompt : " The base directory for the container"
9
9
default : /data
10
10
private : no
11
+ - name : " podman_network"
12
+ prompt : " The podman network to use for the container (empty = none)"
13
+ default : " "
14
+ private : no
11
15
vars :
12
16
base_dir : " {{ container_dir }}/{{ instance_name }}"
13
17
src_dir : " {{ base_dir }}/src"
14
18
data_dir : " {{ base_dir }}/data"
15
- podman_run_args : " --net patchew"
16
19
tasks :
17
20
- name : Create data dir
18
21
file :
19
22
path : " {{ data_dir }}"
20
23
state : directory
21
- - name : Create podman network
22
- containers.podman.podman_network :
23
- name : patchew
24
- become : true
25
24
- import_tasks : tasks/podman-deploy.yml
26
25
vars :
27
26
instance_role : db
Original file line number Diff line number Diff line change 8
8
prompt : " The base directory for the container"
9
9
default : /data
10
10
private : no
11
+ - name : " podman_network"
12
+ prompt : " The podman network to use for the container (empty = none)"
13
+ default : " "
14
+ private : no
11
15
- name : " patchew_server"
12
16
prompt : " The address of patchew server"
13
17
default : " https://patchew.org"
Original file line number Diff line number Diff line change 8
8
prompt : " The base directory for the container"
9
9
default : /data
10
10
private : no
11
+ - name : " podman_network"
12
+ prompt : " The podman network to use for the container (empty = none)"
13
+ default : " "
14
+ private : no
11
15
- name : " patchew_server"
12
16
prompt : " The address of patchew server"
13
17
default : " https://patchew.org"
Original file line number Diff line number Diff line change 8
8
prompt : " The base directory for the container"
9
9
default : /data
10
10
private : no
11
+ - name : " podman_network"
12
+ prompt : " The podman network to use for the container (empty = none)"
13
+ default : " "
14
+ private : no
11
15
- name : db_host
12
16
prompt : " Host for PostgreSQL database (empty = SQLite)"
13
17
default : " "
24
28
base_dir : " {{ container_dir }}/{{ instance_name }}"
25
29
src_dir : " {{ base_dir }}/src"
26
30
data_dir : " {{ base_dir }}/data"
27
- db_arg : " {{ '-e PATCHEW_DB_PORT_5432_TCP_ADDR=' if db_host != '' else '' }}{{ db_host }}"
28
- podman_run_args : " --net patchew {{db_arg}}"
31
+ podman_run_args : " {{ '-e PATCHEW_DB_PORT_5432_TCP_ADDR=' if db_host != '' else '' }}{{ db_host }}"
29
32
tasks :
30
33
- name : Create data dir
31
34
file :
44
47
command : " restorecon -v {{ data_dir }}/nginx.sock"
45
48
become : true
46
49
when : nginx_sock.stat.exists
47
- - name : Create podman network
48
- containers.podman.podman_network :
49
- name : patchew
50
- become : true
51
50
- import_tasks : tasks/podman-deploy.yml
52
51
vars :
53
52
instance_role : server
Original file line number Diff line number Diff line change 21
21
file :
22
22
path : " {{ data_dir }}"
23
23
state : directory
24
+ - name : Create podman network
25
+ containers.podman.podman_network :
26
+ name : " {{ podman_network }}"
27
+ become : true
28
+ when : podman_network != ""
24
29
- name : Copy source
25
30
synchronize :
26
31
src : ../../../
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ ExecStartPre=-podman stop {{ instance_name }} ; -podman rm {{ instance_name }}
10
10
ExecStart=podman run --privileged --name {{ instance_name }} \
11
11
-v {{ data_dir }}:/data/patchew:rw \
12
12
-e PATCHEW_DATA_DIR=/data/patchew \
13
- {{ podman_run_args | default() }} \
13
+ {{ " --net " if podman_network else "" }}{{ podman_network }} {{ podman_run_args | default() }} \
14
14
patchew:{{ instance_name }}
15
15
ExecStop=podman stop -t 10 {{ instance_name }}
16
16
RestartSec=60
You can’t perform that action at this time.
0 commit comments