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 | ## this is just the stock config
## but with '#cloud-config' added to top
$ head -n 5 /tmp/my.d/stock.cfg
#cloud-config
# The top level settings are used as module
# and system configuration.
# A set of users which may be applied and/or used by various modules
## this is a jsonp style file
$ ## as jsonp merging
$ cat /tmp/my.d/jsonp.cfg
#cloud-config-jsonp
[
{"op": "add", "path": "/cloud_final_modules/-",
"value": "power_state_change"}
]
## and this is a merge-how style
$ cat /tmp/my.d/merge.cfg
#cloud-config
merge_how: dict(recurse_array)+list(append)
cloud_final_modules:
- power_state_change
$ PYTHONPATH=$PWD python3 ./tools/ccfg-merge-debug /tmp/my.d/stock.cfg /tmp/my.d/jsonp.cfg
#cloud-config
# from 2 files
# part-001
# part-002
---
cloud_config_modules:
- emit_upstart
- disk_setup
- mounts
- ssh-import-id
- locale
- set-passwords
- snappy
- grub-dpkg
- apt-pipelining
- apt-configure
- package-update-upgrade-install
- landscape
- timezone
- puppet
- chef
- salt-minion
- mcollective
- disable-ec2-metadata
- runcmd
- byobu
cloud_final_modules:
- rightscale_userdata
- scripts-vendor
- scripts-per-once
- scripts-per-boot
- scripts-per-instance
- scripts-user
- ssh-authkey-fingerprints
- keys-to-console
- phone-home
- final-message
- power-state-change
- power_state_change
cloud_init_modules:
- migrator
- ubuntu-init-switch
- seed_random
- bootcmd
- write-files
- growpart
- resizefs
- set_hostname
- update_hostname
- update_etc_hosts
- ca-certs
- rsyslog
- users-groups
- ssh
disable_root: true
preserve_hostname: false
system_info:
default_user:
gecos: Ubuntu
groups:
- adm
- audio
- cdrom
- dialout
- dip
- floppy
- netdev
- plugdev
- sudo
- video
lock_passwd: true
name: ubuntu
shell: /bin/bash
sudo:
- ALL=(ALL) NOPASSWD:ALL
distro: ubuntu
package_mirrors:
- arches:
- i386
- amd64
failsafe:
primary: http://archive.ubuntu.com/ubuntu
security: http://security.ubuntu.com/ubuntu
search:
primary:
- http://%(ec2_region)s.ec2.archive.ubuntu.com/ubuntu/
- http://%(availability_zone)s.clouds.archive.ubuntu.com/ubuntu/
- http://%(region)s.clouds.archive.ubuntu.com/ubuntu/
security: []
- arches:
- armhf
- armel
- default
failsafe:
primary: http://ports.ubuntu.com/ubuntu-ports
security: http://ports.ubuntu.com/ubuntu-ports
paths:
cloud_dir: /var/lib/cloud/
templates_dir: /etc/cloud/templates/
upstart_dir: /etc/init/
ssh_svcname: ssh
users:
- default
...
|