Skip to content

Commit c613b55

Browse files
committed
playbooks: allow specifying custom container root
Signed-off-by: Paolo Bonzini <[email protected]>
1 parent ef440e6 commit c613b55

File tree

5 files changed

+25
-5
lines changed

5 files changed

+25
-5
lines changed

scripts/playbooks/deploy-appliers.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
prompt: "The instance name"
55
default: patchew-applier
66
private: no
7+
- name: container_dir
8+
prompt: "The base directory for the container"
9+
default: /data
10+
private: no
711
- name: "patchew_server"
812
prompt: "The address of patchew server"
913
default: "https://patchew.org"
@@ -23,7 +27,7 @@
2327
default: ""
2428
private: no
2529
vars:
26-
base_dir: "/data/{{ instance_name }}"
30+
base_dir: "{{ container_dir }}/{{ instance_name }}"
2731
src_dir: "{{ base_dir }}/src"
2832
data_dir: "{{ base_dir }}/data"
2933
config_file: "{{ data_dir }}/config"

scripts/playbooks/deploy-db.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
prompt: "Instance name of the patchew postgres db"
55
default: patchew-server-db
66
private: no
7+
- name: container_dir
8+
prompt: "The base directory for the container"
9+
default: /data
10+
private: no
711
vars:
8-
base_dir: "/data/{{ instance_name }}"
12+
base_dir: "{{ container_dir }}/{{ instance_name }}"
913
src_dir: "{{ base_dir }}/src"
1014
data_dir: "{{ base_dir }}/data"
1115
tasks:

scripts/playbooks/deploy-importers-lore.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
prompt: "The instance name"
55
default: patchew-importer-lore
66
private: no
7+
- name: container_dir
8+
prompt: "The base directory for the container"
9+
default: /data
10+
private: no
711
- name: "patchew_server"
812
prompt: "The address of patchew server"
913
default: "https://patchew.org"
@@ -20,7 +24,7 @@
2024
default: "https://lore.kernel.org/lkml/"
2125
private: no
2226
vars:
23-
base_dir: "/data/{{ instance_name }}"
27+
base_dir: "{{ container_dir }}/{{ instance_name }}"
2428
src_dir: "{{ base_dir }}/src"
2529
data_dir: "{{ base_dir }}/data"
2630
config_file: "{{ data_dir }}/config"

scripts/playbooks/deploy-importers.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
prompt: "The instance name"
55
default: patchew-importer
66
private: no
7+
- name: container_dir
8+
prompt: "The base directory for the container"
9+
default: /data
10+
private: no
711
- name: "patchew_server"
812
prompt: "The address of patchew server"
913
default: "https://patchew.org"
@@ -41,7 +45,7 @@
4145
default: "y"
4246
private: no
4347
vars:
44-
base_dir: "/data/{{ instance_name }}"
48+
base_dir: "{{ container_dir }}/{{ instance_name }}"
4549
src_dir: "{{ base_dir }}/src"
4650
data_dir: "{{ base_dir }}/data"
4751
config_file: "{{ data_dir }}/config"

scripts/playbooks/deploy-servers.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
prompt: "Instance name of the webserver"
55
default: patchew-server
66
private: no
7+
- name: container_dir
8+
prompt: "The base directory for the container"
9+
default: /data
10+
private: no
711
- name: db_host
812
prompt: "Host for PostgreSQL database (empty = SQLite)"
913
default: ""
@@ -17,7 +21,7 @@
1721
default: "adminpass"
1822
private: yes
1923
vars:
20-
base_dir: "/data/{{ instance_name }}"
24+
base_dir: "{{ container_dir }}/{{ instance_name }}"
2125
src_dir: "{{ base_dir }}/src"
2226
data_dir: "{{ base_dir }}/data"
2327
db_arg: "{{ '-e PATCHEW_DB_PORT_5432_TCP_ADDR=' if db_host != '' else '' }}{{ db_host }}"

0 commit comments

Comments
 (0)