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
This commit is contained in:
Dmitriy Rabotyagov 2023-07-12 12:33:19 +02:00
parent 4a7012e366
commit 1e6fc97dbe
3 changed files with 18 additions and 15 deletions

View File

@ -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"

View File

@ -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

View File

@ -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