├── meta └── runtime.yml ├── Pipfile ├── .gitignore ├── roles ├── ynh_apps │ ├── meta │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ ├── apps.yml │ │ └── app.yml │ ├── defaults │ │ └── main.yml │ ├── README.md │ └── README-FR.md ├── ynh_backup │ ├── meta │ │ └── main.yml │ ├── templates │ │ └── ynh_backup.sh.j2 │ ├── vars │ │ └── main.yml │ ├── tasks │ │ ├── main.yml │ │ ├── restic.yml │ │ ├── backup.yml │ │ └── borgbackup.yml │ ├── defaults │ │ └── main.yml │ ├── README.md │ └── README-FR.md ├── ynh_config │ ├── meta │ │ └── main.yml │ ├── templates │ │ └── ynh_autoupdate.sh.j2 │ ├── tasks │ │ ├── smtp_relay.yml │ │ ├── autoupdate.yml │ │ └── main.yml │ ├── defaults │ │ └── main.yml │ ├── README.md │ └── README-FR.md └── ynh_setup │ ├── meta │ └── main.yml │ ├── tasks │ ├── domains.yml │ ├── users.yml │ └── main.yml │ ├── defaults │ └── main.yml │ ├── README.md │ └── README-FR.md ├── .yamllint.yml ├── galaxy.yml ├── .gitlab-ci.yml ├── README.md ├── README-FR.md ├── CHANGELOG.md ├── Pipfile.lock └── LICENSE /meta/runtime.yml: -------------------------------------------------------------------------------- 1 | requires_ansible: ">=2.10" 2 | -------------------------------------------------------------------------------- /Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | url = "https://pypi.org/simple" 3 | verify_ssl = true 4 | name = "pypi" 5 | 6 | [packages] 7 | ansible = "==4" 8 | ansible-lint = "==5.4.0" 9 | yamllint = "==1.26" 10 | jmespath = "==1.0.1" 11 | 12 | [requires] 13 | python_version = "3.8" 14 | 15 | [dev-packages] 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Vault password file 2 | .vault_pass 3 | 4 | # Ansible 5 | .ansible/ 6 | *.retry 7 | .roles_requirements/ 8 | .lint_rules/ 9 | 10 | # Terraform 11 | .terraform/ 12 | terraform.tfstate.d/ 13 | *.tfstate 14 | *.tfstate.backup 15 | terraform.tfvars 16 | env.vault 17 | env.d/ 18 | terraform/create_state_bucket/terraform.tf 19 | 20 | # Logs 21 | *.log 22 | *.history 23 | -------------------------------------------------------------------------------- /roles/ynh_apps/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | role_name: ynh_apps 4 | author: lydra 5 | description: Install Yunohost apps with Ansible 6 | license: GPL-v3 7 | min_ansible_version: 2.10 8 | github_branch: main 9 | platforms: 10 | - name: Debian 11 | versions: 12 | - buster 13 | galaxy_tags: 14 | - yunohost 15 | - cloud 16 | - web 17 | 18 | dependencies: [] 19 | -------------------------------------------------------------------------------- /roles/ynh_backup/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | role_name: ynh_backup 4 | author: lydra 5 | description: Backup Yunohost with Ansible 6 | license: GPL-v3 7 | min_ansible_version: 2.10 8 | github_branch: main 9 | platforms: 10 | - name: Debian 11 | versions: 12 | - buster 13 | galaxy_tags: 14 | - yunohost 15 | - cloud 16 | - web 17 | 18 | dependencies: [] 19 | -------------------------------------------------------------------------------- /roles/ynh_config/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | role_name: ynh_config 4 | author: lydra 5 | description: Configure Yunohost with Ansible 6 | license: GPL-v3 7 | min_ansible_version: 2.10 8 | github_branch: main 9 | platforms: 10 | - name: Debian 11 | versions: 12 | - buster 13 | galaxy_tags: 14 | - yunohost 15 | - cloud 16 | - web 17 | 18 | dependencies: [] 19 | -------------------------------------------------------------------------------- /roles/ynh_setup/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | role_name: ynh_setup 4 | author: lydra 5 | description: Install Yunohost with Ansible 6 | license: GPL-v3 7 | min_ansible_version: 2.10 8 | github_branch: main 9 | platforms: 10 | - name: Debian 11 | versions: 12 | - buster 13 | galaxy_tags: 14 | - yunohost 15 | - cloud 16 | - web 17 | 18 | dependencies: [] 19 | -------------------------------------------------------------------------------- /roles/ynh_config/templates/ynh_autoupdate.sh.j2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | yunohost tools update 4 | {% if ynh_autoupdate.system %} 5 | yunohost tools upgrade system 6 | {% endif %} 7 | {% if ynh_autoupdate.apps %} 8 | yunohost tools upgrade apps 9 | {% endif %} 10 | {% if ynh_autoupdate.system is false and ynh_autoupdate.apps is false %} 11 | echo "Read the readme to know more about ynh_autoupdate.apps and ynh_autoupdate.system" 12 | echo "https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/blob/main/README.md" 13 | exit 1 14 | {% endif %} 15 | -------------------------------------------------------------------------------- /.yamllint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # https://github.com/ansible/galaxy/blob/devel/galaxy/importer/linters/yamllint.yaml 3 | # Based on ansible-lint config 4 | extends: default 5 | 6 | rules: 7 | braces: {max-spaces-inside: 1, level: error} 8 | brackets: {max-spaces-inside: 1, level: error} 9 | colons: {max-spaces-after: -1, level: error} 10 | commas: {max-spaces-after: -1, level: error} 11 | comments: disable 12 | comments-indentation: disable 13 | document-start: disable 14 | empty-lines: {max: 3, level: error} 15 | hyphens: {level: error} 16 | indentation: disable 17 | key-duplicates: enable 18 | line-length: disable 19 | new-line-at-end-of-file: disable 20 | new-lines: {type: unix} 21 | trailing-spaces: disable 22 | truthy: disable 23 | -------------------------------------------------------------------------------- /galaxy.yml: -------------------------------------------------------------------------------- 1 | namespace: lydra 2 | name: yunohost 3 | version: 1.1.4 4 | readme: README.md 5 | authors: 6 | - Lydra () 7 | description: Yunohost related Roles and Modules 8 | license_file: 'LICENSE' 9 | tags: 10 | - yunohost 11 | - cloud 12 | - web 13 | - control 14 | repository: https://github.com/LydraFr/ansible-yunohost 15 | documentation: https://github.com/LydraFr/ansible-yunohost/blob/main/README.md 16 | homepage: https://github.com/LydraFr/ansible-yunohost 17 | issues: https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/issues 18 | # A list of file glob-like patterns used to filter any files or directories that should not be included in the build 19 | # artifact. A pattern is matched from the relative path of the file or directory of the collection directory. This 20 | # uses 'fnmatch' to match the files or directories. Some directories and files like 'galaxy.yml', '*.pyc', '*.retry', 21 | # and '.git' are always filtered. 22 | # More info https://docs.ansible.com/ansible/devel/dev_guide/developing_collections_distributing.html#ignoring-files-and-folders 23 | build_ignore: 24 | - .git* 25 | - .yamllint.yml 26 | - Pip* 27 | - .vscode 28 | -------------------------------------------------------------------------------- /roles/ynh_backup/templates/ynh_backup.sh.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | today="$(date +%Y%m%d)" 3 | number_to_keep="{{ ynh_backup.number_days_to_keep | default("2") }}" 4 | old_backup_list="$(yunohost backup list --output-as plain | head -n -${number_to_keep})" 5 | 6 | _good() { 7 | echo "SUCCESS: ${1}" && exit 0 8 | } 9 | 10 | _fail() { 11 | echo "ERROR: ${1}" && exit 1 12 | } 13 | 14 | _create_ynh_backup() { 15 | echo "Backing up ${today} YunoHost data now." 16 | yunohost backup create {% if ynh_backup.system | default(True) %}--system{% endif %}{% if ynh_backup.apps | default(True) %} --apps{% endif %}{% if ynh_backup.directory is defined %} --output-directory {{ ynh_backup.directory }}/backup_"${today}"{% endif %} || _fail "Can't create the local YunoHost backup" 17 | } 18 | 19 | _prune_old_backup() { 20 | if [ -n "${old_backup_list}" ]; then 21 | for backup in ${old_backup_list}; do 22 | echo "Backup ${backup} is 2 days old or more. Purging it now." 23 | yunohost backup delete "${backup}" 24 | rm -rf {{ ynh_backup.directory }}/backup_"${backup}" 25 | done 26 | _good "Purging of old backups completed." 27 | else 28 | _good "There is no old backup to be purged." 29 | fi 30 | } 31 | 32 | _create_ynh_backup 33 | _prune_old_backup 34 | -------------------------------------------------------------------------------- /roles/ynh_apps/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | 21 | - name: Install Yunohost apps 22 | ansible.builtin.include_tasks: apps.yml 23 | when: ynh_apps 24 | tags: apps 25 | -------------------------------------------------------------------------------- /roles/ynh_backup/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | 21 | # Variables for backup 22 | ynh_backup_src_script: "templates/ynh_backup.sh.j2" 23 | ynh_backup_dest_script: "/usr/local/bin/ynh_backup.sh" 24 | _ynh_backup_directory: "/home/yunohost.backup/archives" 25 | _ansible_role_directory: "~/.ansible/roles" 26 | -------------------------------------------------------------------------------- /roles/ynh_apps/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | 21 | # The list of Yunohost apps. 22 | ynh_apps: null 23 | # - label: Tiny Tiny RSS 24 | # link: ttrss 25 | # args: 26 | # domain: domain.tld 27 | # path: /ttrss 28 | # post_install: 29 | # - src: "templates/file.sh.j2" 30 | # dest: "/tmp/script.sh" 31 | # type: script 32 | # owner: ttrss # Only provide if different from app name 33 | # group: ttrss # Only provide if different from www-data 34 | -------------------------------------------------------------------------------- /roles/ynh_backup/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | - name: Enable Yunohost local backups 21 | ansible.builtin.include_tasks: backup.yml 22 | when: ynh_backup.scheduled 23 | tags: backup 24 | 25 | - name: Use BorgBackup with YunoHost 26 | ansible.builtin.include_tasks: borgbackup.yml 27 | when: ynh_borg_backup_scheduled 28 | tags: 29 | - backup 30 | - borg 31 | 32 | - name: Use Restic with YunoHost 33 | ansible.builtin.include_tasks: restic.yml 34 | when: ynh_restic_backup_scheduled 35 | tags: 36 | - backup 37 | - restic 38 | -------------------------------------------------------------------------------- /roles/ynh_config/tasks/smtp_relay.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | 21 | - name: Get current SMTP settings 22 | ansible.builtin.command: 23 | "yunohost settings get smtp.relay.{{ item.key }}" 24 | register: _ynh_smtp_current_values 25 | changed_when: false 26 | tags: 27 | - yunohost 28 | - smtp 29 | 30 | - name: Set new SMTP settings 31 | ansible.builtin.command: 32 | "yunohost settings set smtp.relay.{{ item.key }} -v {{ item.value }}" 33 | when: _ynh_smtp_current_values.stdout != item.value 34 | tags: 35 | - yunohost 36 | - smtp 37 | -------------------------------------------------------------------------------- /roles/ynh_backup/tasks/restic.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | - name: Download Restic role on localhost 21 | ansible.builtin.command: "ansible-galaxy install do1jlr.restic,{{ do1jlr_restic_version }} -p {{ _ansible_role_directory }}" 22 | delegate_to: localhost 23 | become: False 24 | tags: 25 | - backup 26 | - restic 27 | 28 | - name: Gather facts for Restic role 29 | ansible.builtin.setup: 30 | tags: 31 | - backup 32 | - restic 33 | 34 | - name: Run Restic role 35 | ansible.builtin.import_role: 36 | name: do1jlr.restic 37 | tags: 38 | - backup 39 | - restic 40 | -------------------------------------------------------------------------------- /roles/ynh_apps/tasks/apps.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | 21 | - name: List currently installed apps 22 | ansible.builtin.command: yunohost app map --output-as json 23 | register: ynh_installed_apps_raw 24 | changed_when: False 25 | tags: apps 26 | 27 | - name: Format json of apps 28 | ansible.builtin.set_fact: ynh_installed_apps="{{ ynh_installed_apps_raw.stdout | from_json }}" 29 | tags: apps 30 | 31 | - name: Install yunohost apps and perform post-install 32 | ansible.builtin.include_tasks: app.yml 33 | loop: "{{ ynh_apps }}" 34 | loop_control: 35 | loop_var: ynh_app 36 | when: ynh_app.label not in ynh_installed_apps.values() 37 | tags: apps 38 | -------------------------------------------------------------------------------- /roles/ynh_setup/tasks/domains.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | 21 | - name: List currently installed domains 22 | ansible.builtin.command: yunohost domain list --output-as json 23 | register: ynh_installed_domains_raw 24 | changed_when: False 25 | tags: 26 | - yunohost 27 | - domains 28 | 29 | - name: Format json of domains 30 | ansible.builtin.set_fact: ynh_installed_domains="{{ ynh_installed_domains_raw.stdout | from_json }}" 31 | tags: 32 | - yunohost 33 | - domains 34 | 35 | - name: Create domains 36 | ansible.builtin.command: yunohost domain add {{ item }} 37 | with_items: "{{ ynh_extra_domains }}" 38 | when: item not in ynh_installed_domains.domains 39 | tags: 40 | - yunohost 41 | - domains 42 | -------------------------------------------------------------------------------- /roles/ynh_config/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | 21 | # Do not touch this variable 22 | # Just to have dict default value 23 | ynh_smtp_relay: 24 | value: null 25 | 26 | # SMTP custom settings (Only override if you need a SMTP relay) 27 | # Example: 28 | # ynh_smtp_relay: 29 | # host: smtp.domain.tld 30 | # port: "25" 31 | # user: user1 32 | # password: Pa$$w0rd 33 | 34 | # Autoupdate Yunohost and its apps 35 | ynh_autoupdate: 36 | scheduled: False 37 | # special_time: "daily" #Choices are [annually,daily,hourly,monthly,reboot,weekly,yearly] 38 | # apps: True 39 | # system: True 40 | # dest_script: "/usr/local/bin/" 41 | 42 | ynh_settings: 43 | security.ssh.port: "22" 44 | security.password.passwordless_sudo: "true" 45 | -------------------------------------------------------------------------------- /roles/ynh_setup/tasks/users.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | 21 | - name: List users 22 | ansible.builtin.command: yunohost user list --output-as json 23 | register: ynh_registered_users_raw 24 | changed_when: False 25 | tags: 26 | - yunohost 27 | - users 28 | 29 | - name: Format json of users 30 | ansible.builtin.set_fact: ynh_registered_users="{{ ynh_registered_users_raw.stdout | from_json }}" 31 | tags: 32 | - yunohost 33 | - users 34 | 35 | - name: Create missing Yunohost users 36 | ansible.builtin.command: 37 | yunohost user create "{{ item.name }}" \ 38 | -F "{{ item.fullname }}" \ 39 | -d "{{ item.mail_domain }}" \ 40 | -p "{{ item.pass }}" 41 | loop: "{{ ynh_users }}" 42 | when: item.name not in ynh_registered_users.users.keys() 43 | tags: 44 | - yunohost 45 | - users 46 | -------------------------------------------------------------------------------- /roles/ynh_config/tasks/autoupdate.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | 21 | - name: Creates Yunohost autoupdate script 22 | ansible.builtin.template: 23 | src: "templates/ynh_autoupdate.sh.j2" 24 | dest: "{{ ynh_autoupdate.dest_script | default('/usr/local/bin/') }}ynh_autoupdate.sh" 25 | owner: root 26 | group: root 27 | mode: '0740' 28 | tags: 29 | - yunohost 30 | - update 31 | 32 | - name: Creates cron task under /etc/cron.d to auto-update Yunohost 33 | ansible.builtin.cron: 34 | name: "auto-update Yunohost 35 | Logs can be found in /var/log/yunohost/categories/operation" 36 | special_time: "{{ ynh_autoupdate.special_time }}" 37 | user: root 38 | job: "{{ ynh_autoupdate.dest_script | default('/usr/local/bin/') }}ynh_autoupdate.sh" 39 | cron_file: ynh_autoupdate_cron 40 | tags: 41 | - yunohost 42 | - update 43 | -------------------------------------------------------------------------------- /roles/ynh_config/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | 21 | - name: Ensure SMTP relay is enabled 22 | ansible.builtin.command: 23 | "yunohost settings set email.smtp.smtp_relay_enabled -v yes" 24 | when: ynh_smtp_relay 25 | tags: 26 | - yunohost 27 | - smtp 28 | 29 | - name: Configure SMTP relay 30 | ansible.builtin.include_tasks: smtp_relay.yml 31 | loop: "{{ ynh_smtp_relay | dict2items }}" 32 | when: item.value 33 | tags: 34 | - yunohost 35 | - smtp 36 | 37 | - name: Configure Yunohost autoupdate 38 | ansible.builtin.include_tasks: autoupdate.yml 39 | when: ynh_autoupdate.scheduled 40 | tags: 41 | - yunohost 42 | - update 43 | 44 | - name: Configure YunoHost settings 45 | ansible.builtin.command: 46 | "yunohost settings set {{ item.key }} -v {{ item.value }}" 47 | loop: "{{ ynh_settings | dict2items }}" 48 | tags: 49 | - yunohost 50 | - settings 51 | -------------------------------------------------------------------------------- /roles/ynh_setup/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | 21 | # Debian 10 script only. 22 | ynh_install_script_url: https://install.yunohost.org 23 | 24 | ynh_admin_password: MYINSECUREPWD_PLZ_OVERRIDE_THIS 25 | 26 | ynh_dir: "/data/yunohost" 27 | 28 | ynh_data_dirs: 29 | - path: "{{ ynh_dir }}/etc" 30 | link: "/etc/yunohost" 31 | - path: "{{ ynh_dir }}/var" 32 | link: "/var/www" 33 | - path: "{{ ynh_dir }}/share" 34 | link: "/usr/share/yunohost" 35 | - path: "{{ ynh_dir }}/backup" 36 | link: "/home/yunohost.backup/archives" 37 | - path: "{{ ynh_dir }}/home_apps" 38 | link: "/home/yunohost.app" 39 | ynh_data_dirs_enabled: True 40 | 41 | # The list of Yunohost domains. 42 | ynh_main_domain: domain.tld 43 | ynh_extra_domains: null 44 | ynh_ignore_dyndns_server: False 45 | 46 | # The list of Yunohost users. 47 | ynh_users: null 48 | # - name: user1 49 | # pass: p@ssw0rd 50 | # fullname: Jane DOE 51 | # mail_domain: domain.tld 52 | -------------------------------------------------------------------------------- /roles/ynh_backup/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | 21 | # Variables for local YunoHost backups 22 | ynh_backup: 23 | scheduled: False 24 | 25 | # Variables for YunoHost BorgBackup 26 | ynh_borg_backup_scheduled: False 27 | m3nu_ansible_role_borgbackup_version: "v0.9.4" 28 | borg_source_directories: 29 | - "/home/yunohost.backup" 30 | borg_repository: "/data/backup/borg_repository" 31 | borg_init_command: "borgmatic init -c /etc/borgmatic/{{ borgmatic_config_name }} -e repokey --syslog-verbosity 1" 32 | borg_archive_name_format: "'{hostname}-yunohost-live-data-{now:%Y-%m-%d-%H%M%S}'" 33 | ynh_borg_backup_remote_repo: False 34 | 35 | # Variables for YunoHost Restic 36 | # https://github.com/roles-ansible/ansible_role_restic 37 | ynh_restic_backup_scheduled: False 38 | do1jlr_restic_version: "v0.7.1" 39 | restic_version: "0.14.0" 40 | restic_schedule_type: "cronjob" 41 | restic_keep_time: "0y1m0d0h" 42 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | 21 | # -*- coding: utf-8 -*- 22 | # Doc: https://docs.gitlab.com/ce/ci/yaml/#include 23 | 24 | include: 25 | - project: 'froggit/ci/gci-tpl' 26 | ref: 0.0.1 27 | file: 28 | - '/templates/stages.yml' 29 | - '/templates/job/ansible/lint.yml' 30 | 31 | # No playbook in this repo 32 | ansible-syntax-check: 33 | rules: 34 | - when: never 35 | 36 | # For Ansible Galaxy Scoring 37 | # https://galaxy.ansible.com/docs/contributing/content_scoring.html 38 | yaml-lint: 39 | image: 40 | name: cytopia/yamllint:1.26 41 | entrypoint: ["/bin/sh", "-c"] 42 | stage: lint 43 | before_script: 44 | - yamllint --version 45 | script: 46 | - ls **/*.yml 47 | - yamllint -c .yamllint.yml -f colored . 48 | rules: 49 | - if: '$CI_PIPELINE_SOURCE == "push"' 50 | changes: 51 | - "**/*.yml" 52 | 53 | galaxy-lint: 54 | extends: ansible-lint 55 | before_script: 56 | - ansible-lint --version 57 | script: 58 | - ansible-lint **/*.yml 59 | rules: 60 | - if: '$CI_PIPELINE_SOURCE == "push"' 61 | changes: 62 | - "**/*.yml" 63 | -------------------------------------------------------------------------------- /roles/ynh_backup/tasks/backup.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | - name: Fail if variables are not used correctly 21 | ansible.builtin.fail: 22 | msg: You need to define variable ynh_backup.apps and / or ynh_backup.system to True 23 | when: ynh_backup.apps | default(True) is false and ynh_backup.system | default(True) is false 24 | tags: backup 25 | 26 | - name: Create backup folder if doesn't already exist 27 | ansible.builtin.file: 28 | path: "{{ ynh_backup.directory }}" 29 | state: directory 30 | mode: '0750' 31 | when: ynh_backup.directory is defined 32 | tags: backup 33 | 34 | - name: Create backup script 35 | ansible.builtin.template: 36 | src: "{{ ynh_backup_src_script }}" 37 | dest: "{{ ynh_backup_dest_script }}" 38 | owner: root 39 | group: root 40 | mode: '0740' 41 | tags: backup 42 | 43 | - name: Create cron task to schedule YNH backup script 44 | ansible.builtin.cron: 45 | name: "auto-backup to {{ ynh_backup.directory | default(_ynh_backup_directory) }}" 46 | month: "{{ ynh_backup.scheduled_month | default('*') }}" 47 | weekday: "{{ ynh_backup.scheduled_weekday | default('*') }}" 48 | hour: "{{ ynh_backup.scheduled_hour | default('1') }}" 49 | minute: "{{ ynh_backup.scheduled_minute | default('0') }}" 50 | user: root 51 | job: "{{ ynh_backup_dest_script }}" 52 | cron_file: ynh_backup_cron 53 | tags: backup 54 | -------------------------------------------------------------------------------- /roles/ynh_apps/tasks/app.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | 21 | # Installation part 22 | - name: Install yunohost apps 23 | ansible.builtin.command: yunohost app install {{ ynh_app.link }} \ 24 | --label "{{ ynh_app.label }}" \ 25 | --args "{% for key, value in ynh_app.args.items() %}{{ key }}={{ value }}{% if not loop.last %}&{% endif %}{% endfor %}" 26 | changed_when: False 27 | tags: apps 28 | 29 | # Post-installation part 30 | - name: Create post-install template 31 | ansible.builtin.template: 32 | src: "{{ item.src }}" 33 | dest: "{{ item.dest }}" 34 | owner: "{{ item.owner | default(ynh_app.link) }}" 35 | group: "{{ item.group | default('www-data') }}" 36 | mode: "{{ (item.type == 'script') | ternary('740', '660') }}" 37 | loop: "{{ ynh_app.post_install|default([]) }}" 38 | when: ynh_app.post_install 39 | tags: apps 40 | 41 | - name: Launch post-install script 42 | ansible.builtin.command: "{{ ynh_app_post_install.dest }}" 43 | args: 44 | chdir: /tmp/ 45 | loop: "{{ ynh_app.post_install|default([]) }}" 46 | loop_control: 47 | loop_var: ynh_app_post_install 48 | when: ynh_app_post_install.type == "script" 49 | tags: apps 50 | 51 | - name: Remove script after execution 52 | ansible.builtin.file: 53 | path: "{{ ynh_app_post_install.dest }}" 54 | state: absent 55 | loop: "{{ ynh_app.post_install|default([]) }}" 56 | loop_control: 57 | loop_var: ynh_app_post_install 58 | when: ynh_app_post_install.type == "script" 59 | tags: apps 60 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![](https://img.shields.io/liberapay/receives/cchaudier.svg?logo=liberapay)](https://liberapay.com/cchaudier/donate) 2 | [![](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/badges/main/pipeline.svg)](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/pipelines) 3 | [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0) 4 | [![Ansible Collection](https://img.shields.io/ansible/collection/1838)](https://galaxy.ansible.com/lydra/yunohost) 5 | [![GitHub last commit](https://img.shields.io/github/last-commit/LydraFr/ansible-yunohost)](https://github.com/LydraFr/ansible-yunohost) 6 | [![GitHub Release Date](https://img.shields.io/github/release-date/LydraFr/ansible-yunohost)](https://github.com/LydraFr/ansible-yunohost) 7 | [![GitHub Repo stars](https://img.shields.io/github/stars/LydraFr/ansible-yunohost?style=social)](https://github.com/LydraFr/ansible-yunohost) 8 | 9 | # Ansible Collection - `lydra.yunohost` 10 | 11 | [🇫🇷 French version](README-FR.md) (only on [GitHub](https://github.com/LydraFr/ansible-yunohost/blob/main/README-FR.md)) 12 | 13 | This collection aims at installing, configuring and backing up [Yunohost](https://yunohost.org/#/). 14 | As this is an independent collection, it can be released on its own release cadence. Moreover, the roles it contains are updated independently. 15 | 16 | # Prerequisites 17 | 18 | Your server must be Debian-Buster based and Yunohost shouldn't be already installed. 19 | 20 | ## Collection contents 21 | 22 | ### Roles 23 | 24 | - [`lydra.yunohost.ynh_setup`](roles/ynh_setup/README.md): This role prepares servers with Debian-Buster-based to run Yunohost. It sets up Yunohost with its initial settings and domains, users and apps of your choice. 25 | - [`lydra.yunohost.ynh_apps`](roles/ynh_apps/README.md): This role installs Yunohost apps of your choice and can perform post-install tasks. 26 | - [`lydra.yunohost.ynh_config`](roles/ynh_config/README.md): This role configures various Yunohost services (SMTP relay, auto updates). 27 | - [`lydra.yunohost.ynh_backup`](roles/ynh_backup/README.md): This role manages the configuration of backups. 28 | 29 | ## Role Tags 30 | 31 | These tags are applicable to roles. 32 | 33 | |tags|comment| 34 | |----|-------| 35 | |pkg|Tasks that install packages.| 36 | |linux|Tasks related to Linux.| 37 | |yunohost|Tasks specific to Yunohost itself (setup or configuration).| 38 | |users|Tasks specific to users in Yunohost.| 39 | |domains|Tasks specific to domains linked to Yunohost.| 40 | |apps|Tasks specific to Yunohost apps.| 41 | |update|Tasks related to Yunohost update settings.| 42 | |smtp|Tasks related to Yunohost smtp relay settings.| 43 | |settings|Tasks related to Yunohost settings.| 44 | |backup|Tasks related to local Yunohost backups.| 45 | |borg|Tasks related to backups with BorgBackup.| 46 | |restic|Tasks related to backups with Restic.| 47 | 48 | ## License 49 | 50 | [![ansible-yunohost Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/) 51 | 52 | **ansible-yunohost** is maintained by [Lydra](https://lydra.fr/) and released under the GPL3 license. 53 | -------------------------------------------------------------------------------- /README-FR.md: -------------------------------------------------------------------------------- 1 | [![](https://img.shields.io/liberapay/receives/cchaudier.svg?logo=liberapay)](https://liberapay.com/cchaudier/donate) 2 | [![](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/badges/main/pipeline.svg)](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/pipelines) 3 | [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0) 4 | [![Ansible Collection](https://img.shields.io/ansible/collection/1838)](https://galaxy.ansible.com/lydra/yunohost) 5 | [![GitHub last commit](https://img.shields.io/github/last-commit/LydraFr/ansible-yunohost)](https://github.com/LydraFr/ansible-yunohost) 6 | [![GitHub Release Date](https://img.shields.io/github/release-date/LydraFr/ansible-yunohost)](https://github.com/LydraFr/ansible-yunohost) 7 | [![GitHub Repo stars](https://img.shields.io/github/stars/LydraFr/ansible-yunohost?style=social)](https://github.com/LydraFr/ansible-yunohost) 8 | 9 | # Collection Ansible - `lydra.yunohost` 10 | 11 | [🇬🇧 English version](README.md) (seulement sur [GitHub](https://github.com/LydraFr/ansible-yunohost/blob/main/README.md)) 12 | 13 | Cette collection vise à installer, configurer et sauvegarder [Yunohost](https://yunohost.org/#/). 14 | Comme il s'agit d'une collection indépendante, elle peut être publiée selon sa propre cadence de publication. De plus, les rôles qu'elle contient sont mis à jour indépendamment. 15 | 16 | ## Prérequis 17 | 18 | Votre serveur doit être basé sur du Debian Buster et Yunohost ne doit pas déjà être installé. 19 | 20 | ## Contenu de la collection 21 | 22 | ### Rôles 23 | 24 | - [`lydra.yunohost.ynh_setup`](roles/ynh_setup/README-FR.md) : Ce rôle prépare les serveurs à base de Debian-Buster à exécuter Yunohost. Il configure Yunohost avec ses paramètres initiaux, les domaines et les utilisateurs de votre choix. 25 | - [`lydra.yunohost.ynh_apps`](roles/ynh_apps/README-FR.md): Ce rôle installe les applications Yunohost de votre choix et peut également les configurer grâce aux tâches de post-installation. 26 | - [`lydra.yunohost.ynh_config`](roles/ynh_config/README-FR.md) : Ce rôle gère la configuration de différents services de Yunohost (relais SMTP, mises à jour automatiques). 27 | - [`lydra.yunohost.ynh_backup`](roles/ynh_backup/README-FR.md) : Ce rôle gère la configuration des sauvegardes. 28 | 29 | ### Tags du rôle 30 | 31 | Ces tags sont applicables suivant les rôles. 32 | 33 | |tags|commentaires| 34 | |----|-------| 35 | |pkg|Tâches d'installation de paquets.| 36 | |linux|Tâches liées à l'OS Linux.| 37 | |yunohost|Tâches spécifiques à Yunohost lui-même (installation ou configuration).| 38 | |users|Tâches spécifiques aux utilisateurs de Yunohost.| 39 | |domains|Tâches spécifiques aux domaines liés à Yunohost.| 40 | |apps|Tâches spécifiques aux applications de Yunohost.| 41 | |update|Tâches liées aux paramètres de mise à jour de Yunohost.| 42 | |smtp|Tâches liées aux paramètres de relais smtp de Yunohost.| 43 | |settings|Tâches liées aux paramètres de Yunohost.| 44 | |backup|Tâches liées aux sauvegardes de Yunohost en local.| 45 | |borg|Tâches liées aux sauvegardes avec BorgBackup.| 46 | |restic|Tâches liées aux sauvegardes avec Restic.| 47 | 48 | ## License 49 | 50 | [![ansible-yunohost Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/) 51 | 52 | **ansible-yunohost** est maintenu par [Lydra](https://lydra.fr/) et publié sous la licence GPL3. 53 | -------------------------------------------------------------------------------- /roles/ynh_setup/README.md: -------------------------------------------------------------------------------- 1 | # Ansible Role: Yunohost 2 | 3 | [🇫🇷 French version](README-FR.md) 4 | 5 | Deploy [Yunohost](https://yunohost.org/#/) with Ansible! 6 | 7 | ## Requirements 8 | 9 | None. 10 | 11 | ## Role Variables 12 | 13 | Default variables are available in `default/main.yml` however it is necessary to override them according to your needs for Yunohost domains, users and apps. 14 | 15 | ### Yunohost Installation 16 | 17 | ```yml 18 | # Debian 10 script only. 19 | ynh_install_script_url: https://install.yunohost.org 20 | 21 | ynh_admin_password: MYINSECUREPWD_PLZ_OVERRIDE_THIS 22 | 23 | ynh_dir: "/data/yunohost" 24 | 25 | ynh_data_dirs: 26 | - path: "{{ ynh_dir }}/etc" 27 | link: "/etc/yunohost" 28 | - path: "{{ ynh_dir }}/var" 29 | link: "/var/www" 30 | - path: "{{ ynh_dir }}/share" 31 | link: "/usr/share/yunohost" 32 | - path: "{{ ynh_dir }}/backup" 33 | link: "/home/yunohost.backup/archives" 34 | - path: "{{ ynh_dir }}/home_apps" 35 | link: "/home/yunohost.app" 36 | ynh_data_dirs_enabled: True 37 | ``` 38 | 39 | - `ynh_install_script_url` The url provided downloads the official Yunohost script for installing Yunohost packages. Yunohost is only available on Debian 10. 40 | - `ynh_admin_password` is the password used to access to the server's administration interface. 41 | 42 | - `ynh_data_dirs.enabled`: Enables symbolic links and allows you to move YunoHost's configuration and data directories wherever you want. By default, this value is set to `True`. We use symbolic links because the `/data` folder is used by us to make _object storage_ backups. 43 | - `ynh_data_dirs.path`: these are the directories where Yunohost configuration data and applications are stored. 44 | - `ynh_data_dirs.link`: this is the directory where symbolic links will be made. 45 | 46 | ### Domain management 47 | 48 | ```yml 49 | # The list of Yunohost domains. 50 | ynh_main_domain: domain.tld 51 | ynh_extra_domains: 52 | - forum.domain.tld 53 | - wiki.domain.tld 54 | ynh_ignore_dyndns_server: False 55 | ``` 56 | 57 | - `ynh_main_domain` is the main domain used by the server's users to access the authentication portal. If you already own a domain name, you probably want to use it here. You can also use a domain in .nohost.me / .noho.st / .ynh.fr (more info [here](https://yunohost.org/en/install/hardware:vps_debian)). 58 | - `ynh_extra_domains` are optional and allow you to install one app per subdomain (more info [here](https://yunohost.org/en/administrate/specific_use_cases/domains/dns_subdomains)). 59 | - `ynh_ignore_dyndns_server` allow to register domains with a Dynamic DNS service (more info [here](https://yunohost.org/en/dns_dynamicip)). 60 | 61 | ### User management 62 | 63 | ```yml 64 | # The list of Yunohost users. 65 | ynh_users: 66 | - name: user1 67 | pass: MYINSECUREPWD_PLZ_OVERRIDE_THIS 68 | fullname: Jane DOE 69 | mail_domain: domain.tld 70 | ``` 71 | 72 | - `ynh_users` is the list of users to create. Each field is mandatory. Some Yunohost applications require that a user be the app administrator. He will then have the right to manage the application from the server administration interface. You can learn more about Yunohost user management [here](https://yunohost.org/en/users). 73 | 74 | ## Dependencies 75 | 76 | None. 77 | 78 | ## Example Playbook 79 | 80 | ```yml 81 | --- 82 | - name: Install Yunohost on Debian Server 83 | hosts: all 84 | become: True 85 | 86 | roles: 87 | - lydra.yunohost.ynh_setup 88 | - lydra.yunohost.ynh_apps 89 | - lydra.yunohost.ynh_config 90 | - lydra.yunohost.ynh_backup 91 | ``` 92 | 93 | ## License 94 | 95 | [![ansible-yunohost Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/) 96 | 97 | **ansible-yunohost** is maintained by [Lydra](https://lydra.fr/) and released under the GPL3 license. 98 | -------------------------------------------------------------------------------- /roles/ynh_setup/README-FR.md: -------------------------------------------------------------------------------- 1 | # Rôle Ansible : Yunohost 2 | 3 | [🇬🇧 English version](README.md) 4 | 5 | Déployez [Yunohost](https://yunohost.org/#/) avec Ansible ! 6 | 7 | ## Prérequis 8 | 9 | Aucun. 10 | 11 | ## Variables du rôle 12 | 13 | Les variables par défaut sont disponibles dans `default/main.yml` cependant il est nécessaire de les surcharger selon vos besoins en termes de domaines, d'utilisateurs et d'applications sur Yunohost. 14 | 15 | ### Installation de Yunohost 16 | 17 | ```yml 18 | # Script pour Debian 10 uniquement. 19 | ynh_install_script_url: https://install.yunohost.org 20 | 21 | ynh_admin_password: MYINSECUREPWD_PLZ_OVERRIDE_THIS 22 | 23 | ynh_dir: "/data/yunohost" 24 | 25 | ynh_data_dirs: 26 | - path: "{{ ynh_dir }}/etc" 27 | link: "/etc/yunohost" 28 | - path: "{{ ynh_dir }}/var" 29 | link: "/var/www" 30 | - path: "{{ ynh_dir }}/share" 31 | link: "/usr/share/yunohost" 32 | - path: "{{ ynh_dir }}/backup" 33 | link: "/home/yunohost.backup/archives" 34 | - path: "{{ ynh_dir }}/home_apps" 35 | link: "/home/yunohost.app" 36 | ynh_data_dirs_enabled: True 37 | ``` 38 | 39 | - `ynh_install_script_url` est l'url du script d'installation des packages Yunohost, par défaut c'est le script officiel. Yunohost ne s'installe que sur Debian 10. 40 | - `ynh_admin_password` est le mot de passe permettant d'accéder à l’interface d’administration du serveur. 41 | 42 | - `ynh_data_dirs.enabled`: active les liens symboliques et permet de déplacer les répertoires de configurations et de données de YunoHost où vous le desirez. Par défaut, cette valeur est à `True`. Nous utilisons les liens symboliques car le dossier `/data` nous sert à faire des sauvegardes de type _object storage_. 43 | - `ynh_data_dirs.path`: il s'agit des répertoires où stocker les données de configuration de Yunohost ainsi que les applications. 44 | - `ynh_data_dirs.link`: il s'agit des répertoire où seront fait les liens symboliques. 45 | 46 | ### Gestion des domaines 47 | 48 | ```yml 49 | # Liste des domaines gérés par Yunohost. 50 | ynh_main_domain: domain.tld 51 | ynh_extra_domains: 52 | - forum.domain.tld 53 | - wiki.domain.tld 54 | ynh_ignore_dyndns_server: False 55 | ``` 56 | 57 | - `ynh_main_domain` correspond au domaine principal qui permet l’accès au serveur ainsi qu’au portail d’authentification des utilisateurs. On peut se contenter d'un nom de domaine qui nous appartient ou en utiliser un en .nohost.me / .noho.st / .ynh.fr (plus d'infos [ici](https://yunohost.org/fr/install/hardware:vps_debian)). 58 | - `ynh_extra_domains` sont des sous-domaines optionnels. Ils permettent d'installer une application par sous-domaine (plus d'infos [ici](https://yunohost.org/fr/dns_subdomains)). 59 | - `ynh_ignore_dyndns_server` permet d'enregistrer les domaines avec un service de DNS dynamique (plus d'infos [ici](https://yunohost.org/fr/dns_dynamicip)). 60 | 61 | ### Gestion des utilisateurs 62 | 63 | ```yml 64 | # Liste des utilisateurs Yunohost. 65 | ynh_users: 66 | - name: user1 67 | pass: MYINSECUREPWD_PLZ_OVERRIDE_THIS 68 | fullname: Jane DOE 69 | mail_domain: domain.tld 70 | ``` 71 | 72 | - `ynh_users` est la liste des utilisateurs à créer. Chaque champ est obligatoire. Certaines applications Yunohost nécessitent qu'un utilisateur soit administrateur de l'application. Il aura ensuite le droit de gérer l'application depuis l'interface l'administration du serveur. Vous pouvez en apprendre plus sur la gestion des utilisateurs Yunohost [ici](https://yunohost.org/fr/administrate/overview/users). 73 | 74 | ## Dépendances 75 | 76 | Aucune. 77 | 78 | ## Exemple de Playbook 79 | 80 | ```yml 81 | --- 82 | - name: Install Yunohost on Debian Server 83 | hosts: all 84 | become: True 85 | 86 | roles: 87 | - lydra.yunohost.ynh_setup 88 | - lydra.yunohost.ynh_apps 89 | - lydra.yunohost.ynh_config 90 | - lydra.yunohost.ynh_backup 91 | ``` 92 | 93 | ## License 94 | 95 | [![ansible-yunohost Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/) 96 | 97 | **ansible-yunohost** est maintenu par [Lydra](https://lydra.fr/) et publié sous la licence GPL3. 98 | -------------------------------------------------------------------------------- /roles/ynh_backup/tasks/borgbackup.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | - name: Download BorgBackup role on localhost 21 | ansible.builtin.command: ansible-galaxy install m3nu.ansible_role_borgbackup,"{{ m3nu_ansible_role_borgbackup_version }}" -p "{{ _ansible_role_directory }}" 22 | delegate_to: localhost 23 | become: False 24 | tags: 25 | - backup 26 | - borg 27 | 28 | - name: Gather facts for BorgBackup role 29 | ansible.builtin.setup: 30 | tags: 31 | - borg 32 | - backup 33 | 34 | - name: Run BorgBackup role 35 | ansible.builtin.import_role: 36 | name: m3nu.ansible_role_borgbackup 37 | tags: 38 | - backup 39 | - borg 40 | 41 | - name: Create backup folder for BorgBackup repository 42 | ansible.builtin.file: 43 | path: "{{ borg_repository }}" 44 | state: directory 45 | mode: '0750' 46 | tags: 47 | - backup 48 | - borg 49 | 50 | - name: Configure host for Borg Remote repository 51 | tags: 52 | - backup 53 | - borg 54 | block: 55 | - name: Deploy SSH public key for BorgBackup 56 | ansible.builtin.copy: 57 | src: "{{ borg_ssh_keys_src }}.pub" 58 | dest: "{{ borg_ssh_keys_dest }}.pub" 59 | owner: "root" 60 | group: "root" 61 | mode: 0600 62 | 63 | - name: Deploy SSH private key for BorgBackup 64 | ansible.builtin.copy: 65 | src: "{{ borg_ssh_keys_src }}.vault" 66 | dest: "{{ borg_ssh_keys_dest }}" 67 | owner: "root" 68 | group: "root" 69 | mode: 0600 70 | when: ynh_borg_backup_remote_repo 71 | 72 | - name: Change SSH command in "/etc/borgmatic/{{ borgmatic_config_name }}" 73 | ansible.builtin.lineinfile: 74 | path: "/etc/borgmatic/{{ borgmatic_config_name }}" 75 | regexp: "# ssh_command: ssh -i ~/.ssh/id_ed25519" 76 | line: "{{ ynh_ssh_borg_command }}" 77 | state: present 78 | when: ynh_ssh_borg_command is defined 79 | tags: 80 | - backup 81 | - borg 82 | 83 | 84 | - name: Change archive name in "/etc/borgmatic/{{ borgmatic_config_name }}" 85 | ansible.builtin.lineinfile: 86 | path: "/etc/borgmatic/{{ borgmatic_config_name }}" 87 | regexp: "archive_name_format:" 88 | line: " archive_name_format: {{ borg_archive_name_format }}" 89 | state: present 90 | tags: 91 | - backup 92 | - borg 93 | 94 | - name: Create borg launch script in /usr/local/bin 95 | ansible.builtin.copy: 96 | content: | 97 | #!/bin/bash 98 | . /opt/borgmatic/bin/activate 99 | borg "$@" 100 | dest: /usr/local/bin/borg 101 | owner: root 102 | group: root 103 | mode: "0755" 104 | tags: 105 | - backup 106 | - borg 107 | 108 | - name: Initialize a new Borg repository 109 | ansible.builtin.command: "{{ borg_init_command }}" 110 | tags: 111 | - backup 112 | - borg 113 | -------------------------------------------------------------------------------- /roles/ynh_apps/README.md: -------------------------------------------------------------------------------- 1 | # Ansible Role: Yunohost Apps 2 | 3 | [🇫🇷 French version](README-FR.md) 4 | 5 | Install [Yunohost](https://yunohost.org/#/) apps with Ansible! 6 | You can find the list of available Yunohost applications [here](https://yunohost.org/en/apps). 7 | 8 | ## Requirements 9 | 10 | None. 11 | 12 | ## Role Variables 13 | 14 | Default variables are available in `default/main.yml` however it is necessary to override them according to your needs for Yunohost domains, users and apps. 15 | 16 | ### App management 17 | 18 | ```yml 19 | # The list of Yunohost apps. 20 | ynh_apps: 21 | - label: WikiJS 22 | link: wikijs 23 | args: 24 | domain: wiki.domain.tld 25 | path: / 26 | admin: user1 27 | is_public: no 28 | - label: Discourse 29 | link: discourse 30 | args: 31 | domain: forum.domain.tld 32 | path: / 33 | admin: user1 34 | is_public: yes 35 | post_install: 36 | - src: "templates/site_settings.yml.j2" 37 | dest: "/var/www/discourse/config/site_settings.yml" 38 | type: "config" 39 | 40 | - src: "templates/configure_discourse.sh.j2" 41 | dest: "/tmp/configure_discourse.sh" 42 | type: "script" 43 | owner: root 44 | group: root 45 | ``` 46 | 47 | - `ynh_apps` is the list of applications to install. 48 | - `label` allows you to give a custom name to the application on the user interface. 49 | - `link` is the name of the Yunohost application to install. 50 | 51 | #### About the arguments 52 | 53 | - `domain` is essential. You have to choose one of the domains of your Yunohost instance. 54 | - `path` is required. You have to choose a URL to access your application like `domain.tld/my_app`. Just use `/` if the application is to be installed on a subdomain. 55 | - `is_public` argument is a common one. Set to `yes`, the application will be accessible to everyone, even without authentication to the Yunohost SSO portal. Set to `no`, the application will only be accessible after authentication from the YunoHost SSO. Finally, if the application has an API that can be called, whether the `is_public` argument is set to `yes` or `no` makes no difference. API calls are not blocked by YunoHost SSO but still require token authentication if the application requires it. 56 | 57 | For the other arguments, you have to refer to the `manifest.json` available in the repository of the Yunohost application you install. You can learn more about this part [here](https://yunohost.org/fr/packaging_apps_manifest). 58 | 59 | #### About the post-installation 60 | 61 | It is possible to complete the installation of applications by adding jinja template configuration files or scripts written by yourself. 62 | To enable this feature, define the `post_install` variable which corresponds to the list of post-installation files of your applications. 63 | Because this task uses the template module, you can use your own variables and call them in your template files. To know more about this module, click [here](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_module.html). 64 | 65 | - `src` is mandatory. This is the directory where the template file is located on the machine running Ansible. 66 | - `dest` is mandatory. This is the directory where the template file will be stored. 67 | - `type` is mandatory: 68 | - If you specify `script` as the value, then the template file will have 740 rights. It will be executed after it is transferred to the Yunohost server (usually in `/tmp/`) and then deleted. 69 | - If you specify `config` as the value, then the template file will have 660 rights. It will be transferred to the Yunohost server (usually in `/var/www/AppName/`) and after you could import it with a shell script on the side for example. 70 | 71 | For `owner` and `group`, by default the file will take as owner the name of the application and as owner www-data(NGINX group). You can change them by specifying different values. 72 | 73 | ## Dependencies 74 | 75 | None. 76 | 77 | ## Example Playbook 78 | 79 | ```yml 80 | --- 81 | - name: Install Yunohost apps 82 | hosts: all 83 | become: True 84 | 85 | roles: 86 | - lydra.yunohost.ynh_apps 87 | ``` 88 | 89 | ## License 90 | 91 | [![ansible-yunohost Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/) 92 | 93 | **ansible-yunohost** is maintained by [Lydra](https://lydra.fr/) and released under the GPL3 license. 94 | -------------------------------------------------------------------------------- /roles/ynh_setup/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #-----------------------------------------------------------------------------# 3 | # ansible-yunohost allows to deploy Yunohost using Ansible # 4 | # Copyright 2021-present Lydra https://www.lydra.fr/ # 5 | # # 6 | # this program is free software: you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation, either version 3 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # this program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program. If not, see . # 18 | # # 19 | #-----------------------------------------------------------------------------# 20 | - name: Update all packages and index 21 | ansible.builtin.apt: 22 | upgrade: dist 23 | update_cache: yes 24 | tags: 25 | - pkg 26 | - linux 27 | 28 | - name: Install requirements 29 | ansible.builtin.apt: 30 | name: 31 | - git 32 | - dialog 33 | state: present 34 | tags: 35 | - pkg 36 | - linux 37 | 38 | - name: Create backup directory 39 | ansible.builtin.file: 40 | path: "/home/yunohost.backup/archives" 41 | state: directory 42 | mode: "0755" 43 | tags: 44 | - linux 45 | when: ynh_data_dirs_enabled 46 | 47 | - name: Create data and config subdirs of Yunohost 48 | ansible.builtin.file: 49 | path: "{{ item.path }}" 50 | state: directory 51 | mode: "0755" 52 | with_items: 53 | - "{{ ynh_data_dirs }}" 54 | tags: 55 | - linux 56 | - yunohost 57 | when: ynh_data_dirs_enabled 58 | 59 | - name: Create symbolic links for Yunohost subdirs 60 | ansible.builtin.file: 61 | src: "{{ item.path }}" 62 | dest: "{{ item.link }}" 63 | state: link 64 | force: yes 65 | with_items: 66 | - "{{ ynh_data_dirs }}" 67 | tags: 68 | - linux 69 | - yunohost 70 | when: ynh_data_dirs_enabled 71 | 72 | - name: Test if Yunohost is already installed 73 | ansible.builtin.stat: path=/etc/yunohost/installed 74 | register: ynh_file_install 75 | tags: 76 | - yunohost 77 | 78 | - name: Download Yunohost install script 79 | ansible.builtin.get_url: 80 | url: "{{ ynh_install_script_url }}" 81 | dest: /tmp/install_yunohost.sh 82 | mode: 700 83 | when: not ynh_file_install.stat.exists 84 | tags: 85 | - yunohost 86 | 87 | - name: Launch Yunohost install script 88 | ansible.builtin.command: /tmp/install_yunohost.sh -a 89 | when: not ynh_file_install.stat.exists 90 | tags: 91 | - yunohost 92 | 93 | - name: Launch Yunohost postinstall 94 | ansible.builtin.command: 95 | yunohost tools postinstall \ 96 | --domain "{{ ynh_main_domain }}" \ 97 | --password "{{ ynh_admin_password }}" \ 98 | {% if ynh_ignore_dyndns_server %} --ignore-dyndns {% endif %} 99 | when: not ynh_file_install.stat.exists 100 | tags: 101 | - yunohost 102 | 103 | - name: Create extra domains 104 | ansible.builtin.include_tasks: domains.yml 105 | when: ynh_extra_domains 106 | tags: 107 | - yunohost 108 | - domains 109 | 110 | - name: Run first Yunohost diagnosis 111 | ansible.builtin.command: yunohost diagnosis run 112 | when: not ynh_file_install.stat.exists 113 | tags: 114 | - yunohost 115 | 116 | - name: Install domain certificates 117 | ansible.builtin.command: yunohost domain cert-install 118 | changed_when: False 119 | tags: 120 | - yunohost 121 | 122 | - name: Add Yunohost users 123 | ansible.builtin.include_tasks: users.yml 124 | when: ynh_users 125 | tags: 126 | - yunohost 127 | - users 128 | -------------------------------------------------------------------------------- /roles/ynh_apps/README-FR.md: -------------------------------------------------------------------------------- 1 | # Rôle Ansible : Yunohost Apps 2 | 3 | [🇬🇧 English version](README.md) 4 | 5 | Installez les applications [Yunohost](https://yunohost.org/#/) avec Ansible ! 6 | Retrouvez la liste des applications Yunohost [ici](https://yunohost.org/fr/applications/catalog). 7 | 8 | ## Prérequis 9 | 10 | Aucun. 11 | 12 | ## Variables du rôle 13 | 14 | Les variables par défaut sont disponibles dans `default/main.yml` cependant il est nécessaire de les surcharger selon vos besoins en termes de domaines, d'utilisateurs et d'applications sur Yunohost. 15 | 16 | ### Gestion des applications 17 | 18 | ```yml 19 | # Liste des applications Yunohost. 20 | ynh_apps: 21 | - label: WikiJS 22 | link: wikijs 23 | args: 24 | domain: wiki.domain.tld 25 | path: / 26 | admin: user1 27 | is_public: no 28 | - label: Discourse 29 | link: discourse 30 | args: 31 | domain: forum.domain.tld 32 | path: / 33 | admin: user1 34 | is_public: yes 35 | post_install: 36 | - src: "templates/site_settings.yml.j2" 37 | dest: "/var/www/discourse/config/site_settings.yml" 38 | type: "config" 39 | 40 | - src: "templates/configure_discourse.sh.j2" 41 | dest: "/tmp/configure_discourse.sh" 42 | type: "script" 43 | owner: root 44 | group: root 45 | ``` 46 | 47 | - `ynh_apps` est la liste des applications à installer. 48 | - `label` permet de donner un nom personnalisé à l'application sur l'interface utilisateur. 49 | - `link` correspond au nom de l'application Yunohost qu'on veut installer. 50 | 51 | #### Concernant les arguments 52 | 53 | - `domain` est obligatoire. Il faut choisir un des domaines de son instance Yunohost. 54 | - `path` est obligatoire. Il faut choisir une URL pour accéder à son application comme `domain.tld/my_app`. Utilisez juste `/` si l'application doit s'installer sur un sous-domaine. 55 | - `is_public` est un argument qu'on retrouve souvent. Paramétré sur `yes`, l'application sera accessible à tout le monde, même sans authentification sur le portail SSO Yunohost. Paramétré sur `no`, l'application ne sera accessible qu'après authentification depuis le SSO YunoHost. Enfin, si l'application a une API qu'on peut interroger, que l'argument `is_public` soit sur `yes` ou `no` ne change rien. Les appels API ne sont pas bloqués par le SSO YunoHost mais nécessitent toujours une authentification par token si l'application le requiert. 56 | 57 | Pour les autres arguments, il faut se référer au `manifest.json` disponible dans le dépôt de l'application Yunohost qu'on installe. Vous pouvez en apprendre plus sur cette partie [ici](https://yunohost.org/fr/packaging_apps_manifest). 58 | 59 | #### Concernant la post-installation 60 | 61 | Il est possible de compléter l'installation des applications par l'ajout de templates jinja de configuration ou de scripts que vous aurez écrit de votre côté. 62 | Pour activer cette fonctionnalité, définissez la variable `post_install` qui correspond à la liste des fichiers de post-installation de votre application. 63 | Cette tâche utilisant le module template, vous pouvez tout à fait utiliser vos propres variables et les appeler dans vos fichiers de template. Pour en savoir sur ce module, cliquez [ici](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_module.html). 64 | 65 | - `src` est obligatoire. Il s'agit du répertoire où le fichier de template se situe sur la machine qui execute Ansible. 66 | - `dest` est obligatoire. Il s'agit du répertoire où le fichier de template va être stocké. 67 | - `type` est obligatoire : 68 | - Si vous précisez comme valeur `script` alors le fichier de template aura pour droits 740. Il sera exécuté après son transfert sur le serveur Yunohost (généralement dans `/tmp/`) puis il sera supprimé. 69 | - Si vous précisez comme valeur `config` alors le fichier de template aura pour droits 660. Il sera transféré sur le serveur Yunohost (généralement dans `/var/www/AppName/`) et vous pourrez l'importer avec un script shell à côté par exemple. 70 | 71 | Pour `owner` et `group`, par défaut le fichier va prendre comme utilisateur propriétaire le nom de l'application et comme groupe propriétaire www-data (groupe NGINX). Vous pouvez les changer en précisant des valeurs différentes. 72 | 73 | ## Dépendances 74 | 75 | Aucune. 76 | 77 | ## Exemple de Playbook 78 | 79 | ```yml 80 | --- 81 | - name: Install Yunohost apps 82 | hosts: all 83 | become: True 84 | 85 | roles: 86 | - lydra.yunohost.ynh_apps 87 | ``` 88 | 89 | ## License 90 | 91 | [![ansible-yunohost Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/) 92 | 93 | **ansible-yunohost** est maintenu par [Lydra](https://lydra.fr/) et publié sous la licence GPL3. 94 | -------------------------------------------------------------------------------- /roles/ynh_config/README.md: -------------------------------------------------------------------------------- 1 | # Ansible Role: Yunohost 2 | 3 | [🇫🇷 French version](README-FR.md) 4 | 5 | Deploy [Yunohost](https://yunohost.org/#/) with Ansible! 6 | 7 | ## Requirements 8 | 9 | None. 10 | 11 | ## Role Variables 12 | 13 | Default variables are available in `default/main.yml` however it is necessary to override them according to your needs for Yunohost domains, users and apps. 14 | 15 | ### SMTP relay configuration 16 | 17 | ```yml 18 | ynh_smtp_relay: 19 | host: smtp.domain.tld 20 | port: 25 21 | user: user1 22 | password: Pa$$w0rd 23 | ``` 24 | 25 | There is a built-in SMTP server on Yunohost but you can also set up Yunohost to use a SMTP relay instead. 26 | In order to do so, create the `ynh_smtp_relay` variable in order to provide your own values. You can learn more about SMTP relay [here](https://yunohost.org/en/administrate/specific_use_cases/email_relay). 27 | 28 | ### Updates configuration 29 | 30 | ```yml 31 | # Autoupdate Yunohost and its apps 32 | ynh_autoupdate: 33 | scheduled: True 34 | special_time: "daily" #Choices are [annually,daily,hourly,monthly,reboot,weekly,yearly] 35 | apps: True 36 | system: True 37 | dest_script: "/usr/bin/" 38 | ``` 39 | 40 | A cron job can been set up to automate the check for system and application updates on a schedule of your choice. 41 | 42 | - `ynh_autoupdate.scheduled` : enables the cron job by setting the value to `True`. 43 | - `ynh_autoupdate.special_time`: it is mandatory. It allows you to specify when you want this task to be executed. Possible values: (`annually`,`daily`,`hourly`,`monthly`,`reboot`,`weekly`,`yearly`). To learn more about special times, click [here](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/cron_module.html). 44 | - `ynh_autoupdate.apps`: is mandatory. Enables automatic updating of Yunohost applications by setting the value to `True`. 45 | - `ynh_autoupdate.system`: is mandatory. Enables automatic updating of the Yunohost system by setting the value to `True`. 46 | - `ynh_autoupdate.dest_script`: it is the path to the directory where the update script will be installed on the server. The default value is `/usr/local/bin`. The script is named `ynh_autoupdate.sh`. 47 | 48 | If available, updates are done automatically. In case of problems following an application update, you can read logs located in `/var/log/yunohost/categories/operation` . You also have the possibility to rollback to the previous version since Yunohost always makes an automatic backup of an application when it is updated. 49 | 50 | To learn more about how updates work in Yunohost you can go [here](https://yunohost.org/fr/update). The changelog of Yunohost versions is also available [here](https://forum.yunohost.org/tag/ynh_release). 51 | 52 | ### YunoHost options 53 | 54 | ```yml 55 | ynh_settings: 56 | security.ssh.port: "22" 57 | security.password.passwordless_sudo: "true" 58 | ``` 59 | 60 | #### SSH port modification 61 | 62 | Among the settings offered in YunoHost, it is possible to change the SSH port using the `security.ssh.port` variable. By modifying the variable, YunoHost will make the appropriate changes to fail2ban and YunoHost's internal firewall. 63 | If your YunoHost instance is behind an application or cloud provider specific firewall, you will also need to open the appropriate security group and remember to enter the SSH port in use (e.g. `ssh -p 812 username@hostname`). You can also externalize this configuration in an SSH configuration file (more info [here](https://linuxize.com/post/using-the-ssh-config-file/)). Finally, you can indicate this configuration in your inventory file otherwise Ansible will not be able to connect to your server. (more info [here](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-handle-different-machines-needing-different-user-accounts-or-ports-to-log-in-with)). 64 | 65 | ### Using sudo without password 66 | 67 | Starting with Yunohost 11.1, a new administrator group is created on the instance. This is a Unix group that is integrated with YunoHost and its LDAP. All users in this group will have access to the YunoHost online administration console but will also be able to connect via SSH and use the sudo command (to temporarily take root rights). 68 | By default, the user must type their password to use the sudo command but it is possible to disable this check from the web interface (`tools` > `YunoHost settings` > `Allow admins to use ‘sudo’ without re-typing their passwords`) or by changing the `security.password.passwordless_sudo` variable to `true` in your Ansible variables file. More information available [here](https://forum.yunohost.org/t/yunohost-11-1-release-sortie-de-yunohost-11-1/23378#passwordless-sudo-4). 69 | 70 | 71 | #### Extra settings 72 | 73 | You can provide extra parameters to the variable `ynh_settings`. To know more, use the command `yunohost settings list`. 74 | 75 | ## Dependencies 76 | 77 | None. 78 | 79 | ## Example Playbook 80 | 81 | ```yml 82 | --- 83 | - name: Configure Yunohost on Debian Server 84 | hosts: all 85 | become: True 86 | 87 | roles: 88 | - lydra.yunohost.ynh_config 89 | ``` 90 | 91 | ## License 92 | 93 | [![ansible-yunohost Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/) 94 | 95 | **ansible-yunohost** is maintained by [Lydra](https://lydra.fr/) and released under the GPL3 license. 96 | -------------------------------------------------------------------------------- /roles/ynh_config/README-FR.md: -------------------------------------------------------------------------------- 1 | # Rôle Ansible : Yunohost Configuration 2 | 3 | [🇬🇧 English version](README.md) 4 | 5 | Configurez [Yunohost](https://yunohost.org/#/) avec Ansible ! 6 | 7 | ## Prérequis 8 | 9 | Yunohost doit déjà être installé sur votre serveur. 10 | 11 | ## Variables du rôle 12 | 13 | Les variables par défaut sont disponibles dans `default/main.yml` cependant il est possible de les surcharger selon vos besoins. 14 | 15 | ### Configuration d'un relais SMTP 16 | 17 | ```yml 18 | ynh_smtp_relay: 19 | host: smtp.domain.tld 20 | port: 25 21 | user: user1 22 | password: Pa$$w0rd 23 | ``` 24 | 25 | Yunohost possède son propre serveur SMTP natif mais il est aussi possible de configurer Yunohost pour qu'il utilise un relais SMTP à la place. 26 | Pour faire cela, créez la variable `ynh_smtp_relay` pour y mettre vos propres valeurs. Vous pouvez en apprendre plus sur les relais SMTP [ici](https://yunohost.org/fr/administrate/specific_use_cases/email_relay). 27 | 28 | ### Configuration des mises à jour 29 | 30 | ```yml 31 | # Autoupdate Yunohost and its apps 32 | ynh_autoupdate: 33 | scheduled: True 34 | special_time: "daily" #Choices are [annually,daily,hourly,monthly,reboot,weekly,yearly] 35 | apps: True 36 | system: True 37 | dest_script: "/usr/bin/" 38 | ``` 39 | 40 | Une tâche cron peut être mise en place pour automatiser la vérification des mises à jour système et applications suivant la périodicité de votre choix. 41 | 42 | - `ynh_autoupdate.scheduled` : activez la tâche cron en mettant la valeur à `True`. 43 | - `ynh_autoupdate.special_time`: est obligatoire. Elle permet de préciser quand vous souhaitez que cette tâche soit exécutée. Valeurs possibles : (`annually`,`daily`,`hourly`,`monthly`,`reboot`,`weekly`,`yearly`). Pour en savoir plus sur les _special times_, cliquez [ici](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/cron_module.html). 44 | - `ynh_autoupdate.apps` : est obligatoire. Activez la mise à jour automatique des applications Yunohost en mettant la valeur à `True`. 45 | - `ynh_autoupdate.system` : est obligatoire. Activez la mise à jour automatique du système Yunohost en mettant la valeur à `True`. 46 | - `ynh_autoupdate.dest_script` : c'est le chemin du répertoire où le script de mise à jour sera installé sur le serveur. La valeur par défaut est `/usr/local/bin`. Le script s'appelle `ynh_autoupdate.sh`. 47 | 48 | Si des mises à jour sont disponibles, elles sont faites automatiquement. En cas de problème suite à la mise à jour d'une application, vous pouvez lire les logs qui sont disponibles ici `/var/log/yunohost/categories/operation`. Vous avez aussi la possibilité de revenir à la version précédente car Yunohost fait toujours une sauvegarde automatique d'une application lorsqu'elle est mise à jour. 49 | 50 | Pour en savoir plus sur le fonctionnement des mises à jour dans Yunohost vous pouvez vous rendre [ici](https://yunohost.org/fr/update). Le changelog des versions de Yunohost est aussi disponible [ici](https://forum.yunohost.org/tag/ynh_release). 51 | 52 | ### Options de YunoHost 53 | 54 | ```yml 55 | ynh_settings: 56 | security.ssh.port: "22" 57 | security.password.passwordless_sudo: "true" 58 | ``` 59 | 60 | #### Modification du port SSH 61 | 62 | Parmi les paramètres proposés dans YunoHost, il est possible de modifier le port SSH à l'aide de la variable `security.ssh.port`. En modifiant la variable, YunoHost va effectuer les changements appropriés pour fail2ban et le firewall interne de YunoHost. 63 | Si votre instance YunoHost est derrière un firewall applicatif ou propre à votre fournisseur cloud, il faudra également ouvrir le groupe de sécurité approprié et ne pas oublier de renseigner le port SSH utilisé (par exemple `ssh -p 812 username@hostname`). Vous pouvez également externaliser cette configuration vers un fichier de configuration SSH (plus d'infos [ici](https://linuxize.com/post/using-the-ssh-config-file/)). Vous pouvez enfin indiquer cette configuration dans votre fichier d'inventaire sinon Ansible ne pourra plus se connecter à votre serveur. (plus d'infos [ici](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-handle-different-machines-needing-different-user-accounts-or-ports-to-log-in-with)). 64 | 65 | ### Utilisation de sudo sans mot de passe 66 | 67 | À partir de Yunohost 11.1, un nouveau groupe d'administrateurs est créé sur l'instance. Il s'agit d'un groupe Unix qui est intégré à YunoHost et son LDAP. Tous les utilisateurs dans ce groupe auront accès à la console d'administration en ligne YunoHost mais pourront aussi se connecter en SSH et utiliser la commande sudo (pour prendre temporairement les droits root). 68 | Par défaut, l'utilisateur doit taper son mot de passe pour utiliser la commande sudo mais il est possible de désactiver cette vérification depuis l'interface web (`outils` > `Paramètres de YunoHost` > `Permettre aux administrateurs d'utiliser 'sudo' sans retaper leur mot de passe`) ou en modifiant la variable `security.password.passwordless_sudo` à `true` dans votre fichier de variables Ansible. Plus d'informations disponibles [ici](https://forum.yunohost.org/t/yunohost-11-1-release-sortie-de-yunohost-11-1/23378#sudo-sans-mot-de-passe-16). 69 | 70 | #### Paramètres supplémentaires 71 | 72 | Vous pouvez fournir des paramètres supplémentaires à la variable `ynh_settings`. Pour en savoir plus, utilisez la commande `yunohost settings list`. 73 | 74 | ## Dépendances 75 | 76 | Aucune. 77 | 78 | ## Exemple de Playbook 79 | 80 | ```yml 81 | --- 82 | - name: Configure Yunohost on Debian Server 83 | hosts: all 84 | become: True 85 | 86 | roles: 87 | - lydra.yunohost.ynh_config 88 | ``` 89 | 90 | ## License 91 | 92 | [![ansible-yunohost Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/) 93 | 94 | **ansible-yunohost** est maintenu par [Lydra](https://lydra.fr/) et publié sous la licence GPL3. 95 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # lydra.yunohost Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), 7 | and the commits message follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). 8 | 9 | ## [[1.1.4] - 2023-03-14](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/releases/1.1.4) 10 | 11 | ### Added 12 | 13 | - [feat(ynh_config): add the possibility to change SSH Port](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/issues/63) 14 | - [refactor(ynh_config): use dict to store all settings](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/issues/95) 15 | 16 | ### Fixed 17 | 18 | - [fix(ynh_backup): fix purging system for YNH backups](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/issues/82) 19 | - [fix: collection badges](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/issues/50) 20 | - [fix(ynh_setup): change user first name / last name to full name](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/issues/96) 21 | - [fix(ynh_config): SMTP enable](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/issues/97) 22 | 23 | ## [[1.1.3] - 2022-12-16](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/releases/1.1.3) 24 | 25 | ### Added 26 | 27 | - In role `ynh_backup`: 28 | - The default version of Ansible Borg role is now v.0.9.4. With this new version, you have the possibility to fix which version of Borg and Borgmatic you want to use but also to choose how does it install those packages. You can check the releases of the role [here](https://github.com/borgbase/ansible-role-borgbackup/releases). 29 | - Updated the readme files. 30 | 31 | ## [[1.1.2] - 2022-12-07](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/releases/1.1.2) 32 | 33 | ### Added 34 | 35 | - In role `ynh_backup`: 36 | - Added Ansible variable `restic_version`. The default version of Restic is 0.14.0, but it can easily be changed by overriding the default value. You can check the releases of Restic [here](https://github.com/restic/restic/releases). 37 | - Updated the readme files. 38 | 39 | - In role `ynh_apps`: 40 | - Updated readme for details about API calls. 41 | 42 | ## [[1.1.1] - 2022-09-05](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/releases/1.1.1) 43 | 44 | ### Added 45 | 46 | - In role `ynh_backup`: 47 | - Added Ansible variable `m3nu_ansible_role_borgbackup_version`. The default version of the role is v0.9.3, but it can easily be changed by overriding the default value. You can check the releases of the role [here](https://github.com/borgbase/ansible-role-borgbackup). 48 | - Updated the readme files. 49 | 50 | - In general readme: 51 | - Added restic tag. 52 | 53 | ### Fixed 54 | 55 | - In role `ynh_backup`: 56 | - Ansible role Borg has been updated to v0.9.3 due to a bug that I discovered. More info [here](https://github.com/borgbase/ansible-role-borgbackup/issues/101). 57 | 58 | ## [[1.1.0] - 2022-08-30](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/releases/1.1.0) 59 | 60 | ### Added 61 | 62 | - In role `ynh_backup`: 63 | - You now have the possibility to use BorgBackup with an [extra Ansible role](https://github.com/borgbase/ansible-role-borgbackup) as well as [Restic](https://github.com/roles-ansible/ansible_role_restic). These are built-in into this role, which means that once configured correctly, Ansible will download the chosen roles and will trigger their tasks. 64 | - In order to use [Restic Ansible role](https://github.com/roles-ansible/ansible_role_restic), you need to install the pip package jmespath. For developers of the collection, it can be installed from the provided Pipfile using the following command: `pipenv install`. 65 | 66 | ### Changed 67 | 68 | - In roles: 69 | - Changed various tasks-related tags. 70 | 71 | - In role `ynh_backup`: 72 | - The `ynh_backup.sh` script now has a pruning function. By default, all local backups older than two days old are automatically deleted when a new backup is being created by the cron task. 73 | - Improved README for the local backups. 74 | 75 | ### Fixed 76 | 77 | - In role `ynh_backup`: 78 | - Only one of `ynh_backup.system` or `ynh_backup.apps` is required. If the user puts var `ynh_backup.system` and `ynh_backup.apps` to False the role throws an error. 79 | 80 | ## [[1.0.4] - 2022-06-27](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/releases/1.0.4) 81 | 82 | ### Added 83 | 84 | - In role `ynh_setup`: 85 | - New symbolic link created by default `/home/yunohost/backup` failed to get created. Added a new task so that the folder is created beforehand and then force the creation of the symbolic link. 86 | 87 | ### Fixed 88 | 89 | - In role `ynh_backup`: 90 | - A WIP version of a dev branch has been uploaded in version 1.0.3. Therefore, `lydra.yunohost` v1.0.3 is malfunctioning and shouldn't be used. This new version contains the right source files from version 1.0.3. 91 | 92 | ## [[1.0.3] - 2022-06-24] 93 | 94 | > ⚠️ Warning: DO NOT USE THIS VERSION, and go to version 1.0.4. Thanks. 95 | 96 | ## [[1.0.2] - 2022-06-22](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/releases/1.0.2) 97 | 98 | ### Added 99 | 100 | - In role `ynh_setup`: 101 | - New symbolic links have been added in `/defaults/main.yml`. You can now define symbolic links for `/usr/share/yunohost`, `/home/yunohost.backup/archives` and `/home/yunohost.app`. 102 | 103 | ### Changed 104 | 105 | - In role `ynh_setup`: 106 | - README.md and README-FR.md have been updated to explain more about the new symbolic links. 107 | 108 | ## [[1.0.1] - 2022-06-02](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/releases/1.0.1) 109 | 110 | ### Added 111 | 112 | - Our Ansible collection is now available on Ansible-Galaxy! 113 | 114 | ### Changed 115 | 116 | - This version provides a minor fix to hypertext links in README files. 117 | 118 | ## [[1.0.0] - 2022-05-23](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/releases/1.0.0) 119 | 120 | ### Added 121 | 122 | - As we grew in terms of added features, we have decided to transform this role into a collection. 123 | - You can now define symbolic links for `/etc/yunohost/` and `/var/www/`. 124 | - You can now create backups for Yunohost core and apps using `ynh_backup` role. 125 | 126 | ### Changed 127 | 128 | - This role is now divided into four roles: `ynh_setup`, `ynh_config`, `ynh_apps`, `ynh_backup`. Each role has its own README so you can easily navigate between them and understand their purpose. 129 | 130 | ### Deprecated 131 | 132 | - Be careful when you upgrade because of the modularity of the different roles. Don't hesitate to read the latest REDME for an example on how to incorporate the roles into a playbook. 133 | 134 | ## [[0.2.0] - 2022-03-31](https://lab.frogg.it/lydra/yunohost/ansible-yunohost/-/releases/0.2.0) 135 | 136 | ### Added 137 | 138 | - Creation of the CHANGELOG. 139 | - CI: Ansible galaxy lint 140 | 141 | ### Deprecated 142 | 143 | - The v1.0.0 will transform this role into an ansible collection. 144 | The roles will be more modular. Be careful when you upgrade to v1.0.0. 145 | 146 | ## [0.1.3] - 2021-11-09 147 | 148 | ### Added 149 | 150 | - Two new tasks have been added for post-install apps feature. During Yunohost application setup you can now add additionnal scripts / configuration files which will be transferred to your Yunohost instance and run if necessary. 151 | 152 | ### Changed 153 | 154 | - README explains how to use apps post-install feature. 155 | 156 | ## [0.1.2] - 2021-10-27 157 | 158 | ### Added 159 | 160 | - SMTP relay settings in Yunohost core can now be changed. This is a new task called `SMTP`. 161 | 162 | ### Changed 163 | 164 | - README explains how to change SMTP relay values using specific variables. 165 | 166 | ## [0.1.1] - 2021-10-21 [YANKED] 167 | 168 | ### Fixed 169 | 170 | - fix default folder name into "defaults" to respect Ansible file architecture. 171 | 172 | ## [0.1.0] - 2021-10-21 173 | 174 | ### Added 175 | 176 | - The first release of the lydra.yunohost role. This role is a fork of two former Ansible roles : and . 177 | - CI: ansible lint and syntax check 178 | - README is present in French and English as well as License info. 179 | -------------------------------------------------------------------------------- /roles/ynh_backup/README.md: -------------------------------------------------------------------------------- 1 | # Ansible Role: YunoHost 2 | 3 | [🇫🇷 French version](README-FR.md) 4 | 5 | Deploy [YunoHost](https://yunohost.org/#/) with Ansible! 6 | 7 | ## Requirements 8 | 9 | YunoHost needs to be installed on your server. 10 | 11 | ## Role Variables 12 | 13 | The default variables are available in `default/main.yml` however it is possible to override them according to your needs. 14 | We have integrated three different backup systems to this YunoHost role: 15 | 16 | - YunoHost native local backups 17 | - Remote backups with a [BorgBackup repository](https://borgbackup.readthedocs.io/en/stable/) 18 | - Remote backups with a [Restic repository](https://restic.readthedocs.io/en/stable/) 19 | 20 | ### YunoHost native local backups 21 | 22 | YunoHost provides its own native backup system. It is able to back up YunoHost configuration, mails (if YunoHost is used as a mail server) and applications installed on YunoHost. It is possible to create and restore backups from the web administration interface as well as from the command line in SSH (`yunohost backup`). Backups are available locally, and we have automated the triggering of these backups. More info [here](https://yunohost.org/en/backup). 23 | 24 | ```yml 25 | ynh_backup: 26 | scheduled: True 27 | directory: "/data/backup/local_ynh_backups" 28 | scheduled_hour: "*" 29 | scheduled_minute: "*/30" 30 | scheduled_weekday: "*" 31 | scheduled_month: "*" 32 | system: True 33 | apps: True 34 | number_days_to_keep: "2" 35 | ``` 36 | 37 | - `ynh_backup.scheduled`: Enable the YunoHost applications backup feature by setting the value to `True`. 38 | - `ynh_backup.directory`: the default backup folder is `/home/yunohost.backup/archives`. 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. 39 | - `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 3am. For more information about cron time settings, this tool can be useful: . 40 | - `ynh_backup.system`: Disable YunoHost system backup by setting the value to `False`, the default value is `True`. 41 | - `ynh_backup.apps`: Disable backup of YunoHost applications by setting the value to `False`, the default is `True`. 42 | - `ynh_backup.number_days_to_keep`: Determines the number of days to keep for the purging system, the default is 2. 43 | - ⚠️ Beware, once you enable the local backup feature `ynh_backup.scheduled`, you cannot disable system **and** application backups. If you set `ynh_backup.system` **and** `ynh_backup.apps` to `False`, the role will fail. 44 | 45 | ### remote backups with YunoHost BorgBackup 46 | 47 | - Backups with [BorgBackup](https://borgbackup.readthedocs.io/en/stable/) and [Borgmatic](https://github.com/witten/borgmatic): Thanks to the Ansible role `m3nu.ansible_role_borgbackup` we can automate the installation and configuration process of Borg Backup on a YunoHost server. Borg backups are accessible on a local or a remote Borg repository. More info about this role [here](https://github.com/borgbase/ansible-role-borgbackup). 48 | 49 | ```yml 50 | ynh_borg_backup_scheduled: True 51 | m3nu_ansible_role_borgbackup_version: "v0.9.4" 52 | borg_source_directories: "{{ ynh_backup.directory }}" 53 | borg_repository: "/data/backup/borg_repository" 54 | borg_encryption_passphrase: "PLEASECHANGEME" 55 | borgmatic_config_name: "borgmatic_ynh_config" 56 | borgmatic_cron_name: "borgmatic_ynh_cron" 57 | borg_retention_policy: 58 | keep_daily: "4" 59 | ynh_borg_backup_remote_repo: True 60 | borg_ssh_keys_src: "files/prd/ssh_keys/ynh_ed25519.vault" 61 | borg_ssh_keys_dest: "/home/debian/.ssh/ynh_ed25519" 62 | ynh_ssh_borg_command: "ssh_command: ssh -p 7410 -o StrictHostKeychecking=no -i {{ borg_ssh_keys_dest }}" 63 | ``` 64 | 65 | - `ynh_borg_backup_scheduled`: Enable / disable the backup feature with BorgBackup. 66 | - `m3nu_ansible_role_borgbackup_version`: Allows you to specify which version of the Borg Backup Ansible role you want to use. The default version of the role is v0.9.4 but you can check the releases of the role [here](https://github.com/borgbase/ansible-role-borgbackup). 67 | - `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. 68 | - `borg_source_directories`: List of source folders to back up. By default, this is the folder in which YunoHost local backups are located. 69 | - `borg_repository`: Full path to the Borg repository. Possibility to give a list of repositories to save data in several places. 70 | - `borg_encryption_passphrase` : **Mandatory**, password to use for the Borg repository encryption key. 71 | - `borgmatic_config_name`: **Optional**, name of the Borgmatic configuration file. 72 | - `borgmatic_cron_name`: **Optional**, name of the cron task file. 73 | - `borg_retention_policy.keep_[hourly|daily|weekly|monthly]`: Allows you to fine-tune the number of recent archives the repository should keep. 74 | - `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. 75 | - `borg_ssh_keys_dest`: Path where the SSH key pair will be copied to the YunoHost server. 76 | - `ynh_ssh_borg_command`: **Optional**, custom SSH command run when using Borg on a remote repository. 77 | 78 | Feel free to look at the variables available in the [role](https://github.com/borgbase/ansible-role-borgbackup). 79 | 80 | ### remote backups with YunoHost Restic 81 | 82 | - Backups with [Restic](https://restic.net/): Thanks to the Ansible role `do1jlr.restic` we can automate the installation and configuration process of Restic on a YunoHost server. Restic backups can be done on a local or a remote Restic repository and compatible with S3 object storage. More info about this role [here](https://github.com/roles-ansible/ansible_role_restic). 83 | 84 | ⚠️ Be careful, in order to use the Ansible role `do1jlr.restic`, you must have the following [packages](https://github.com/roles-ansible/ansible_role_restic#requirements) installed on the machine running Ansible: 85 | 86 | - `bzip2` (binary available on most Linux systems). 87 | - `jmespath` (python package, can be installed through pip). 88 | 89 | ```yml 90 | ynh_restic_backup_scheduled: True 91 | restic_create_schedule: True 92 | restic_keep_time: "0y2m0d0h" 93 | restic_version: "0.14.0" 94 | 95 | restic_repos: 96 | s3_ynh_restic_repo: 97 | location: "s3:s3.fr-par.scw.cloud/dummy_bucket_name" 98 | password: "dummy_restic_repo_password" 99 | aws_access_key: "dummy_access_key" 100 | aws_secret_access_key: "dummy_secret_access_key" 101 | aws_default_region: "fr-par" 102 | init: True 103 | 104 | restic_backups: 105 | YunoHost_remote: 106 | name: "remote_ynh_restic" 107 | repo: "s3_ynh_restic_repo" 108 | src: "{{ ynh_backup.directory }}" 109 | tags: 110 | - yunohost 111 | - remote 112 | keep_within: "{{ restic_keep_time }}" 113 | scheduled: True 114 | schedule_hour: 1 115 | schedule_minute: 0 116 | ``` 117 | 118 | - `ynh_restic_backup_scheduled`: Enable / disable the backup feature with Restic. 119 | - `restic_keep_time`: Allows to fine tune the time period during which snapshots should be kept. The default value is 1 month `0y1m0d0h`. 120 | - `restic_version`: Allows you to specify the version of Restic you want to use. The default version of the role is 0.14.0. You can check Restic versions [here](https://github.com/restic/restic/releases). 121 | - `restic_repos`: Restic keeps data in repositories. You must specify at least one repository to use this role. A repository must have the following variables: 122 | - `location`: **Mandatory**, the path to the repository. This can be a local path (e.g. `/data/backup`) or a path to an S3 bucket (see example above). 123 | - `password`: **Mandatory**, password to use for the Restic repository. 124 | - `init`: Describes whether the repository should be initialized or not. Use `false` if you are using an already initialized Restic repository. 125 | - ⚠️ Beware, if this is an S3 object storage repository, you must provide additional variables for Restic to authenticate and access the cloud provider (see example above). 126 | - `restic_backups`: A backup specifies a directory or file to be backed up. It has the following variables: 127 | - `name` : **Mandatory**, this name of this backup. It must be unique and is used with the __pruning__ and scheduling. 128 | - `repo`: **Mandatory**, the name of the repository where to save the snapshots. This repository should have been declared beforehand (see above for variables to fill in). 129 | - `src` : **Mandatory**, the directory or file to be backed up. 130 | - `tags`: **Optional**, list of tags to add information. 131 | - `keep-within`: Can be used in connection with the `restic_keep_time` variable (in this case, keep this variable as it is) or you can choose a retention period for each backup. 132 | - `scheduled`: Use `true` if you want to set up a cron job to trigger a backup at regular intervals. In correlation with `restic_create_schedule: true` (both need to be set to `true` for the cron task to be created). 133 | - `schedule_[minute|hour|weekday|month]`: Allows you to fine-tune the timing of the cron job. 134 | 135 | Feel free to look at the variables available in the [role](https://github.com/roles-ansible/ansible_role_restic). 136 | 137 | ## Dependencies 138 | 139 | The `m3nu.ansible_role_borgbackup` and `do1jlr.restic` roles will be installed on the machine running Ansible for Borg and Restic related tasks to work. 140 | 141 | ## Example Playbook 142 | 143 | ```yml 144 | --- 145 | - name: Configure YunoHost backups 146 | hosts: all 147 | become: True 148 | 149 | roles: 150 | - lydra.yunohost.ynh_backup 151 | ``` 152 | 153 | ## License 154 | 155 | [![ansible-yunohost Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/) 156 | 157 | **ansible-yunohost** is maintained by [Lydra](https://lydra.fr/) and released under the GPL3 license. 158 | -------------------------------------------------------------------------------- /roles/ynh_backup/README-FR.md: -------------------------------------------------------------------------------- 1 | # Rôle Ansible : YunoHost Backup 2 | 3 | [🇬🇧 English version](README.md) 4 | 5 | Sauvegardez [YunoHost](https://yunohost.org/#/) avec Ansible ! 6 | 7 | ## Prérequis 8 | 9 | YunoHost doit déjà être installé sur votre serveur. 10 | 11 | ## Variables du rôle 12 | 13 | Les variables par défaut sont disponibles dans `default/main.yml` cependant il est possible de les surcharger selon vos besoins. 14 | Nous avons intégré trois systèmes de sauvegardes différents à ce rôle YunoHost : 15 | 16 | - sauvegardes natives YunoHost en local 17 | - sauvegardes à distance avec un [dépôt BorgBackup](https://borgbackup.readthedocs.io/en/stable/) 18 | - sauvegardes à distance avec un [dépôt Restic](https://restic.readthedocs.io/en/stable/) 19 | 20 | ### Sauvegardes natives YunoHost locales 21 | 22 | - Les backups locaux natifs à YunoHost : YunoHost propose son propre système de sauvegardes natif. Il est capable de sauvegarder la configuration YunoHost, les mails (si YunoHost est utilisé en tant que serveur de mails) et les applications installées sur YunoHost. Il est possible de créer et restaurer les sauvegardes depuis l'interface d'administration web ainsi que la ligne de commande en SSH (`yunohost backup`). Les sauvegardes sont disponibles en local et nous avons automatisé le déclenchement de ces sauvegardes par une tâche cron. Plus d'infos [ici](https://yunohost.org/fr/backup). 23 | 24 | ```yml 25 | ynh_backup: 26 | scheduled: True 27 | directory: "/data/backup/local_ynh_backups" 28 | scheduled_hour: "*" 29 | scheduled_minute: "*/30" 30 | scheduled_weekday: "*" 31 | scheduled_month: "*" 32 | system: True 33 | apps: True 34 | number_days_to_keep: "2" 35 | ``` 36 | 37 | - `ynh_backup.scheduled` : active la fonctionnalité de sauvegarde des applications YunoHost en mettant la valeur à `True`. 38 | - `ynh_backup.directory` : le dossier de sauvegarde par défaut est `/home/yunohost.backup/archives`. Vous pouvez choisir de sauvegarder les backups dans un autre dossier grâce à cette variable. Dans ce cas, de manière à pouvoir restaurer les backups depuis l'interface web, YunoHost créé automatiquement un lien symbolique de l'archive créée vers son dossier par défaut. 39 | - `ynh_backup.scheduled_[hour|minute|weekday|month]`: modifie la planification de la tâche cron. Par défaut, elle se déclenchera tous les jours de l'année à 3 heure du matin. Pour plus d'informations concernant les réglages horaires cron, cet outil peut être utile : . 40 | - `ynh_backup.system` : Désactivez la sauvegarde du système YunoHost en mettant la valeur à `False`, la valeur par défaut est à `True`. 41 | - `ynh_backup.apps` : Désactivez la sauvegarde des applications YunoHost en mettant la valeur à `False`, la valeur par défaut est à `True`. 42 | - `ynh_backup.number_days_to_keep` : Détermine le nombre de jours à garder pour le système de purge, la valeur par défaut est 2. 43 | - ⚠️ Attention, à partir du moment où vous activez la fonctionnalité de sauvegarde locale `ynh_backup.scheduled`, vous ne pouvez pas désactiver les sauvegardes système **et** applications. Si vous mettez `ynh_backup.system` **et** `ynh_backup.apps` à `False`, le rôle tombera en erreur. 44 | 45 | ### Sauvegardes distantes avec BorgBackup 46 | 47 | - Les sauvegardes avec [BorgBackup](https://borgbackup.readthedocs.io/en/stable/) et [Borgmatic](https://github.com/witten/borgmatic) : Grâce au rôle Ansible `m3nu.ansible_role_borgbackup`, nous pouvons automatiser le processus d'installation et de configuration de BorgBackup sur un serveur YunoHost. Les sauvegardes Borg sont accessibles sur un dépôt Borg local ou distant. Plus d'info sur ce rôle [ici](https://github.com/borgbase/ansible-role-borgbackup) 48 | 49 | ```yml 50 | ynh_borg_backup_scheduled: True 51 | m3nu_ansible_role_borgbackup_version: "v0.9.4" 52 | borg_source_directories: "{{ ynh_backup.directory }}" 53 | borg_repository: "/data/backup/borg_repository" 54 | borg_encryption_passphrase: "PLEASECHANGEME" 55 | borgmatic_config_name: "borgmatic_ynh_config" 56 | borgmatic_cron_name: "borgmatic_ynh_cron" 57 | borg_retention_policy: 58 | keep_daily: "4" 59 | ynh_borg_backup_remote_repo: True 60 | borg_ssh_keys_src: "files/prd/ssh_keys/ynh_ed25519.vault" 61 | borg_ssh_keys_dest: "/home/debian/.ssh/ynh_ed25519" 62 | ynh_ssh_borg_command: "ssh_command: ssh -p 7410 -o StrictHostKeychecking=no -i {{ borg_ssh_keys_dest }}" 63 | ``` 64 | 65 | - `ynh_borg_backup_scheduled` : Active / désactive la fonctionnalité de sauvegarde avec BorgBackup. 66 | - `m3nu_ansible_role_borgbackup_version` : Vous permet de spécifier la version du rôle Ansible Borg Backup que vous souhaitez utiliser. La version par défaut du rôle est v0.9.4 mais vous pouvez vérifier les versions du rôle [ici](https://github.com/borgbase/ansible-role-borgbackup). 67 | - `ynh_borg_backup_remote_repo` : Active / désactive la fonctionnalité de sauvegarde sur un dépôt distant BorgBackup (tâches liées à la mise en place des clés SSH). Si vous activez cette fonctionnalité, vous aurez besoin d'utiliser les variables `borg_ssh_keys_src` et `borg_ssh_keys_dest`. 68 | - `borg_source_directories` : Liste des dossiers source à sauvegarder. Par défaut, il s'agit du dossier qui contient les sauvegardes faites par YunoHost. 69 | - `borg_repository` : Chemin complet vers le dépôt Borg. Possibilité de donner une liste de dépôts pour sauvegarder les données dans plusieurs endroits. 70 | - `borg_encryption_passphrase` : **Obligatoire**, mot de passe à utiliser pour la clé de chiffrement du dépôt Borg. 71 | - `borgmatic_config_name` : **Optionnel**, nom du fichier de configuration Borgmatic. 72 | - `borgmatic_cron_name` : **Optionnel**, nom du fichier de tâche cron. 73 | - `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. 74 | - `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. 75 | - `borg_ssh_keys_dest` : Chemin où va être copié la paire de clés SSH sur le serveur YunoHost. 76 | - `ynh_ssh_borg_command`: **Optionnel**, commande SSH personnalisée lors de l'utilisation de Borg sur un dépôt distant. 77 | 78 | N'hésitez pas à regarder les variables disponibles dans le [rôle](https://github.com/borgbase/ansible-role-borgbackup). 79 | 80 | ### Sauvegardes distantes avec Restic 81 | 82 | - Les sauvegardes avec [Restic](https://restic.net/) : Grâce au rôle Ansible `do1jlr.restic`, nous pouvons automatiser le processus d'installation et de configuration de Restic sur un serveur YunoHost. Les sauvegardes Restic peuvent être effectuées sur un dépôt Restic en local ou à distance (dépôt compatible stockage objet S3). Plus d'info sur ce rôle [ici](https://github.com/roles-ansible/ansible_role_restic). 83 | 84 | ⚠️ Attention, pour pouvoir utiliser le rôle Ansible `do1jlr.restic`, vous devez avoir les [paquets suivants](https://github.com/roles-ansible/ansible_role_restic#requirements) installés sur la machine qui exécute Ansible : 85 | 86 | - `bzip2` (binaire disponible sur la plupart des systèmes Linux). 87 | - `jmespath` (paquet python, installable avec pip). 88 | 89 | ```yml 90 | ynh_restic_backup_scheduled: True 91 | restic_create_schedule: True 92 | restic_keep_time: "0y2m0d0h" 93 | restic_version: "0.14.0" 94 | 95 | restic_repos: 96 | s3_ynh_restic_repo: 97 | location: "s3:s3.fr-par.scw.cloud/dummy_bucket_name" 98 | password: "dummy_restic_repo_password" 99 | aws_access_key: "dummy_access_key" 100 | aws_secret_access_key: "dummy_secret_access_key" 101 | aws_default_region: "fr-par" 102 | init: True 103 | 104 | restic_backups: 105 | YunoHost_remote: 106 | name: "remote_ynh_restic" 107 | repo: "s3_ynh_restic_repo" 108 | src: "{{ ynh_backup.directory }}" 109 | tags: 110 | - yunohost 111 | - remote 112 | keep_within: "{{ restic_keep_time }}" 113 | scheduled: True 114 | schedule_hour: 1 115 | schedule_minute: 0 116 | ``` 117 | 118 | - `ynh_restic_backup_scheduled` : Active / désactive la fonctionnalité de sauvegarde avec Restic. 119 | - `restic_keep_time` : Permet de régler finement la période de temps durant laquelle les snapshots doivent être conservés. la valeur par défaut est de 1 mois `0y1m0d0h`. 120 | - `restic_version` : Vous permet de spécifier la version de Restic que vous souhaitez utiliser. La version par défaut du rôle est la 0.14.0. Vous pouvez vérifier les versions de Restic [ici](https://github.com/restic/restic/releases). 121 | - `restic_repos`: Restic conserve les données dans des dépôts. Vous devez spécifier au moins un dépôt pour utiliser ce rôle. Un dépôt doit comporter les variables suivantes : 122 | - `location` : **Obligatoire**, le chemin vers le dépôt. Ça peut être un chemin local (par exemple `/data/backup`) ou un chemin vers un bucket S3 (voir l'exemple ci-dessus). 123 | - `password`: **Obligatoire**, mot de passe à utiliser pour le dépôt Restic. 124 | - `init` : Décrit si le dépôt doit être initialisé ou pas. Utilisez `false` si vous utilisez un dépôt Restic déjà initialisé. 125 | - ⚠️ Attention, s'il s'agit d'un dépôt stockage objet S3, vous devez fournir des variables supplémentaires pour que Restic puisse s'authentifier et accéder au fournisseur cloud (voir l'exemple ci-dessus). 126 | - `restic_backups`: Un backup précise un répertoire ou un fichier à sauvegarder. Il comporte les variables suivantes : 127 | - `name` : **Obligatoire**, ce nom de cette sauvegarde. Il doit être unique et est utilisé avec le __pruning__ et la planification. 128 | - `repo` : **Obligatoire**, le nom du dépôt où sauvegarder les snapshots. Ce dépôt devra avoir été déclaré au préalable (voir plus haut pour les variables à renseigner). 129 | - `src` : **Obligatoire**, le répertoire ou le fichier à sauvegarder. 130 | - `tags` : **Optionnel**, liste de tags pour ajouter des informations. 131 | - `keep-within` : Peut être utilisé en relation avec la variable `restic_keep_time` (dans ce cas, gardez la variable telle quelle) ou alors vous pouvez choisir une période de rétention pour chaque sauvegarde. 132 | - `scheduled` : Utilisez `true` si vous souhaitez mettre en place une tâche cron pour le déclenchement d'une sauvegarde à intervalle régulier. En corrélation avec `restic_create_schedule: true` (les deux doivent être à `true` pour que la tâche soit créé). 133 | - `schedule_[minute|hour|weekday|month]` : Permet de régler finement la planification du déclenchement de la tâche cron. 134 | 135 | N'hésitez pas à regarder les variables disponibles dans le [rôle](https://github.com/roles-ansible/ansible_role_restic). 136 | 137 | ## Dépendances 138 | 139 | Le rôle `m3nu.ansible_role_borgbackup` et `do1jlr.restic` seront installés sur la machine exécutant Ansible pour que les tâches liées à Borg et Restic fonctionnent. 140 | 141 | ## Exemple de Playbook 142 | 143 | ```yml 144 | --- 145 | - name: Configure YunoHost backups 146 | hosts: all 147 | become: True 148 | 149 | roles: 150 | - lydra.yunohost.ynh_backup 151 | ``` 152 | 153 | ## License 154 | 155 | [![ansible-yunohost Copyright 2021 Lydra](https://www.gnu.org/graphics/gplv3-with-text-136x68.png)](https://choosealicense.com/licenses/gpl-3.0/) 156 | 157 | **ansible-yunohost** est maintenu par [Lydra](https://lydra.fr/) et publié sous la licence GPL3. 158 | -------------------------------------------------------------------------------- /Pipfile.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_meta": { 3 | "hash": { 4 | "sha256": "2f36b7411c44bd0e4c704aabecb4856c3f7d4bbc7dc99bfef5228f780528ad11" 5 | }, 6 | "pipfile-spec": 6, 7 | "requires": { 8 | "python_version": "3.8" 9 | }, 10 | "sources": [ 11 | { 12 | "name": "pypi", 13 | "url": "https://pypi.org/simple", 14 | "verify_ssl": true 15 | } 16 | ] 17 | }, 18 | "default": { 19 | "ansible": { 20 | "hashes": [ 21 | "sha256:6f67ca5c634e4721d1f8e206dc71d60d1a114d147945355bfc902bd37eb07080" 22 | ], 23 | "index": "pypi", 24 | "version": "==4" 25 | }, 26 | "ansible-core": { 27 | "hashes": [ 28 | "sha256:9159cc3b85e2d115f62f975b5155d96466e2a09a1c2e9b91de0c781f9089fc54" 29 | ], 30 | "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", 31 | "version": "==2.11.12" 32 | }, 33 | "ansible-lint": { 34 | "hashes": [ 35 | "sha256:2160a60b4ab034c04006d701a1779340ffb0f6e28f030ff8de958e1062a88962", 36 | "sha256:fb57755825b50da88c226052772bd843d37714155b504175912daac0e186e8c0" 37 | ], 38 | "index": "pypi", 39 | "version": "==5.4.0" 40 | }, 41 | "bracex": { 42 | "hashes": [ 43 | "sha256:351b7f20d56fb9ea91f9b9e9e7664db466eb234188c175fd943f8f755c807e73", 44 | "sha256:e7b23fc8b2cd06d3dec0692baabecb249dda94e06a617901ff03a6c56fd71693" 45 | ], 46 | "markers": "python_version >= '3.7'", 47 | "version": "==2.3.post1" 48 | }, 49 | "cffi": { 50 | "hashes": [ 51 | "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5", 52 | "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef", 53 | "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104", 54 | "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426", 55 | "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405", 56 | "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375", 57 | "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a", 58 | "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e", 59 | "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc", 60 | "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf", 61 | "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185", 62 | "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497", 63 | "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3", 64 | "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35", 65 | "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c", 66 | "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83", 67 | "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21", 68 | "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca", 69 | "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984", 70 | "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac", 71 | "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd", 72 | "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee", 73 | "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a", 74 | "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2", 75 | "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192", 76 | "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7", 77 | "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585", 78 | "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f", 79 | "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e", 80 | "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27", 81 | "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b", 82 | "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e", 83 | "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e", 84 | "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d", 85 | "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c", 86 | "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415", 87 | "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82", 88 | "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02", 89 | "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314", 90 | "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325", 91 | "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c", 92 | "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3", 93 | "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914", 94 | "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045", 95 | "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d", 96 | "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9", 97 | "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5", 98 | "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2", 99 | "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c", 100 | "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3", 101 | "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2", 102 | "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8", 103 | "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d", 104 | "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d", 105 | "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9", 106 | "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162", 107 | "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76", 108 | "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4", 109 | "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e", 110 | "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9", 111 | "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6", 112 | "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b", 113 | "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01", 114 | "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0" 115 | ], 116 | "version": "==1.15.1" 117 | }, 118 | "commonmark": { 119 | "hashes": [ 120 | "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60", 121 | "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9" 122 | ], 123 | "version": "==0.9.1" 124 | }, 125 | "cryptography": { 126 | "hashes": [ 127 | "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59", 128 | "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596", 129 | "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3", 130 | "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5", 131 | "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab", 132 | "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884", 133 | "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82", 134 | "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b", 135 | "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441", 136 | "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa", 137 | "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d", 138 | "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b", 139 | "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a", 140 | "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6", 141 | "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157", 142 | "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280", 143 | "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282", 144 | "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67", 145 | "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8", 146 | "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046", 147 | "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327", 148 | "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9" 149 | ], 150 | "markers": "python_version >= '3.6'", 151 | "version": "==37.0.4" 152 | }, 153 | "enrich": { 154 | "hashes": [ 155 | "sha256:0a2ab0d2931dff8947012602d1234d2a3ee002d9a355b5d70be6bf5466008893", 156 | "sha256:f29b2c8c124b4dbd7c975ab5c3568f6c7a47938ea3b7d2106c8a3bd346545e4f" 157 | ], 158 | "markers": "python_version >= '3.6'", 159 | "version": "==1.2.7" 160 | }, 161 | "jinja2": { 162 | "hashes": [ 163 | "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852", 164 | "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61" 165 | ], 166 | "markers": "python_version >= '3.7'", 167 | "version": "==3.1.2" 168 | }, 169 | "jmespath": { 170 | "hashes": [ 171 | "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980", 172 | "sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe" 173 | ], 174 | "index": "pypi", 175 | "version": "==1.0.1" 176 | }, 177 | "markupsafe": { 178 | "hashes": [ 179 | "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003", 180 | "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88", 181 | "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5", 182 | "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7", 183 | "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a", 184 | "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603", 185 | "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1", 186 | "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135", 187 | "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247", 188 | "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6", 189 | "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601", 190 | "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77", 191 | "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02", 192 | "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e", 193 | "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63", 194 | "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f", 195 | "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980", 196 | "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b", 197 | "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812", 198 | "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff", 199 | "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96", 200 | "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1", 201 | "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925", 202 | "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a", 203 | "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6", 204 | "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e", 205 | "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f", 206 | "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4", 207 | "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f", 208 | "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3", 209 | "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c", 210 | "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a", 211 | "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417", 212 | "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a", 213 | "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a", 214 | "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37", 215 | "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452", 216 | "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933", 217 | "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a", 218 | "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7" 219 | ], 220 | "markers": "python_version >= '3.7'", 221 | "version": "==2.1.1" 222 | }, 223 | "packaging": { 224 | "hashes": [ 225 | "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb", 226 | "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522" 227 | ], 228 | "markers": "python_version >= '3.6'", 229 | "version": "==21.3" 230 | }, 231 | "pathspec": { 232 | "hashes": [ 233 | "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a", 234 | "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1" 235 | ], 236 | "version": "==0.9.0" 237 | }, 238 | "pycparser": { 239 | "hashes": [ 240 | "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9", 241 | "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206" 242 | ], 243 | "version": "==2.21" 244 | }, 245 | "pygments": { 246 | "hashes": [ 247 | "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1", 248 | "sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42" 249 | ], 250 | "markers": "python_version >= '3.6'", 251 | "version": "==2.13.0" 252 | }, 253 | "pyparsing": { 254 | "hashes": [ 255 | "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb", 256 | "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc" 257 | ], 258 | "markers": "python_full_version >= '3.6.8'", 259 | "version": "==3.0.9" 260 | }, 261 | "pyyaml": { 262 | "hashes": [ 263 | "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293", 264 | "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b", 265 | "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57", 266 | "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b", 267 | "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4", 268 | "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07", 269 | "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba", 270 | "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9", 271 | "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287", 272 | "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513", 273 | "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0", 274 | "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0", 275 | "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92", 276 | "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f", 277 | "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2", 278 | "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc", 279 | "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c", 280 | "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86", 281 | "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4", 282 | "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c", 283 | "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34", 284 | "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b", 285 | "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c", 286 | "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb", 287 | "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737", 288 | "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3", 289 | "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d", 290 | "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53", 291 | "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78", 292 | "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803", 293 | "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a", 294 | "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174", 295 | "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5" 296 | ], 297 | "markers": "python_version >= '3.6'", 298 | "version": "==6.0" 299 | }, 300 | "resolvelib": { 301 | "hashes": [ 302 | "sha256:8113ae3ed6d33c6be0bcbf03ffeb06c0995c099b7b8aaa5ddf2e9b3b3df4e915", 303 | "sha256:9b9b80d5c60e4c2a8b7fbf0712c3449dc01d74e215632e5199850c9eca687628" 304 | ], 305 | "version": "==0.5.4" 306 | }, 307 | "rich": { 308 | "hashes": [ 309 | "sha256:2eb4e6894cde1e017976d2975ac210ef515d7548bc595ba20e195fb9628acdeb", 310 | "sha256:63a5c5ce3673d3d5fbbf23cd87e11ab84b6b451436f1b7f19ec54b6bc36ed7ca" 311 | ], 312 | "markers": "python_full_version >= '3.6.3' and python_full_version < '4.0.0'", 313 | "version": "==12.5.1" 314 | }, 315 | "ruamel.yaml": { 316 | "hashes": [ 317 | "sha256:742b35d3d665023981bd6d16b3d24248ce5df75fdb4e2924e93a05c1f8b61ca7", 318 | "sha256:8b7ce697a2f212752a35c1ac414471dc16c424c9573be4926b56ff3f5d23b7af" 319 | ], 320 | "markers": "python_version >= '3.7'", 321 | "version": "==0.17.21" 322 | }, 323 | "ruamel.yaml.clib": { 324 | "hashes": [ 325 | "sha256:066f886bc90cc2ce44df8b5f7acfc6a7e2b2e672713f027136464492b0c34d7c", 326 | "sha256:0847201b767447fc33b9c235780d3aa90357d20dd6108b92be544427bea197dd", 327 | "sha256:1070ba9dd7f9370d0513d649420c3b362ac2d687fe78c6e888f5b12bf8bc7bee", 328 | "sha256:1866cf2c284a03b9524a5cc00daca56d80057c5ce3cdc86a52020f4c720856f0", 329 | "sha256:1b4139a6ffbca8ef60fdaf9b33dec05143ba746a6f0ae0f9d11d38239211d335", 330 | "sha256:210c8fcfeff90514b7133010bf14e3bad652c8efde6b20e00c43854bf94fa5a6", 331 | "sha256:221eca6f35076c6ae472a531afa1c223b9c29377e62936f61bc8e6e8bdc5f9e7", 332 | "sha256:31ea73e564a7b5fbbe8188ab8b334393e06d997914a4e184975348f204790277", 333 | "sha256:3fb9575a5acd13031c57a62cc7823e5d2ff8bc3835ba4d94b921b4e6ee664104", 334 | "sha256:4ff604ce439abb20794f05613c374759ce10e3595d1867764dd1ae675b85acbd", 335 | "sha256:61bc5e5ca632d95925907c569daa559ea194a4d16084ba86084be98ab1cec1c6", 336 | "sha256:6e7be2c5bcb297f5b82fee9c665eb2eb7001d1050deaba8471842979293a80b0", 337 | "sha256:72a2b8b2ff0a627496aad76f37a652bcef400fd861721744201ef1b45199ab78", 338 | "sha256:77df077d32921ad46f34816a9a16e6356d8100374579bc35e15bab5d4e9377de", 339 | "sha256:78988ed190206672da0f5d50c61afef8f67daa718d614377dcd5e3ed85ab4a99", 340 | "sha256:7b2927e92feb51d830f531de4ccb11b320255ee95e791022555971c466af4527", 341 | "sha256:7f7ecb53ae6848f959db6ae93bdff1740e651809780822270eab111500842a84", 342 | "sha256:825d5fccef6da42f3c8eccd4281af399f21c02b32d98e113dbc631ea6a6ecbc7", 343 | "sha256:846fc8336443106fe23f9b6d6b8c14a53d38cef9a375149d61f99d78782ea468", 344 | "sha256:89221ec6d6026f8ae859c09b9718799fea22c0e8da8b766b0b2c9a9ba2db326b", 345 | "sha256:9efef4aab5353387b07f6b22ace0867032b900d8e91674b5d8ea9150db5cae94", 346 | "sha256:a32f8d81ea0c6173ab1b3da956869114cae53ba1e9f72374032e33ba3118c233", 347 | "sha256:a49e0161897901d1ac9c4a79984b8410f450565bbad64dbfcbf76152743a0cdb", 348 | "sha256:ada3f400d9923a190ea8b59c8f60680c4ef8a4b0dfae134d2f2ff68429adfab5", 349 | "sha256:bf75d28fa071645c529b5474a550a44686821decebdd00e21127ef1fd566eabe", 350 | "sha256:cfdb9389d888c5b74af297e51ce357b800dd844898af9d4a547ffc143fa56751", 351 | "sha256:d3c620a54748a3d4cf0bcfe623e388407c8e85a4b06b8188e126302bcab93ea8", 352 | "sha256:d67f273097c368265a7b81e152e07fb90ed395df6e552b9fa858c6d2c9f42502", 353 | "sha256:dc6a613d6c74eef5a14a214d433d06291526145431c3b964f5e16529b1842bed", 354 | "sha256:de9c6b8a1ba52919ae919f3ae96abb72b994dd0350226e28f3686cb4f142165c" 355 | ], 356 | "markers": "python_version < '3.11' and platform_python_implementation == 'CPython'", 357 | "version": "==0.2.6" 358 | }, 359 | "setuptools": { 360 | "hashes": [ 361 | "sha256:2e24e0bec025f035a2e72cdd1961119f557d78ad331bb00ff82efb2ab8da8e82", 362 | "sha256:7732871f4f7fa58fb6bdcaeadb0161b2bd046c85905dbaa066bdcbcc81953b57" 363 | ], 364 | "markers": "python_version >= '3.7'", 365 | "version": "==65.3.0" 366 | }, 367 | "tenacity": { 368 | "hashes": [ 369 | "sha256:43242a20e3e73291a28bcbcacfd6e000b02d3857a9a9fff56b297a27afdc932f", 370 | "sha256:f78f4ea81b0fabc06728c11dc2a8c01277bfc5181b321a4770471902e3eb844a" 371 | ], 372 | "markers": "python_version >= '3.6'", 373 | "version": "==8.0.1" 374 | }, 375 | "typing-extensions": { 376 | "hashes": [ 377 | "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02", 378 | "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6" 379 | ], 380 | "markers": "python_version < '3.9'", 381 | "version": "==4.3.0" 382 | }, 383 | "wcmatch": { 384 | "hashes": [ 385 | "sha256:ba4fc5558f8946bf1ffc7034b05b814d825d694112499c86035e0e4d398b6a67", 386 | "sha256:dc7351e5a7f8bbf4c6828d51ad20c1770113f5f3fd3dfe2a03cfde2a63f03f98" 387 | ], 388 | "markers": "python_version >= '3.7'", 389 | "version": "==8.4" 390 | }, 391 | "yamllint": { 392 | "hashes": [ 393 | "sha256:8a5f8e442f49309eaf3e9d7232ce76f2fc8026f5c0c0b164b83f33fed1399637", 394 | "sha256:b0e4c89985c7f5f8451c2eb8c67d804d10ac13a4abe031cbf49bdf3465d01087" 395 | ], 396 | "index": "pypi", 397 | "version": "==1.26" 398 | } 399 | }, 400 | "develop": {} 401 | } 402 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------