-
-
Save BenjamenMeyer/eaadf44fb6ac187465578cc6d02f59b9 to your computer and use it in GitHub Desktop.
cloud-init example
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 | |
runcmd: | |
- mkdir -p /root/.config | |
write_files: | |
- content: | | |
[profile matter] | |
region=americas | |
[default] | |
reference=matter | |
path: /root/.config/matterbot | |
owner: root:root | |
permissions: '0660' | |
#cloud-config | |
runcmd: | |
- sleep 60 | |
- apt-get update | |
- apt-get -y dist-upgrade | |
write_files: | |
- content: | | |
requests | |
path: /root/reqirements.txt | |
owner: root:root | |
permissions: '0660' | |
packages: | |
- fail2ban | |
- ufw | |
- python-pip | |
runcmd: | |
- systemctl restart fail2ban | |
- ufw allow OpenSSH | |
- ufw enable | |
- pip install --upgrade pip | |
- pip install -r /root/reqirements.txt | |
users: | |
- default | |
- name: matterbot | |
homedir: /home/matterbot | |
passwd: <crypt'd password goes here> | |
shell: /bin/bash | |
sudo: "ALL=NOPASSWD: ALL" | |
runcmd: | |
- usermod -U matterbot | |
- cp -R /root/.config /home/matterbot | |
- chown -R matterbot /home/matterbot/.config | |
chpasswd: | |
list: | | |
root: reallyawesomepwd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment