This repository was archived by the owner on Dec 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdrupal-template.yml
More file actions
102 lines (85 loc) · 2.68 KB
/
drupal-template.yml
File metadata and controls
102 lines (85 loc) · 2.68 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
- hosts: all
become: false
any_errors_fatal: true
gather_facts: false
vars:
drupal_deployment_home: "deployments/{{ drupal7_stack_name }}"
tasks:
- name: Determine cluster_pkg_folder
set_fact:
cluster_pkg_folder: "{{ inventory_dir | replace(playbook_dir + '/deployments/', '') }}"
when: cluster_pkg_folder is undefined
run_once: true
- debug: var=cluster_pkg_folder
run_once: true
- name: Determine service port
set_fact:
drupal_service_port: 80
when: drupal_service_port is undefined
run_once: true
- debug: var=drupal_service_port
run_once: true
- set_fact: drupal_deployment_home="deployments/{{ cluster_pkg_folder }}"
- name: Ensure the deployment folder exists
local_action:
module: shell
_raw_params: "if [ ! -d {{ drupal_deployment_home }} ]; then mkdir {{ drupal_deployment_home }}; fi"
become: false
run_once: true
ignore_errors: true
- name: Purge existing yaml
local_action:
module: shell
_raw_params: "cd {{ drupal_deployment_home }} && rm *.yml"
become: false
run_once: true
ignore_errors: true
- name: Generate the Drupal manifest
local_action:
module: template
src: templates/drupal.j2
dest: "{{ drupal_deployment_home }}/drupal.yml"
mode: 0755
run_once: true
become: false
- name: Generate the CoreOS Tectonic Ingress manifest
local_action:
module: template
src: templates/drupal-tectonic-ingress.j2
dest: "{{ drupal_deployment_home }}/drupal-tectonic-ingress.yml"
mode: 0755
run_once: true
become: false
when: drupal_nodeport is defined
- name: Generate the PKS LB manifest
local_action:
module: template
src: templates/drupal-pks-lb.j2
dest: "{{ drupal_deployment_home }}/drupal-pks-lb.yml"
mode: 0755
run_once: true
become: false
when: drupal_nodeport is undefined
- name: Ensure the deployment folder exists
local_action:
module: shell
_raw_params: "if [ ! -d {{ drupal_deployment_home }}/loadtests ]; then mkdir {{ drupal_deployment_home }}/loadtests; fi"
become: false
run_once: true
ignore_errors: true
- name: Generate the medium load tests
local_action:
module: template
src: templates/tests/drupal-load-test-med.j2
dest: "{{ drupal_deployment_home }}/loadtests/med_load.yml"
mode: 0755
run_once: true
become: false
- name: Generate the heavy load tests
local_action:
module: template
src: templates/tests/drupal-load-test-heavy.j2
dest: "{{ drupal_deployment_home }}/loadtests/heavy_load.yml"
mode: 0755
run_once: true
become: false