1
0
Fork 0
ynh-lydra-ansible-yunohost/roles/ynh_backup
2022-05-23 10:53:36 +02:00
..
defaults refactor: transformed the role into a collection 2022-05-23 09:46:11 +02:00
meta refactor: transformed the role into a collection 2022-05-23 09:46:11 +02:00
tasks docs: apply Christophe suggestions for README 2022-05-23 10:53:36 +02:00
templates refactor: transformed the role into a collection 2022-05-23 09:46:11 +02:00
README-FR.md docs: apply Christophe suggestions for README 2022-05-23 10:53:36 +02:00
README.md docs: apply Christophe suggestions for README 2022-05-23 10:53:36 +02:00

Ansible Role: Yunohost

🇫🇷 French version

Deploy Yunohost with Ansible!

Requirements

Yunohost needs to be installed on your server.

Role Variables

Default variables are available in default/main.yml however it is necessary to override them according to your needs for ...

Backups management

ynh_backup:
  scheduled: True
  directory: "/data/backup"
  scheduled_hour: "*"
  scheduled_minute: "*/30"
  scheduled_weekday: "*"
  scheduled_month: "*"
  system: True
  apps: True
  src_script: "templates/ynh_backup.sh.j2"
  dest_script: "/usr/bin"

The backup task will allow to backup Yunohost applications and their data by setting up a cron job.

  • ynh_backup.scheduled: to enable the Yunohost applications backup feature, set the value to True.
  • ynh_backup.directory: the default backup folder is /home/yunohost.backup/archives however you can choose to save the backups in another folder with this variable. In this case, in order to be able to restore the backups from the web interface, Yunohost automatically creates a symbolic link from the created archive to its default folder.
  • ynh_backup.scheduled_[hour|minute|weekday|month]: modifies the scheduling of the cron task. By default it will run every day of the year at 1am. For more information about cron time settings, this tool can be useful: https://crontab.guru/.
  • ynh_backup.system : is mandatory. Enables automatic backup of the Yunohost system by setting the value to True.
  • ynh_backup.apps : est obligatoire. Enables automatic backup of Yunohost applications by setting the value to True.
  • src_script: this is the absolute path where the template file is located on the machine running Ansible. By default is will be stored in templates/ynh_backup.sh.j2.
  • dest_script: this is the directory where the template file will be stored. By default is will be stored in /usr/local/bin. The script is named ynh_backup.sh.

Dependencies

None.

Example Playbook

---
- name: Configure Yunohost backups
  hosts: all
  become: True
  collections:
    - lydra.yunohost
  roles:
    - ynh_backup

License

ansible-yunohost Copyright 2021 Lydra

ansible-yunohost is maintained by Lydra and released under the GPL3 license.