From db0da06c082198296cec60ffe3c450b5dba5f10b Mon Sep 17 00:00:00 2001 From: L3D Date: Tue, 21 Jun 2022 17:22:57 +0200 Subject: [PATCH] Fixing linting errors and increment version Linting errors: - Use FQCN for builtin actions. (fail -> ansible.builtin.fail) - line too long (175 > 170 characters) - trailing spaces increment version for simple version check --- tasks/set_version.yml | 10 ++++++---- vars/main.yml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tasks/set_version.yml b/tasks/set_version.yml index 427ed53..3129dbd 100644 --- a/tasks/set_version.yml +++ b/tasks/set_version.yml @@ -17,8 +17,10 @@ when: not ansible_check_mode - name: "Fail if running in check mode without versions set." - fail: - msg: "You are running this playbook in check mode : please set the gitea version with gitea_version, the URI module cannot load the latest version while in this mode." + ansible.builtin.fail: + msg: | + "You are running this playbook in check mode: + Please set the Gitea version with the variable 'gitea_version', because the URI module cannot detect the latest version in this mode." when: ansible_check_mode and ( gitea_version not defined ) - name: "Set fact latest gitea release" @@ -29,8 +31,8 @@ - name: "Set gitea version target (latest)" ansible.builtin.set_fact: gitea_version_target: "{{ gitea_remote_version }}" - when: not ansible_check_mode - when: gitea_version == "latest" + when: not ansible_check_mode + when: gitea_version == "latest" - name: "Set gitea version target ({{ gitea_version }})" ansible.builtin.set_fact: diff --git a/vars/main.yml b/vars/main.yml index 33efc57..eb96c97 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -56,5 +56,5 @@ transfer_custom_footer: - 'files/gitea_footer/extra_links_footer.tmpl' - 'files/extra_links_footer.tmpl' -playbook_version_number: 37 # should be int +playbook_version_number: 38 # should be int playbook_version_path: 'do1jlr.gitea.version'