-
Notifications
You must be signed in to change notification settings - Fork 2
/
centos.toml
118 lines (110 loc) · 3.84 KB
/
centos.toml
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
[ structure.centos-base ]
description = 'Base CentOS'
parents = [ 'linux-base' ]
[ structure.centos-base.config_values ]
mirror_server = 'mirror.centos.org'
distro = 'centos'
'>package_list:VCenter' = [ 'open-vm-tools' ]
virtualbox_guest_type = 'RedHat_64'
[ structure.centos-6-base ]
description = 'Base CentOS 6'
parents = [ 'centos-base' ]
[ structure.centos-6-base.config_values ]
distro_version = '6'
installer_pxe = 'centos-6'
vcenter_guest_id = 'centos6_64Guest'
azure_image = { 'publisher' = 'OpenLogic', 'offer' = 'CentOS', 'sku' = '6.10', 'version' = 'latest' }
[ structure.centos-7-base ]
description = 'Base CentOS 7'
parents = [ 'centos-base' ]
[ structure.centos-7-base.config_values ]
memory_size = 2048 # centos 7 requires more minimum memory to install
distro_version = '7'
installer_pxe = 'centos-7'
vcenter_guest_id = 'centos7_64Guest'
azure_image = { 'publisher' = 'OpenLogic', 'offer' = 'CentOS', 'sku' = '7.6', 'version' = 'latest' }
[ pxe.centos-6 ]
boot_script = """echo CentOS 6 Installer
kernel {{ __pxe_location }}/centos-installer/6.vmlinuz ks={{ __pxe_template_location }}
initrd {{ __pxe_location }}/centos-installer/6.initrd
boot
"""
template = """install
url --url=http://{{ mirror_server }}/centos/6/os/x86_64{% if mirror_proxy %} --proxy={{ mirror_proxy }}{% endif %}
lang en_US.UTF-8
keyboard us
network --hostname={{ _fqdn }}
network --nameserver={{ dns_servers.0 }}
network --onboot=yes --device=eth0 --bootproto=static --ip={{ _interface_map.eth0.address_list.0.address }} --netmask={{ _interface_map.eth0.address_list.0.netmask }} --gateway={% if _interface_map.eth0.address_list.0.gateway %}{{ _interface_map.eth0.address_list.0.gateway }}{% else %}0.0.0.0{% endif %}
rootpw --iscrypted {{ root_password_hash }}
firewall --disabled
selinux --permissive
timezone --utc UTC
unsupported_hardware
bootloader --location=mbr
text
skipx
zerombr
clearpart --all --initlabel
autopart
auth --enableshadow
firstboot --disabled
poweroff
%packages --ignoremissing --excludedocs --instLangs=en_US.utf8
@compat-libraries
@core
{{ package_list|join( "\n" ) }}
%end
{% if ( postinstall_script ) or ( postinstall_commands )%}
%post
{% if postinstall_script }
chroot /target sh -c '/usr/bin/curl -o /tmp/postinstall {{ postinstall_script }} && /bin/sh -x /tmp/postinstall'
{% endif %}
{% for cmd in postinstall_commands %}
chroot /target sh -c '{{ cmd }}'
{% endfor %}
%end
{% endif %}
"""
[ pxe.centos-7 ]
boot_script = """echo CentOS 7 Installer
kernel {{ __pxe_location }}/centos-installer/7.vmlinuz inst.ks={{ __pxe_template_location }}
initrd {{ __pxe_location }}/centos-installer/7.initrd
boot
"""
template = """install
url --url=http://{{ mirror_server }}/centos/7/os/x86_64{% if mirror_proxy %} --proxy={{ mirror_proxy }}{% endif %}
lang en_US.UTF-8
keyboard us
network --hostname={{ _fqdn }}
network --bootproto=static --device=enp0s3 --onboot=on --ip={{ _interface_map.eth0.address_list.0.address }} --netmask={{ _interface_map.eth0.address_list.0.netmask }}{% if _interface_map.eth0.address_list.0.gateway %} --gateway={{ _interface_map.eth0.address_list.0.gateway }}{% endif %} --nameserver={{ dns_servers.0 }}
rootpw --iscrypted {{ root_password_hash }}
firewall --disabled
selinux --permissive
timezone --utc UTC --ntpservers={{ ntp_servers.0 }}
unsupported_hardware
bootloader --location=mbr
text
skipx
zerombr
clearpart --all --initlabel
autopart
auth --enableshadow
firstboot --disabled
poweroff
%packages --ignoremissing --excludedocs --instLangs=en_US.utf8
@compat-libraries
@core
{{ package_list|join( "\n" ) }}
%end
{% if ( postinstall_script ) or ( postinstall_commands )%}
%post
{% if postinstall_script }
chroot /target sh -c '/usr/bin/curl -o /tmp/postinstall {{ postinstall_script }} && /bin/sh -x /tmp/postinstall'
{% endif %}
{% for cmd in postinstall_commands %}
chroot /target sh -c '{{ cmd }}'
{% endfor %}
%end
{% endif %}
"""