add listmonk app
This commit is contained in:
78
modules/apps/listmonk/cloud-init/service.yaml
Normal file
78
modules/apps/listmonk/cloud-init/service.yaml
Normal file
@@ -0,0 +1,78 @@
|
||||
#cloud-config
|
||||
hostname: ${hostname}
|
||||
local-hostname: ${hostname}
|
||||
fqdn: ${hostname}.${domain}
|
||||
manage_etc_hosts: true
|
||||
|
||||
groups:
|
||||
- git
|
||||
|
||||
users:
|
||||
- default
|
||||
- name: ${hostname}
|
||||
groups: sudo,git
|
||||
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
|
||||
- curl
|
||||
- unzip
|
||||
- postgresql
|
||||
- postgresql-client
|
||||
|
||||
mounts:
|
||||
- [ "192.168.1.12:/main/backups", "/backups", "nfs", "defaults,_netdev,x-systemd.requires=network-online.target", "0", "0" ]
|
||||
|
||||
write_files:
|
||||
- path: /opt/environment/.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/create-backup.timer
|
||||
permissions: "0644"
|
||||
content: |
|
||||
${create-backup-timer}
|
||||
- path: /etc/systemd/system/create-backup.service
|
||||
permissions: "0644"
|
||||
content: |
|
||||
${create-backup-service}
|
||||
- path: /etc/systemd/system/listmonk.service
|
||||
permissions: "0644"
|
||||
content: |
|
||||
${listmonk-service}
|
||||
- path: /opt/listmonk/install-listmonk.sh
|
||||
permissions: "0755"
|
||||
content: |
|
||||
${install-listmonk-script}
|
||||
|
||||
runcmd:
|
||||
# Backup setup
|
||||
- mkdir -p /backups
|
||||
- mount -t nfs ${proxmox_host_ip}:/main/backups /backups
|
||||
- systemctl enable --now create-backup.timer
|
||||
# listmonk setup
|
||||
- /opt/listmonk/install-listmonk.sh
|
||||
|
||||
final_message: |
|
||||
Base system ready for ${hostname}
|
||||
Reference in New Issue
Block a user