From 762f23dd9d6e71fa9a225d8c016191c72b353a29 Mon Sep 17 00:00:00 2001 From: "Stefan G. Weichinger" Date: Sun, 10 Dec 2023 19:00:44 +0100 Subject: [PATCH] fix linting --- .ansible-lint | 2 ++ .../{galaxy.yml => galaxy_release.yml} | 0 .pre-commit-config.yaml | 2 +- CHANGELOG.md | 19 +++++++++++++++++++ galaxy.yml | 10 ++++++++++ meta/runtime.yml | 3 +++ molecule/default/converge.yml | 10 ++++++---- molecule/default/verify.yml | 16 +++++++++------- 8 files changed, 50 insertions(+), 12 deletions(-) rename .github/workflows/{galaxy.yml => galaxy_release.yml} (100%) create mode 100644 CHANGELOG.md create mode 100644 galaxy.yml create mode 100644 meta/runtime.yml diff --git a/.ansible-lint b/.ansible-lint index 19d0292..0bb364a 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -10,8 +10,10 @@ exclude_paths: - ./.tox - ./.cache - ./.cz.yaml + - ./.github skip_list: - '106' + - galaxy[version-incorrect] warn_list: # or 'skip_list' to silence them completely - '204' # Lines should be no longer than 160 chars diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy_release.yml similarity index 100% rename from .github/workflows/galaxy.yml rename to .github/workflows/galaxy_release.yml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e4bf7d..e04cc36 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: args: [-c=.yamllint] - repo: https://github.com/ansible-community/ansible-lint.git - rev: v6.10.2 + rev: v6.18.0 hooks: - id: ansible-lint diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..9a362a2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,19 @@ +## Unreleased + +## 0.1.2 (2023-03-09) + +## 0.1.1 (2023-01-15) + +### Fix + +- **fix:-fixes-#131.-correct-permissions-of-config-directory**: fix the permissions to not break perms if config directory is something common like /etc (#132) + +## 0.1.0 (2023-01-12) + +### Feat + +- **os**: add support for openSUSE (#114) + +### Fix + +- missing become for man page creation diff --git a/galaxy.yml b/galaxy.yml new file mode 100644 index 0000000..f7835bf --- /dev/null +++ b/galaxy.yml @@ -0,0 +1,10 @@ +--- +name: ansible_rclone +namespace: stefangweichinger +version: 0.1.2 +authors: + - stefangweichinger +readme: ./README.md +description: "install rclone with ansible" +repository: "https://github.com/stefangweichinger/ansible-rclone" +tags: [tools, linux] diff --git a/meta/runtime.yml b/meta/runtime.yml new file mode 100644 index 0000000..2b7c510 --- /dev/null +++ b/meta/runtime.yml @@ -0,0 +1,3 @@ +# runtime.yml +--- +requires_ansible: ">=2.14.0" diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 9971f3b..3db08d5 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -6,11 +6,13 @@ pre_tasks: - name: Update apt cache. - apt: update_cache=true cache_valid_time=600 + ansible.builtin.apt: + update_cache: yes + cache_valid_time: 600 when: ansible_os_family == 'Debian' - - name: Wait for systemd to complete initialization. # noqa 303 - command: systemctl is-system-running + - name: Wait for systemd to complete initialization. # noqa command-instead-of-module + ansible.builtin.command: systemctl is-system-running register: systemctl_status until: > 'running' in systemctl_status.stdout or @@ -21,7 +23,7 @@ changed_when: false - name: Show ansible version - debug: + ansible.builtin.debug: msg: "Ansible Version: {{ ansible_version.full }}" roles: diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml index f120531..652afdf 100644 --- a/molecule/default/verify.yml +++ b/molecule/default/verify.yml @@ -6,21 +6,23 @@ tasks: - - name: "rclone - retrieve information" - stat: + - name: "Rclone - retrieve information" + ansible.builtin.stat: path: "/usr/local/bin/rclone" register: remote_file - - name: "rclone - assert that file is created correctly" - assert: + + - name: "Rclone - assert that file is created correctly" + ansible.builtin.assert: that: - "remote_file.stat.exists" - "remote_file.stat.isreg" # is a regular file # - "remote_file.stat.path == '{{ test_rclone_file_path }}'" - "remote_file.stat.mode == '0755'" - - name: "rclone - check version" - command: "/usr/local/bin/rclone version" # noqa 301 + - name: "Rclone - check version" + ansible.builtin.command: "/usr/local/bin/rclone version" # noqa no-changed-when register: shell_result - - debug: + - name: "Display rclone version" + ansible.builtin.debug: var: shell_result.stdout_lines