Last active
November 28, 2016 10:34
-
-
Save pungoyal/c49d74da324916741f65f35b817630f5 to your computer and use it in GitHub Desktop.
cloud-config for a new server
This file contains hidden or 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 | |
apt_update: true | |
packages: | |
- vim | |
- curl | |
- htop | |
- screen | |
- aptitude | |
users: | |
- name: puneet | |
ssh-authorized-keys: | |
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII/He0ibAeHbQ6FfOK7s3kLv++yqP6zU01f9s7+YDPYW puneet@serenity | |
shell: /bin/bash | |
sudo: ['ALL=(ALL) NOPASSWD:ALL'] | |
runcmd: | |
- sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin no/' /etc/ssh/sshd_config | |
- sed -i -e '$aAllowUsers puneet' /etc/ssh/sshd_config | |
- restart ssh | |
runcmd: | |
- curl -sSL https://get.docker.com/ | sh | |
- usermod -a -G docker puneet | |
power_state: | |
message: Rebooting now. | |
mode: reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment