From 1e6fc97dbe3473abc59af540195a8bec36aceb5b Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Wed, 12 Jul 2023 12:33:19 +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: I3aa1a19eb1aa735bafb29e5babe433b77a8d1f47 --- handlers/main.yml | 16 ++++++++-------- meta/main.yml | 12 +++++++----- tasks/main.yml | 5 +++-- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index a606825..5d2e5f6 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -43,12 +43,12 @@ - systemd-resolved - name: Update initramfs - command: "{{ systemd_networkd_update_initramfs }}" + command: "{{ systemd_networkd_update_initramfs }}" # noqa: no-changed-when when: - - ansible_facts['virtualization_type'] != "systemd-nspawn" - - ansible_facts['virtualization_type'] != "lxc" - - ansible_facts['virtualization_type'] != "lxd" - - ansible_facts['virtualization_type'] != "podman" - - ansible_facts['virtualization_type'] != "docker" - - ansible_facts['virtualization_type'] != "systemd_container" - - ansible_facts['virtualization_type'] != "container" + - ansible_facts['virtualization_type'] != "systemd-nspawn" + - ansible_facts['virtualization_type'] != "lxc" + - ansible_facts['virtualization_type'] != "lxd" + - ansible_facts['virtualization_type'] != "podman" + - ansible_facts['virtualization_type'] != "docker" + - ansible_facts['virtualization_type'] != "systemd_container" + - ansible_facts['virtualization_type'] != "container" diff --git a/meta/main.yml b/meta/main.yml index 20dac15..33d3081 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -18,18 +18,20 @@ galaxy_info: description: Installation and setup of systemd_networkd company: Rackspace license: Apache2 - min_ansible_version: 2.0 + role_name: systemd_networkd + 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 ddc142e..e7fba80 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -39,7 +39,7 @@ src: "{{ item.keyfile }}" dest: "{{ item.key }}" mode: '0644' - with_items: "{{ systemd_networkd_package_repos_keys | selectattr('keyfile','defined') | list }}" + with_items: "{{ systemd_networkd_package_repos_keys | selectattr('keyfile', 'defined') | list }}" when: - ansible_facts['os_family'] | lower == 'redhat' @@ -100,6 +100,7 @@ file: path: "/etc/systemd/network" state: directory + mode: "0755" tags: - systemd-networkd @@ -195,7 +196,7 @@ tags: - systemd-networkd -- name: restart systemd_networkd prior to applying sysctl changes +- name: Restart systemd_networkd prior to applying sysctl changes meta: flush_handlers - name: Add IP Forward for interface