| .. | ||
| README.md | ||
| setup.yml | ||
| start_backups.yml | ||
| start_services.yml | ||
| update.yml | ||
Usage
Setup
- Run
setup.ymlusing a non-sudo user, providing regular and sudo credentials.
ansible-playbook roles/tasks/debian/setup.yml -u keannu125 -k --ask-become-pass
This will elevate to root user via sudo and set up root SSH access through the provided id_rsa.pub file in the control node's own .ssh directory.
-
Set up the necessary template scripts provided at
/root/scripts. -
Rename
.env.sampleto.env.(viamv .env.sample .env). -
Provide your ACME SSL access tokens in the
.envforrenew_ssl.shto parse. -
Also provide your
ACME_EMAILindebian.ymlundergroup_varsfor the playbook to parse. -
Provide project directories to spin up on boot through
start_services.sh. -
Provide the same project directories to back up via Borg in
backup.shincluding any file/folder exemptions. -
Update the Samba credentials file located at
/root/.samba/credentials.
# credentials
user=USERNAME
password=PASSWORD
- Update the CIFS/Samba mount for backups located in
crontab(viacrontab -e).
# crontab entry
* * * * * mount.cifs "//255.255.255.0/SAMBA-MOUNT" "/mnt/backups" -o credentials="/root/.samba/credentials"
If you'd need to run the setup.yml playbook again for any reason. You can omit specifying user or sudo credentials and simply run.
ansible-playbook roles/tasks/debian/setup.yml
Any existing or additional scripts that have already been modified will not be overwritten (See force: false directives in setup.yml).