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 88 prompt : " The base directory for the container"
99 default : /data
1010 private : no
11+ - name : " podman_network"
12+ prompt : " The podman network to use for the container (empty = none)"
13+ default : " "
14+ private : no
1115 - name : " patchew_server"
1216 prompt : " The address of patchew server"
1317 default : " https://patchew.org"
Original file line number Diff line number Diff line change 88 prompt : " The base directory for the container"
99 default : /data
1010 private : no
11+ - name : " podman_network"
12+ prompt : " The podman network to use for the container (empty = none)"
13+ default : " "
14+ private : no
1115 vars :
1216 base_dir : " {{ container_dir }}/{{ instance_name }}"
1317 src_dir : " {{ base_dir }}/src"
1418 data_dir : " {{ base_dir }}/data"
15- podman_run_args : " --net patchew"
1619 tasks :
1720 - name : Create data dir
1821 file :
1922 path : " {{ data_dir }}"
2023 state : directory
21- - name : Create podman network
22- containers.podman.podman_network :
23- name : patchew
24- become : true
2524 - import_tasks : tasks/podman-deploy.yml
2625 vars :
2726 instance_role : db
Original file line number Diff line number Diff line change 88 prompt : " The base directory for the container"
99 default : /data
1010 private : no
11+ - name : " podman_network"
12+ prompt : " The podman network to use for the container (empty = none)"
13+ default : " "
14+ private : no
1115 - name : " patchew_server"
1216 prompt : " The address of patchew server"
1317 default : " https://patchew.org"
Original file line number Diff line number Diff line change 88 prompt : " The base directory for the container"
99 default : /data
1010 private : no
11+ - name : " podman_network"
12+ prompt : " The podman network to use for the container (empty = none)"
13+ default : " "
14+ private : no
1115 - name : " patchew_server"
1216 prompt : " The address of patchew server"
1317 default : " https://patchew.org"
Original file line number Diff line number Diff line change 88 prompt : " The base directory for the container"
99 default : /data
1010 private : no
11+ - name : " podman_network"
12+ prompt : " The podman network to use for the container (empty = none)"
13+ default : " "
14+ private : no
1115 - name : db_host
1216 prompt : " Host for PostgreSQL database (empty = SQLite)"
1317 default : " "
2428 base_dir : " {{ container_dir }}/{{ instance_name }}"
2529 src_dir : " {{ base_dir }}/src"
2630 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 }}"
2932 tasks :
3033 - name : Create data dir
3134 file :
4447 command : " restorecon -v {{ data_dir }}/nginx.sock"
4548 become : true
4649 when : nginx_sock.stat.exists
47- - name : Create podman network
48- containers.podman.podman_network :
49- name : patchew
50- become : true
5150 - import_tasks : tasks/podman-deploy.yml
5251 vars :
5352 instance_role : server
Original file line number Diff line number Diff line change 2121 file :
2222 path : " {{ data_dir }}"
2323 state : directory
24+ - name : Create podman network
25+ containers.podman.podman_network :
26+ name : " {{ podman_network }}"
27+ become : true
28+ when : podman_network != ""
2429- name : Copy source
2530 synchronize :
2631 src : ../../../
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ ExecStartPre=-podman stop {{ instance_name }} ; -podman rm {{ instance_name }}
1010ExecStart=podman run --privileged --name {{ instance_name }} \
1111 -v {{ data_dir }}:/data/patchew:rw \
1212 -e PATCHEW_DATA_DIR=/data/patchew \
13- {{ podman_run_args | default() }} \
13+ {{ " --net " if podman_network else "" }}{{ podman_network }} {{ podman_run_args | default() }} \
1414 patchew:{{ instance_name }}
1515ExecStop=podman stop -t 10 {{ instance_name }}
1616RestartSec=60
You can’t perform that action at this time.
0 commit comments