From 70cf431dce6d75e663788b20c6c7c76ac7082c90 Mon Sep 17 00:00:00 2001 From: Arthur BOUDREAULT <arthur@lydra.fr> Date: Tue, 13 Sep 2022 12:10:31 +0200 Subject: [PATCH] style: default filter good convention - style: remove empty line --- roles/ynh_apps/tasks/app.yml | 8 ++++---- roles/ynh_apps/tasks/apps.yml | 3 +-- roles/ynh_backup/tasks/borgbackup.yml | 19 +++++++++---------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/roles/ynh_apps/tasks/app.yml b/roles/ynh_apps/tasks/app.yml index a024560..fc842ef 100644 --- a/roles/ynh_apps/tasks/app.yml +++ b/roles/ynh_apps/tasks/app.yml @@ -23,7 +23,7 @@ ansible.builtin.command: yunohost app install {{ ynh_app.link }} \ --label "{{ ynh_app.label }}" \ --args "{% for key, value in ynh_app.args.items() %}{{ key }}={{ value }}{% if not loop.last %}&{% endif %}{% endfor %}" - changed_when: False + changed_when: false tags: apps # Post-installation part @@ -34,7 +34,7 @@ owner: "{{ item.owner | default(ynh_app.link) }}" group: "{{ item.group | default('www-data') }}" mode: "{{ (item.type == 'script') | ternary('740', '660') }}" - loop: "{{ ynh_app.post_install|default([]) }}" + loop: "{{ ynh_app.post_install | default([]) }}" when: ynh_app.post_install tags: apps @@ -42,7 +42,7 @@ ansible.builtin.command: "{{ ynh_app_post_install.dest }}" args: chdir: /tmp/ - loop: "{{ ynh_app.post_install|default([]) }}" + loop: "{{ ynh_app.post_install | default([]) }}" loop_control: loop_var: ynh_app_post_install when: ynh_app_post_install.type == "script" @@ -52,7 +52,7 @@ ansible.builtin.file: path: "{{ ynh_app_post_install.dest }}" state: absent - loop: "{{ ynh_app.post_install|default([]) }}" + loop: "{{ ynh_app.post_install | default([]) }}" loop_control: loop_var: ynh_app_post_install when: ynh_app_post_install.type == "script" diff --git a/roles/ynh_apps/tasks/apps.yml b/roles/ynh_apps/tasks/apps.yml index 240a6df..6678ba4 100644 --- a/roles/ynh_apps/tasks/apps.yml +++ b/roles/ynh_apps/tasks/apps.yml @@ -17,11 +17,10 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # # # #-----------------------------------------------------------------------------# - - name: List currently installed apps ansible.builtin.command: yunohost app map --output-as json register: ynh_installed_apps_raw - changed_when: False + changed_when: false tags: apps - name: Format json of apps diff --git a/roles/ynh_backup/tasks/borgbackup.yml b/roles/ynh_backup/tasks/borgbackup.yml index 3da4245..8d0ba03 100644 --- a/roles/ynh_backup/tasks/borgbackup.yml +++ b/roles/ynh_backup/tasks/borgbackup.yml @@ -42,7 +42,7 @@ ansible.builtin.file: path: "{{ borg_repository }}" state: directory - mode: '0750' + mode: "0750" tags: - backup - borg @@ -54,19 +54,19 @@ block: - name: deploy ssh public key for BorgBackup ansible.builtin.copy: - src: "{{ borg_ssh_keys_src }}.pub" - dest: "{{ borg_ssh_keys_dest }}.pub" + src: "{{ borg_ssh_keys_src }}.pub" + dest: "{{ borg_ssh_keys_dest }}.pub" owner: "root" group: "root" - mode: 0600 + mode: 0600 - name: deploy ssh private key for BorgBackup ansible.builtin.copy: - src: "{{ borg_ssh_keys_src }}.vault" - dest: "{{ borg_ssh_keys_dest }}" + src: "{{ borg_ssh_keys_src }}.vault" + dest: "{{ borg_ssh_keys_dest }}" owner: "root" group: "root" - mode: 0600 + mode: 0600 when: ynh_borg_backup_remote_repo - name: change SSH command in "/etc/borgmatic/{{ borgmatic_config_name }}" @@ -80,10 +80,9 @@ - backup - borg - - name: change archive name in "/etc/borgmatic/{{ borgmatic_config_name }}" ansible.builtin.lineinfile: - path: "/etc/borgmatic/{{ borgmatic_config_name }}" + path: "/etc/borgmatic/{{ borgmatic_config_name }}" regexp: "archive_name_format:" line: " archive_name_format: {{ borg_archive_name_format }}" state: present @@ -97,7 +96,7 @@ #!/bin/bash . /opt/borgmatic/bin/activate borg "$@" - dest: /usr/local/bin/borg + dest: /usr/local/bin/borg owner: root group: root mode: "0755" -- GitLab