From b7b2134b9db6fdeac7dcdde3c42f2329616acf5e Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Tue, 11 Jul 2023 21:20:42 +0200 Subject: [PATCH] Fix linters issue 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: I31d93b2147838f04750bb1380602406484ba400b --- defaults/main.yml | 2 +- meta/main.yml | 12 +++++++----- tasks/main.yml | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index e078eb9..8f0d88f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -14,4 +14,4 @@ # limitations under the License. apt_package_pinning_priority: 900 -apt_package_pinning_file_name: "openstack_pinned_packages.pref" \ No newline at end of file +apt_package_pinning_file_name: "openstack_pinned_packages.pref" diff --git a/meta/main.yml b/meta/main.yml index 9821220..f019ad6 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -17,17 +17,19 @@ galaxy_info: author: rcbops description: Pinning of apt packages company: Rackspace + role_name: apt_cache_pinning + namespace: openstack license: Apache2 - min_ansible_version: 1.6.6 + min_ansible_version: "2.10" platforms: - name: Debian versions: - - stretch + - bullseye - name: Ubuntu versions: - - xenial - - bionic - categories: + - focal + - jammy + galaxy_tags: - cloud - apt - pinning diff --git a/tasks/main.yml b/tasks/main.yml index 7bae2ea..bdc27da 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -17,6 +17,7 @@ template: src: apt_pinned_packages.perf.j2 dest: "/etc/apt/preferences.d/{{ apt_package_pinning_file_name }}" + mode: "0644" when: - ansible_facts['pkg_mgr'] == 'apt' - apt_pinned_packages is defined