-
-
Save igalic/d3b942400d01530aa7b75cf562589e50 to your computer and use it in GitHub Desktop.
get a cloud-init nocloud seed running
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir -p /var/lib/cloud/seed/nocloud | |
cd /var/lib/cloud/seed/nocloud | |
fetch https://gist.github.com/igalic/d3b942400d01530aa7b75cf562589e50/raw/589e6f02359dcc74b6a9cb068c0a6f5a94bfcd28/meta-data | |
fetch https://gist.github.com/igalic/d3b942400d01530aa7b75cf562589e50/raw/406cdbadbb674b08fcb4ae9b88fafeea47466683/user-data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instance-id: iid-local04 | |
local-hostname: fbsd14-amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
hostname: fbsd14-amd64 | |
prefer_fqdn_over_hostname: false | |
manage_etc_hosts: localhost | |
password: passw0rd | |
chpasswd: | |
expire: False | |
ssh_pwauth: True | |
ssh_authorized_keys: | |
- 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB2xkyYXMhOUuV/nw6e6QGHhpkyHnYcix4xwTrCGPXsa meena@76ix' | |
ntp: | |
ntp_client: openntpd | |
packages: | |
- neovim | |
- fish | |
- tmux | |
- ripgrep | |
- rsync | |
- git | |
- tig | |
write_files: | |
- content: | | |
# disable sendmail (mailqueue) cleanups: | |
daily_clean_hoststat_enable="NO" | |
daily_status_mail_rejects_enable="NO" | |
daily_status_mailq_enable="NO" | |
daily_submit_queuerun="NO" | |
# disable periodic's emailing by logging! | |
daily_output=/var/log/daily.log | |
weekly_output=/var/log/weekly.log | |
monthly_output=/var/log/monthly.log | |
# put these into the log, instead of trying to mail them: | |
daily_status_security_inline="YES" | |
weekly_status_security_inline="YES" | |
monthly_status_security_inline="YES" | |
path: /etc/periodic.conf | |
- content: | | |
# disable all of sensmail | |
sendmail /usr/bin/true | |
mailq /usr/bin/true | |
newaliases /usr/bin/true | |
hoststat /usr/bin/true | |
purgestat /usr/bin/true | |
path: /etc/mail/mailer.conf | |
bootcmd: | |
- cloud-init-per once service sendmail onestop' | |
- sysrc -c sendmail_enable=NONE || sysrc sendmail_enable=NONE | |
- sysrc -c cron_flags="-m ''" || sysrc cron_flags="-m ''" | |
- sysrc -c sshd_enable=YES || sysrc sshd_enable=YES' | |
- cloud-init-per once service sshd start | |
#power_state: | |
# mode: reboot | |
# delay: now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment