From 0501573ba053851e32984e34948a19703f2c6e56 Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 28 Oct 2023 18:02:36 +0200 Subject: [PATCH] improve linting --- .github/workflows/ansible-linting-check.yml | 2 +- .github/workflows/galaxy.yml | 2 +- .github/workflows/j2lint-check.yml | 2 +- .github/workflows/yamllint-check.yml | 2 +- tasks/main.yml | 12 ++++++++---- tasks/versioncheck.yml | 7 +++---- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ansible-linting-check.yml b/.github/workflows/ansible-linting-check.yml index 3062a22..1a76d38 100644 --- a/.github/workflows/ansible-linting-check.yml +++ b/.github/workflows/ansible-linting-check.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - name: 'checkout git repo' + - name: Checkout git repo uses: actions/checkout@v4 with: submodules: true diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy.yml index 904bfd9..b44f94e 100644 --- a/.github/workflows/galaxy.yml +++ b/.github/workflows/galaxy.yml @@ -8,7 +8,7 @@ on: jobs: build: - name: Jinja2 Linting + name: Galaxy Role Importer runs-on: ubuntu-latest steps: diff --git a/.github/workflows/j2lint-check.yml b/.github/workflows/j2lint-check.yml index 5037de5..00c7861 100644 --- a/.github/workflows/j2lint-check.yml +++ b/.github/workflows/j2lint-check.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - name: 'checkout git repo' + - name: Checkout git repo uses: actions/checkout@v4 with: submodules: true diff --git a/.github/workflows/yamllint-check.yml b/.github/workflows/yamllint-check.yml index 751e992..5e62f57 100644 --- a/.github/workflows/yamllint-check.yml +++ b/.github/workflows/yamllint-check.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - name: 'checkout git repo' + - name: Checkout git repo uses: actions/checkout@v4 with: submodules: true diff --git a/tasks/main.yml b/tasks/main.yml index c34d849..ce59516 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,13 +1,17 @@ --- - name: Run optional versionscheck - ansible.builtin.include_tasks: versioncheck.yml + ansible.builtin.include_tasks: + file: versioncheck.yml when: submodules_versioncheck | bool - name: Get Version of etesync-dav - ansible.builtin.include_tasks: tasks/get_version_of_etesync_dav.yml + ansible.builtin.include_tasks: + file: tasks/get_version_of_etesync_dav.yml - name: Download etesync-dav - ansible.builtin.include_tasks: download_etesync_dav.yml + ansible.builtin.include_tasks: + file: download_etesync_dav.yml - name: Setup Systemd service - ansible.builtin.include_tasks: setup_systemd.yml + ansible.builtin.include_tasks: + file: setup_systemd.yml diff --git a/tasks/versioncheck.yml b/tasks/versioncheck.yml index accace1..e660e3e 100644 --- a/tasks/versioncheck.yml +++ b/tasks/versioncheck.yml @@ -7,7 +7,7 @@ ansible.builtin.file: path: '/etc/.ansible-version' state: directory - mode: "0755" + mode: 0755 when: submodules_versioncheck | bool - name: Check playbook version @@ -16,15 +16,14 @@ src: "/etc/.ansible-version/{{ playbook_version_path }}" register: playbook_version when: submodules_versioncheck | bool - ignore_errors: true failed_when: false -- name: Print remote role version +- name: Print remote role version # noqa: H500 ansible.builtin.debug: msg: "Remote role version: {{ playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode | string }}" when: submodules_versioncheck | bool -- name: Print locale role version +- name: Print locale role version # noqa: H500 ansible.builtin.debug: msg: "Local role version: '{{ playbook_version_number | string }}'." when: submodules_versioncheck | bool