add bookshelf module, fix gitea minor typo, add fixe ip for vms
This commit is contained in:
94
modules/apps/bookshelf/cloud-init/service.yaml
Normal file
94
modules/apps/bookshelf/cloud-init/service.yaml
Normal file
@@ -0,0 +1,94 @@
|
||||
#cloud-config
|
||||
hostname: ${hostname}
|
||||
local-hostname: ${hostname}
|
||||
fqdn: ${hostname}.${domain}
|
||||
manage_etc_hosts: true
|
||||
|
||||
users:
|
||||
- default
|
||||
- name: ${hostname}
|
||||
groups: sudo
|
||||
shell: /bin/bash
|
||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
||||
ssh_authorized_keys:
|
||||
- ${ssh_key}
|
||||
|
||||
disable_root: true
|
||||
|
||||
package_update: true
|
||||
package_upgrade: false
|
||||
|
||||
packages:
|
||||
- git
|
||||
- nfs-common
|
||||
- docker.io
|
||||
- docker-compose
|
||||
- curl
|
||||
- jq
|
||||
|
||||
write_files:
|
||||
- path: /etc/fstab
|
||||
permissions: "0644"
|
||||
content: |
|
||||
${proxmox_host_ip}:/main/backups /backups nfs defaults,_netdev,x-systemd.requires=network-online.target 0 0
|
||||
- path: /opt/bookshelf/env.sh
|
||||
permissions: "0644"
|
||||
content: |
|
||||
${environment-setup-script}
|
||||
- path: /opt/bookshelf/secrets/bookshelf.env
|
||||
permissions: "0644"
|
||||
content: |
|
||||
${env-file-content}
|
||||
- path: /usr/local/bin/restore-backup.sh
|
||||
permissions: "0755"
|
||||
content: |
|
||||
${restore-backup-script}
|
||||
- path: /etc/systemd/system/restore-backup.service
|
||||
permissions: "0644"
|
||||
content: |
|
||||
${restore-backup-service}
|
||||
- path: /usr/local/bin/backup.sh
|
||||
permissions: "0755"
|
||||
content: |
|
||||
${create-backup-script}
|
||||
- path: /etc/systemd/system/weekly-backup.timer
|
||||
permissions: "0644"
|
||||
content: |
|
||||
${create-backup-timer}
|
||||
- path: /etc/systemd/system/weekly-backup.service
|
||||
permissions: "0644"
|
||||
content: |
|
||||
${create-backup-service}
|
||||
- path: /etc/systemd/system/act_runner.service
|
||||
permissions: "0644"
|
||||
content: |
|
||||
${act_runner-service}
|
||||
- path: /opt/bookshelf/install-runner.sh
|
||||
permissions: "0755"
|
||||
content: |
|
||||
${act_runner-install-script}
|
||||
- path: /opt/bookshelf/install-bookshelf.sh
|
||||
permissions: "0755"
|
||||
content: |
|
||||
${bookshelf-install-script}
|
||||
|
||||
runcmd:
|
||||
# Backup setup
|
||||
- mkdir -p /backups
|
||||
- mount -t nfs ${proxmox_host_ip}:/main/backups /backups
|
||||
- systemctl enable --now weekly-backup.timer
|
||||
# Docker setup
|
||||
- systemctl enable docker
|
||||
- systemctl start docker
|
||||
- usermod -aG docker ${hostname}
|
||||
# Act_runner install
|
||||
- /opt/bookshelf/install-runner.sh
|
||||
- systemctl daemon-reload
|
||||
- systemctl enable act_runner.service
|
||||
- systemctl start act_runner.service
|
||||
# Bookshelf install
|
||||
- /opt/bookshelf/install-bookshelf.sh
|
||||
|
||||
|
||||
final_message: |
|
||||
Base system ready for ${hostname}
|
||||
Reference in New Issue
Block a user