-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcentos.config
47 lines (39 loc) · 958 Bytes
/
centos.config
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
#cloud-config
chpasswd:
list: |
root:rootroot
centos:centos
expire: false
ssh_pwauth: yes
hostname: loong576
yum_repos:
epel-163:
baseurl: http://mirrors.163.com/centos/$releasever/os/$basearch/
name: Centos-7
enabled: true
resolv_conf:
nameservers: ['218.104.1xx.xxx', '8.8.8.8']
searchdomains:
- localdomain
domain: localdomain
options:
rotate: true
timeout: 1
manage_resolv_conf: true
packages:
- vim
- wget
- httpd
timezone: 'Asia/Shanghai'
runcmd:
- [ sed, -i, "s/^ *SELINUX=enforcing/SELINUX=disabled/g", /etc/selinux/config ]
- [ mkdir, /dropme ]
- [ touch, /root/abc.txt ]
- [ sed, -i, "s/^ *nameserver.*/nameserver 218.104.1xx.1xx/g", /etc/resolv.conf ]
- [ rpm, --import, /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 ]
power_state:
delay: now
mode: reboot
message: reboot now
timeout: 30
condition: true