add cloudinit for mac

This commit is contained in:
Muzahid 2021-02-10 16:05:45 +05:30
parent 830a14d056
commit 27c235a4da
Signed by: cis-muzahid
GPG Key ID: 1DC85E7D3AB613EA
2 changed files with 31 additions and 0 deletions

11
cloudinit.sh Normal file
View File

@ -0,0 +1,11 @@
## template: jinja
#cloud-config
/usr/bin/dscl . -passwd /Users/johndoe "abcd"
mkdir -p /Volumes/cidata
mount -t cd9660 -o nodev,nosuid,noowners /dev/disk1 /Volumes/cidata
bash /Volumes/cidata/user-data
umount /Volumes/cidata
rmdir -p /Volumes/cidata

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin</string>
</dict>
<key>Label</key>
<string>net.sourceforge.cloudinit.bash</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/usr/local/bin/cloudinit.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>