Skip to content

Instantly share code, notes, and snippets.

@Jehops
Created December 5, 2022 14:27
Show Gist options
  • Save Jehops/29a61b51fef2977bf5248362742faa06 to your computer and use it in GitHub Desktop.
Save Jehops/29a61b51fef2977bf5248362742faa06 to your computer and use it in GitHub Desktop.
cloud-init-devel-user-data
#cloud-config
hostname: fbsd14-amd64-cloudinit-test
prefer_fqdn_over_hostname: false
manage_etc_hosts: localhost
password: passw0rd
chpasswd:
expire: False
ssh_pwauth: True
ssh_authorized_keys:
- 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGS/CDw25F9gjrgfDl9ZYnrrFwHPegAERk0sWI9UMrw3AjLzpB4yRSvY9KPzz81kJlk0pO+xsoiNsAmXx5nZ9DxK7NfVIrE7U4f4GEhGHltszmkWskBbfuPwC5i7jNc2tib7dWIbRJUrqOzROfllNYOKVbgvWCRJU6Zxb2DEQLdIy6xaZpmCUMhaxoPmeWbQmYTJLstj/QpJqtAS3EnqQXbcWaf4NaPI0moYGCBbs26CGGgp8rHfLa8BwIDYSP0s9fbdKLkFWVunwGP16n2JQBA6aURhNOEfFTbvzr82t9/p4MRs3YxSBCVKUjssfh2qzQd4lP3nsfJpfijKtnFUwP jrm@phe.ftfl.ca'
ntp:
ntp_client: openntpd
packages:
- emacs-devel
- zsh
- tmux
- ripgrep
- rsync
- git
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