-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinstallui-os-provision.yml
63 lines (56 loc) · 2.03 KB
/
installui-os-provision.yml
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
#
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
##############################################################################
#
# This playbook deploys the OS to the specified nodes for the DayZero OS
# install page
#
# Options:
# -e failed_nodes=<comma-separated list of hosts>
# removes systems from cobbler
#
# -e nodelist=<comma-separated list of hosts>
# provisions systems with an OS
#
##############################################################################
---
- include: pbstart.yml
vars:
playbook_name: "installui-os-provision.yml"
- hosts: localhost
tasks:
- name: install-os | ready | Get failed node list
set_fact: nodes="{{ failed_nodes | split(',') }}"
when: failed_nodes is defined
- name: install-os | ready | Remove failed nodes
become: yes
command: cobbler system remove --name="{{item}}"
ignore_errors: yes
with_items: nodes
when: nodes is defined
- include: bm-power-status.yml
# cobbler-deploy has the potential to remove user customizations to
# kickstart/autoyast files. This will also wipe the grub.cfg files.
# TODO: Optimize cobbler-deploy to not remove customer customizations
- include: cobbler-deploy.yml
# Handle cases where SLES is being provisioned onto boxes with UEFI
# boot mode enabled. This adds the necessary grub.cfg files and should
# work with both UEFI and non-UEFI
- include: prepare-sles-grub2.yml
- include: bm-reimage.yml
- include: pbfinish.yml
vars:
playbook_name: "installui-os-provision.yml"