Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • lydra/yunohost/ansible-yunohost
1 result
Show changes
Commits on Source (4)
......@@ -34,15 +34,16 @@ Ces tags sont applicables suivant les rôles.
|tags|commentaires|
|----|-------|
|pkg|Tâches d'installation de paquets.|
|linux|Tâches liées à l'OS Linux.|
|yunohost|Tâches spécifiques à Yunohost lui-même (installation ou configuration).|
|users|Tâches spécifiques aux utilisateurs de Yunohost.|
|domains|Tâches spécifiques aux domaines liés à Yunohost.|
|apps|Tâches spécifiques aux applications de Yunohost.|
|update|Tâches liées aux paramètres de mise à jour de Yunohost.|
|smtp|Tâches liées aux paramètres de relais smtp de Yunohost.|
|backup|Tâches liées aux sauvegardes de Yunohost.|
|pkg|Tâches d'installation de paquets.|
|linux|Tâches liées à l'OS Linux.|
|backup|Tâches liées aux sauvegardes de Yunohost en local.|
|borg|Tâches liées aux sauvegardes avec BorgBackup.|
## License
......
......@@ -34,15 +34,16 @@ These tags are applicable to roles.
|tags|comment|
|----|-------|
|pkg|Tasks that install packages.|
|linux|Tasks related to Linux.|
|yunohost|Tasks specific to Yunohost itself (setup or configuration).|
|users|Tasks specific to users in Yunohost.|
|domains|Tasks specific to domains linked to Yunohost.|
|apps|Tasks specific to Yunohost apps.|
|update|Tasks related to Yunohost update settings.|
|smtp|Tasks related to Yunohost smtp relay settings.|
|backup|Tasks related to Yunohost backups.|
|pkg|Tasks that install packages.|
|linux|Tasks related to Linux OS.|
|backup|Tasks related to local Yunohost backups.|
|borg|Tasks related to backups with BorgBackup.|
## License
......
......@@ -24,8 +24,7 @@
--label "{{ ynh_app.label }}" \
--args "{% for key, value in ynh_app.args.items() %}{{ key }}={{ value }}{% if not loop.last %}&{% endif %}{% endfor %}"
changed_when: False
tags:
- apps
tags: apps
# Post-installation part
- name: Create post-install template
......@@ -37,8 +36,7 @@
mode: "{{ (item.type == 'script') | ternary('740', '660') }}"
loop: "{{ ynh_app.post_install|default([]) }}"
when: ynh_app.post_install
tags:
- apps
tags: apps
- name: Launch post-install script
ansible.builtin.command: "{{ ynh_app_post_install.dest }}"
......@@ -48,8 +46,7 @@
loop_control:
loop_var: ynh_app_post_install
when: ynh_app_post_install.type == "script"
tags:
- apps
tags: apps
- name: Remove script after execution
ansible.builtin.file:
......@@ -59,5 +56,4 @@
loop_control:
loop_var: ynh_app_post_install
when: ynh_app_post_install.type == "script"
tags:
- apps
tags: apps
......@@ -22,13 +22,11 @@
ansible.builtin.command: yunohost app map --output-as json
register: ynh_installed_apps_raw
changed_when: False
tags:
- apps
tags: apps
- name: Format json of apps
ansible.builtin.set_fact: ynh_installed_apps="{{ ynh_installed_apps_raw.stdout | from_json }}"
tags:
- apps
tags: apps
- name: Install yunohost apps and perform post-install
ansible.builtin.include_tasks: app.yml
......@@ -36,5 +34,4 @@
loop_control:
loop_var: ynh_app
when: ynh_app.label not in ynh_installed_apps.values()
tags:
- apps
tags: apps
......@@ -21,6 +21,4 @@
- name: Install Yunohost apps
ansible.builtin.include_tasks: apps.yml
when: ynh_apps
tags:
- yunohost
- apps
tags: apps
......@@ -68,7 +68,7 @@ ynh_ssh_borg_command: "ssh_command: ssh -p 7410 -o StrictHostKeychecking=no -i {
- `borgmatic_config_name` : **Optionnel**, nom du fichier de configuration Borgmatic.
- `borgmatic_cron_name` : **Optionnel**, nom du fichier de tâche cron.
- `borg_retention_policy.keep_[hourly|daily|weekly|monthly]` : Permet de régler finement le nombre d'archives récentes que le dépôt doit garder.
- `borg_ssh_keys_src` : Chemin où se trouve le couple clé publique / privée SSH sur l'hôte Ansible.
- `borg_ssh_keys_src` : Chemin où se trouve le couple clé publique / privée SSH sur l'hôte Ansible. Pensez à utiliser [Ansible Vault](https://docs.ansible.com/ansible/latest/user_guide/vault.html) pour protéger vos clés SSH.
- `borg_ssh_keys_dest` : Chemin où va être copié la paire de clés SSH sur le serveur YunoHost.
- `ynh_ssh_borg_command`: **Optionnel**, commande SSH personnalisée lors de l'utilisation de Borg sur un dépôt distant.
......
......@@ -61,13 +61,13 @@ borg_ssh_keys_dest: "/home/debian/.ssh/ynh_ed25519"
- `ynh_borg_backup_scheduled`: Enable / disable the backup feature with BorgBackup.
- `ynh_borg_backup_remote_repo`: Enable / disable the backup functionality on a BorgBackup remote repository (tasks related to SSH keys setup). If you enable this feature, then you will need to use `borg_ssh_keys_src` and `borg_ssh_keys_dest` variables.
- `borg_source_directories`: List of source folders to backup. By default, this is the folder containing all YunoHost data (configuration, applications).
- `borg_source_directories`: List of source folders to back up. By default, this is the folder containing all YunoHost data (configuration, applications).
- `borg_repository`: Full path to the Borg repository. Possibility to give a list of repositories to save data in several places.
- `borg_encryption_passphrase` : **Mandatory**, password to use for the Borg repository encryption key.
- `borgmatic_config_name`: **Optional**, name of the Borgmatic configuration file.
- `borgmatic_cron_name`: **Optional**, name of the cron task file.
- `borg_retention_policy.keep_[hourly|daily|weekly|monthly]`: Allows you to fine-tune the number of recent archives the repository should keep.
- `borg_ssh_keys_src`: Path to the SSH public/private key pair on the Ansible host.
- `borg_ssh_keys_src`: Path to the SSH public/private key pair on the Ansible host. Consider using [Ansible Vault](https://docs.ansible.com/ansible/latest/user_guide/vault.html) to protect your SSH keys.
- `borg_ssh_keys_dest`: Path where the SSH key pair will be copied to the YunoHost server.
- `ynh_ssh_borg_command`: **Optional**, custom SSH command run when using Borg on a remote repository.
......
......@@ -23,8 +23,7 @@
path: "{{ ynh_backup.directory | default('/home/yunohost.backup/archives') }}"
state: directory
mode: '0750'
tags:
- backup
tags: backup
- name: Create backup script
ansible.builtin.template:
......@@ -33,8 +32,7 @@
owner: root
group: root
mode: '0740'
tags:
- backup
tags: backup
- name: Create cron task to schedule YNH backup script
ansible.builtin.cron:
......@@ -46,6 +44,4 @@
user: root
job: "{{ ynh_backup_dest_script }}"
cron_file: ynh_backup_cron
tags:
- backup
- cron
tags: backup
......@@ -21,18 +21,36 @@
ansible.builtin.command: ansible-galaxy install m3nu.ansible_role_borgbackup,v0.9.0 -p ~/.ansible/roles
delegate_to: localhost
become: False
tags:
- backup
- borg
- name: Gather facts for BorgBackup role
ansible.builtin.setup:
tags:
- borg
- backup
- name: run BorgBackup role
ansible.builtin.import_role:
name: m3nu.ansible_role_borgbackup
tags:
- backup
- borg
- name: Create backup folder for BorgBackup repository
ansible.builtin.file:
path: "{{ borg_repository }}"
state: directory
mode: '0750'
tags:
- backup
- borg
- name: Configure host for Borg Remote repository
tags:
- backup
- borg
block:
- name: deploy ssh public key for BorgBackup
ansible.builtin.copy:
......@@ -44,7 +62,7 @@
- name: deploy ssh private key for BorgBackup
ansible.builtin.copy:
src: "{{ borg_ssh_keys_src }}"
src: "{{ borg_ssh_keys_src }}.vault"
dest: "{{ borg_ssh_keys_dest }}"
owner: "root"
group: "root"
......@@ -58,6 +76,9 @@
line: "{{ ynh_ssh_borg_command }}"
state: present
when: ynh_ssh_borg_command is defined
tags:
- backup
- borg
- name: change archive name in "/etc/borgmatic/{{ borgmatic_config_name }}"
......@@ -66,6 +87,9 @@
regexp: "archive_name_format:"
line: " archive_name_format: {{ borg_archive_name_format }}"
state: present
tags:
- backup
- borg
- name: Create borg launch script in /usr/local/bin
ansible.builtin.copy:
......@@ -77,6 +101,12 @@
owner: root
group: root
mode: "0755"
tags:
- backup
- borg
- name: Initialize a new Borg repository
ansible.builtin.command: "{{ borg_init_command }}"
tags:
- backup
- borg
......@@ -21,12 +21,11 @@
- name: Enable Yunohost apps backup
ansible.builtin.include_tasks: backup.yml
when: ynh_backup.scheduled
tags:
- backup
tags: backup
- name: Use Borg Backup with YunoHost
ansible.builtin.include_tasks: borgbackup.yml
when: ynh_borg_backup_scheduled
tags:
- backup
- borg
- backup
- borg
......@@ -28,7 +28,6 @@
tags:
- yunohost
- update
- cron
- name: Creates cron task under /etc/cron.d to auto-update Yunohost
ansible.builtin.cron:
......@@ -41,4 +40,3 @@
tags:
- yunohost
- update
- cron
......@@ -53,6 +53,7 @@
- "{{ ynh_data_dirs }}"
tags:
- linux
- yunohost
when: ynh_data_dirs_enabled
- name: Create symbolic links for Yunohost subdirs
......@@ -65,6 +66,7 @@
- "{{ ynh_data_dirs }}"
tags:
- linux
- yunohost
when: ynh_data_dirs_enabled
- name: Test if Yunohost is already installed
......@@ -97,7 +99,6 @@
when: not ynh_file_install.stat.exists
tags:
- yunohost
- domains
- name: Create extra domains
ansible.builtin.include_tasks: domains.yml
......