File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed
environments/.stackhpc/hooks Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Builder version of site.yml just installing binaries
2
2
3
+ - name : Run pre.yml hook
4
+ vars :
5
+ appliances_environment_root : " {{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}"
6
+ hook_path : " {{ appliances_environment_root }}/hooks/pre.yml"
7
+ import_playbook : " {{ hook_path if hook_path | exists else 'noop.yml' }}"
8
+ when : hook_path | exists
9
+
3
10
- import_playbook : bootstrap.yml
4
11
12
+ - name : Run post-bootstrap.yml hook
13
+ vars :
14
+ appliances_environment_root : " {{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}"
15
+ hook_path : " {{ appliances_environment_root }}/hooks/post-bootstrap.yml"
16
+ import_playbook : " {{ hook_path if hook_path | exists else 'noop.yml' }}"
17
+ when : hook_path | exists
18
+
5
19
- hosts : builder
6
20
become : yes
7
21
gather_facts : no
118
132
119
133
# - import_playbook: iam.yml - nothing to do
120
134
135
+ - name : Run post.yml hook
136
+ vars :
137
+ appliances_environment_root : " {{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}"
138
+ hook_path : " {{ appliances_environment_root }}/hooks/post.yml"
139
+ import_playbook : " {{ hook_path if hook_path | exists else 'noop.yml' }}"
140
+ when : hook_path | exists
141
+
142
+ - hosts : builder
143
+ become : yes
144
+ gather_facts : no
145
+ tasks :
121
146
- name : Cleanup image
122
147
import_tasks : cleanup.yml
123
148
Original file line number Diff line number Diff line change 1
- - hosts : control
1
+ - hosts : control:!builder
2
2
become : yes
3
3
gather_facts : false
4
4
tasks :
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ Building an environment-specific compute node image will[^1] require a cluster t
39
39
- Build images using the variable definition file:
40
40
41
41
cd packer
42
- PACKER_LOG=1 /usr/bin/packer build -except openstack.fatimage --on-error=ask -var-file=$PKR_VAR_environment_root/builder.pkrvars.hcl openstack.pkr.hcl
42
+ PACKER_LOG=1 /usr/bin/packer build -except openstack.openhpc --on-error=ask -var-file=$PKR_VAR_environment_root/builder.pkrvars.hcl openstack.pkr.hcl
43
43
44
44
Note the builder VMs are added to the ` builder ` group to differentiate them from "real" nodes - see developer notes below.
45
45
You can’t perform that action at this time.
0 commit comments