From 3448df38f575cde72b6f8c6d552ec448536d55bf Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Wed, 12 Jul 2023 12:29:45 +0200 Subject: [PATCH] Fix linters and metadata With update of ansible-lint to version >=6.0.0 a lot of new linters were added, that enabled by default. In order to comply with linter rules we're applying changes to the role. With that we also update metdata to reflect current state. Change-Id: I8bd832c172ef87acca27f053c5223941d80f9ce1 --- defaults/main.yml | 3 ++- meta/main.yml | 12 +++++++----- tasks/main.yml | 6 ++++-- tasks/systemd_install.yml | 4 +++- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 1118682..2339e93 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -15,7 +15,8 @@ # EPEL repo is required for s3fs package. It won't be added in case s3fs is not required. systemd_centos_epel_mirror: "{{ centos_epel_mirror | default('http://download.fedoraproject.org/pub/epel') }}" -systemd_centos_epel_key: "{{ centos_epel_key | default('http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-' ~ ansible_facts['distribution_major_version']) }}" +systemd_centos_epel_key: >- + {{ centos_epel_key | default('http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-' ~ ansible_facts['distribution_major_version']) }} # Any optioned required to make the mount point work. If no options are # provided the default will be used. This list is comma separted. diff --git a/meta/main.yml b/meta/main.yml index 54d82a6..03f8afb 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -18,18 +18,20 @@ galaxy_info: description: Installation and setup of systemd_mount company: Rackspace license: Apache2 - min_ansible_version: 2.0 + role_name: systemd_mount + namespace: openstack + min_ansible_version: "2.10" platforms: - name: Debian versions: - - buster + - bullseye - name: Ubuntu versions: - - bionic - focal + - jammy - name: EL versions: - - 8 - categories: + - "9" + galaxy_tags: - systemd - development diff --git a/tasks/main.yml b/tasks/main.yml index 963ebfb..c4a1ac9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -28,7 +28,9 @@ tags: - always -- include_tasks: systemd_install.yml +- name: Including systemd_install tasks + include_tasks: systemd_install.yml -- include_tasks: systemd_mounts.yml +- name: Including systemd_mounts tasks + include_tasks: systemd_mounts.yml with_items: "{{ systemd_mounts }}" diff --git a/tasks/systemd_install.yml b/tasks/systemd_install.yml index 5144d12..82cc136 100644 --- a/tasks/systemd_install.yml +++ b/tasks/systemd_install.yml @@ -22,6 +22,7 @@ get_url: url: "{{ systemd_centos_epel_key }}" dest: /etc/pki/rpm-gpg + mode: "0640" register: _get_yum_keys until: _get_yum_keys is success retries: 5 @@ -66,6 +67,7 @@ copy: content: "c /dev/fuse 0600 - - - 10:229" dest: "/etc/tmpfiles.d/openstack-ansible-systemd_mount-glusterfs-client.conf" + mode: "0644" register: _glusterfs_server_tmpfiles - name: Apply systemctl overrides @@ -87,4 +89,4 @@ name: "systemd-tmpfiles-setup-dev" state: restarted when: - - _glusterfs_server_tmpfiles is changed \ No newline at end of file + - _glusterfs_server_tmpfiles is changed