-
Notifications
You must be signed in to change notification settings - Fork 24
/
leap.15.0.cfg.j2
203 lines (198 loc) · 6.52 KB
/
leap.15.0.cfg.j2
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<?xml version="1.0"?>
<!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd">
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<bootloader>
<global>
<append> ipv6.disable=1 net.ifnames=0 biosdevname=0 splash=silent quiet showopts</append>
<append_failsafe>showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe</append_failsafe>
<cryptodisk config:type="integer">0</cryptodisk>
<default>openSUSE</default>
<distributor>openSUSE</distributor>
<gfxbackground>/boot/grub2/themes/openSUSE/background.png</gfxbackground>
<gfxmode>auto</gfxmode>
<gfxtheme>/boot/grub2/themes/openSUSE/theme.txt</gfxtheme>
<hiddenmenu>false</hiddenmenu>
<os_prober>true</os_prober>
<suse_btrfs>true</suse_btrfs>
<terminal>gfxterm</terminal>
<timeout config:type="integer">8</timeout>
<vgamode>791</vgamode>
</global>
<loader_type>grub2</loader_type>
</bootloader>
<general>
<mode>
<confirm config:type="boolean">false</confirm>
</mode>
<signature-handling>
<accept_unsigned_file config:type="boolean">true</accept_unsigned_file>
<accept_file_without_checksum config:type="boolean">true</accept_file_without_checksum>
<accept_verification_failed config:type="boolean">true</accept_verification_failed>
<accept_unknown_gpg_key config:type="boolean">true</accept_unknown_gpg_key>
</signature-handling>
</general>
<timezone>
<hwclock>UTC</hwclock>
<timezone>Europe/Moscow</timezone>
</timezone>
<networking>
<dns>
<dhcp_hostname config:type="boolean">false</dhcp_hostname>
<hostname>{{ item }}</hostname>
<domain>{{ hostvars[item]['domain'] }}</domain>
{% if hostvars[item]['ip'] is defined %}
<dhcp_resolv config:type="boolean">false</dhcp_resolv>
<nameservers config:type="list">
{% for item in hostvars[item]['nameservers'] %}
<nameserver>{{ item }}</nameserver>
{% endfor %}
</nameservers>
<searchlist config:type="list">
<search>{{ hostvars[item]['domain'] }}</search>
</searchlist>
{% else %}
<dhcp_resolv config:type="boolean">true</dhcp_resolv>
{% endif %}
</dns>
<interfaces config:type="list">
<interface>
<name>Ethernet Network Card</name>
<device>{{ hostvars[item]['netdev'] | default('eth0') }}</device>
<startmode>onboot</startmode>
<usercontrol>no</usercontrol>
{% if hostvars[item]['ip'] is defined %}
<bootproto>static</bootproto>
<ipaddr>{{ hostvars[item]['ip'] }}</ipaddr>
<netmask>{{ hostvars[item]['netmask'] }}</netmask>
{% else %}
<bootproto>dhcp</bootproto>
{% endif %}
<network/>
</interface>
</interfaces>
<modules config:type="list">
<module_entry>
<device>static-0</device>
<module></module>
<options></options>
</module_entry>
</modules>
<routing>
<ip_forward config:type="boolean">false</ip_forward>
{% if hostvars[item]['ip'] is defined %}
<routes config:type="list">
<route>
<destination>default</destination>
<device>-</device>
<gateway>{{ hostvars[item]['gateway'] }}</gateway>
<netmask>-</netmask>
</route>
</routes>
{% endif %}
</routing>
</networking>
<software>
<patterns config:type="list">
<pattern>base</pattern>
</patterns>
<packages config:type="list">
<package>ntp</package>
<package>net-snmp</package>
<package>openssh</package>
<package>screen</package>
<package>sudo</package>
<package>vim</package>
<package>zypper</package>
</packages>
</software>
<users config:type="list">
<user>
<encrypted config:type="boolean">true</encrypted>
<user_password>{{ hostvars[item]['rootpw'] | default('$1$Jxif9H1Q$c5oIEvRdtkSDJs8ZBcRZ3/') }}</user_password>
<username>root</username>
</user>
</users>
<partitioning config:type="list">
<drive>
<device>/dev/sda</device>
<use>free</use>
<initialize config:type="boolean">true</initialize>
<partitions config:type="list">
<partition>
<mount>swap</mount>
<size>1G</size>
</partition>
<partition>
<filesystem config:type="symbol">ext4</filesystem>
<mount>/</mount>
<size>auto</size>
</partition>
</partitions>
</drive>
</partitioning>
<services-manager>
<default_target>multi-user</default_target>
<services>
<disable config:type="list"/>
<enable config:type="list">
<service>cron</service>
<service>dm-event</service>
<service>getty@tty1</service>
<service>haveged</service>
<service>lvm2-lvmetad</service>
<service>nscd</service>
<service>ntpd</service>
<service>snmpd</service>
<service>sshd</service>
<service>purge-kernels</service>
<service>systemd-readahead-collect</service>
<service>systemd-readahead-replay</service>
<service>YaST2-Firstboot</service>
<service>YaST2-Second-Stage</service>
</enable>
</services>
</services-manager>
<ntp-client>
</ntp-client>
<scripts>
<post-scripts config:type="list">
<script>
<filename>post.sh</filename>
<interpreter>shell</interpreter>
<source><![CDATA[
#!/bin/sh
### create snmp config
cat << EOF >/etc/snmp/snmpd.conf
com2sec notConfigUser default public
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
access notConfigGroup "" any noauth exact systemview none none
view systemview included .1
master agentx
agentxperms 770 770 daemon daemon
dontLogTCPWrappersConnects 1
interface lo 24 1000000000
EOF
### configure authorized keys
install --mode=700 -d /root/.ssh
install --mode=700 /dev/null /root/.ssh/authorized_keys
{% if hostvars[item]['root_authorized_keys'] is defined %}
cat << 'EOF' >> /root/.ssh/authorized_keys
{{ hostvars[item]['root_authorized_keys'] }}
EOF
{% endif %}
{% if root_authorized_keys is defined %}
cat << 'EOF' >> /root/.ssh/authorized_keys
{{ root_authorized_keys }}
EOF
{% endif %}
echo 'PermitRootLogin without-password' >> /etc/ssh/sshd_config
echo 'ChallengeResponseAuthentication no' >> /etc/ssh/sshd_config
chown -R 600 /etc/ssh
service sshd reload
]]>
</source>
</script>
</post-scripts>
</scripts>
</profile>