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: Ide0ca8cf60f3a92c98543465d53bc4720067b153
This commit is contained in:
parent
f1de9887b5
commit
3cf5320038
|
@ -168,7 +168,8 @@ openstack_hosts_rdo_repo_type: trunk
|
|||
openstack_hosts_rdo_mirror_url: 'https://trunk.rdoproject.org'
|
||||
openstack_hosts_rdo_repo_url: "{{ _openstack_hosts_rdo_repo_url }}"
|
||||
openstack_hosts_rdo_deps_url: "{{ _openstack_hosts_rdo_deps_url }}"
|
||||
openstack_hosts_power_tool_enable: "{{ ('repo_all' in groups or 'manila_all' in groups or 'gnocchi_all' in groups or install_method | default('source') == 'distro') }}"
|
||||
openstack_hosts_power_tool_enable: >-
|
||||
{{ ('repo_all' in groups or 'manila_all' in groups or 'gnocchi_all' in groups or install_method | default('source') == 'distro') }}
|
||||
|
||||
# Keep a history of systemd journals on disk after reboots
|
||||
openstack_host_keep_journals: yes
|
||||
|
|
|
@ -18,19 +18,21 @@ galaxy_info:
|
|||
description: Base host setup for a OpenStack Private Cloud host
|
||||
company: Rackspace
|
||||
license: Apache2
|
||||
min_ansible_version: 2.9
|
||||
role_name: openstack_hosts
|
||||
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:
|
||||
- cloud
|
||||
- host
|
||||
- development
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: check how kernel modules are implemented (statically builtin, dynamic, not set)
|
||||
- name: Check how kernel modules are implemented (statically builtin, dynamic, not set)
|
||||
slurp:
|
||||
src: "/boot/config-{{ ansible_facts['kernel'] }}"
|
||||
register: modules
|
||||
|
@ -69,6 +69,7 @@
|
|||
template:
|
||||
src: modprobe.conf.j2
|
||||
dest: "{{ openstack_host_module_file }}"
|
||||
mode: "0644"
|
||||
|
||||
- name: Adding new system tuning
|
||||
sysctl:
|
||||
|
@ -89,6 +90,9 @@
|
|||
file:
|
||||
path: /var/log/journal
|
||||
state: directory
|
||||
owner: root
|
||||
group: systemd-journal
|
||||
mode: "2755"
|
||||
register: journald_directory
|
||||
when:
|
||||
- openstack_host_keep_journals | bool
|
||||
|
|
|
@ -32,11 +32,13 @@
|
|||
file:
|
||||
path: /etc/ansible/facts.d/
|
||||
state: directory
|
||||
mode: "0755"
|
||||
tags:
|
||||
- openstack_hosts-install
|
||||
|
||||
# Deploy the release file everywhere
|
||||
- import_tasks: openstack_release.yml
|
||||
- name: Importing openstack_release tasks
|
||||
import_tasks: openstack_release.yml
|
||||
tags:
|
||||
- openstack_hosts-install
|
||||
|
||||
|
@ -104,7 +106,8 @@
|
|||
include_tasks: "openstack_hosts_configure_{{ ansible_facts['pkg_mgr'] | lower }}.yml"
|
||||
|
||||
# Configure bare metal nodes: Kernel, sysctl, sysstat, hosts files, metal packages
|
||||
- include_tasks: configure_metal_hosts.yml
|
||||
- name: Including configure_metal_hosts tasks
|
||||
include_tasks: configure_metal_hosts.yml
|
||||
args:
|
||||
apply:
|
||||
tags:
|
||||
|
@ -145,11 +148,13 @@
|
|||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- import_tasks: openstack_authorized_keys.yml
|
||||
- name: Importing openstack_authorized_keys tasks
|
||||
import_tasks: openstack_authorized_keys.yml
|
||||
tags:
|
||||
- openstack_hosts-config
|
||||
|
||||
- include_role:
|
||||
- name: Including PKI role
|
||||
include_role:
|
||||
name: pki
|
||||
tasks_from: main_ca_install.yml
|
||||
vars:
|
||||
|
@ -158,19 +163,25 @@
|
|||
tags:
|
||||
- always
|
||||
|
||||
- include_tasks: openstack_gitconfig.yml
|
||||
- name: Including openstack_gitconfig tasks
|
||||
include_tasks: openstack_gitconfig.yml
|
||||
args:
|
||||
apply:
|
||||
tags:
|
||||
- openstack_hosts-config
|
||||
when: ansible_facts['hostname'] != 'aio1'
|
||||
|
||||
- include_tasks: openstack_hosts_systemd.yml
|
||||
- name: Including openstack_hosts_systemd tasks
|
||||
include_tasks: openstack_hosts_systemd.yml
|
||||
args:
|
||||
apply:
|
||||
tags:
|
||||
- openstack_hosts-config
|
||||
- openstack_hosts-systemd
|
||||
when: openstack_hosts_systemd_networkd_devices or openstack_hosts_systemd_networkd_networks or openstack_hosts_systemd_services or openstack_hosts_systemd_mounts
|
||||
when:
|
||||
- openstack_hosts_systemd_networkd_devices or
|
||||
openstack_hosts_systemd_networkd_networks or
|
||||
openstack_hosts_systemd_services or
|
||||
openstack_hosts_systemd_mounts
|
||||
tags:
|
||||
- always
|
||||
|
|
|
@ -33,4 +33,5 @@
|
|||
template:
|
||||
src: gitconfig.j2
|
||||
dest: /etc/gitconfig
|
||||
mode: "0644"
|
||||
when: _git_version.rc != 0
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
copy:
|
||||
content: "{{ openstack_hosts_package_manager_default_conf + openstack_hosts_package_manager_extra_conf }}"
|
||||
dest: /etc/apt/apt.conf.d/99openstack-ansible
|
||||
mode: "0644"
|
||||
when:
|
||||
- openstack_hosts_package_manager_extra_conf | length > 0 or openstack_hosts_package_manager_default_conf | length > 0
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
option: enabled
|
||||
value: "{{ (openstack_hosts_enable_yum_fastestmirror | bool) | ternary('1', '0') }}"
|
||||
no_extra_spaces: yes
|
||||
mode: "0644"
|
||||
when:
|
||||
- fastestmirror_plugin_check.stat.exists
|
||||
|
||||
|
@ -98,6 +99,7 @@
|
|||
path: /etc/dnf/dnf.conf
|
||||
marker: "# {mark} OPENSTACK-ANSIBLE-OPENSTACK_HOSTS MANAGED BLOCK"
|
||||
create: yes
|
||||
mode: "0644"
|
||||
when:
|
||||
- openstack_hosts_package_manager_extra_conf | length > 0 or openstack_hosts_package_manager_default_conf | length > 0
|
||||
|
||||
|
@ -105,6 +107,7 @@
|
|||
get_url:
|
||||
url: "{{ openstack_hosts_rdo_repo_url }}/delorean.repo"
|
||||
dest: /etc/yum.repos.d/rdo.repo
|
||||
mode: "0640"
|
||||
register: _get_repo
|
||||
until: _get_repo is success
|
||||
retries: 5
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
option: enabled
|
||||
value: "{{ (openstack_hosts_enable_yum_fastestmirror | bool) | ternary('1', '0') }}"
|
||||
no_extra_spaces: yes
|
||||
mode: "0644"
|
||||
when:
|
||||
- fastestmirror_plugin_check.stat.exists
|
||||
|
||||
|
@ -96,5 +97,6 @@
|
|||
path: /etc/yum.conf
|
||||
marker: "# {mark} OPENSTACK-ANSIBLE-OPENSTACK_HOSTS MANAGED BLOCK"
|
||||
create: yes
|
||||
mode: "0644"
|
||||
when:
|
||||
- openstack_hosts_package_manager_extra_conf | length > 0 or openstack_hosts_package_manager_default_conf | length > 0
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
dest: "{{ openstack_distrib_file_path }}"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0644"
|
||||
when:
|
||||
- openstack_distrib_file | bool
|
||||
|
||||
|
|
|
@ -83,10 +83,14 @@ _package_list:
|
|||
_osbpo_release: "zed"
|
||||
|
||||
_package_repos:
|
||||
- repo: "deb {{ apt_repo_url | default('http://osbpo.debian.net/osbpo/ ' ~ ansible_facts['distribution_release'] ~ '-' ~ _osbpo_release ~ '-backports main') }}"
|
||||
- repo: >-
|
||||
deb {{ apt_repo_url | default('http://osbpo.debian.net/osbpo/ ' ~ ansible_facts['distribution_release'] ~ '-' ~ _osbpo_release ~ '-backports main') }}
|
||||
state: present
|
||||
filename: "osbpo"
|
||||
- repo: "deb {{ apt_repo_url | default('http://osbpo.debian.net/osbpo/ ' ~ ansible_facts['distribution_release'] ~ '-' ~ _osbpo_release ~ '-backports-nochange main') }}"
|
||||
- repo: >-
|
||||
deb {{ apt_repo_url | default(
|
||||
'http://osbpo.debian.net/osbpo/ ' ~ ansible_facts['distribution_release'] ~ '-' ~ _osbpo_release ~ '-backports-nochange main'
|
||||
) }}
|
||||
state: present
|
||||
filename: "osbpo"
|
||||
|
||||
|
|
|
@ -89,8 +89,10 @@ _package_list:
|
|||
- name: ca-certificates
|
||||
state: latest
|
||||
|
||||
_openstack_hosts_rdo_repo_url: "{{ openstack_hosts_rdo_mirror_url }}/centos{{ ansible_facts['distribution_major_version'] }}-{{ openstack_distrib_code_name | lower }}/current/"
|
||||
_openstack_hosts_rdo_deps_url: "{{ openstack_hosts_rdo_mirror_url }}/centos{{ ansible_facts['distribution_major_version'] }}-{{ openstack_distrib_code_name | lower }}/deps/latest/"
|
||||
_openstack_hosts_rdo_repo_url: >-
|
||||
{{ openstack_hosts_rdo_mirror_url }}/centos{{ ansible_facts['distribution_major_version'] }}-{{ openstack_distrib_code_name | lower }}/current/
|
||||
_openstack_hosts_rdo_deps_url: >-
|
||||
{{ openstack_hosts_rdo_mirror_url }}/centos{{ ansible_facts['distribution_major_version'] }}-{{ openstack_distrib_code_name | lower }}/deps/latest/
|
||||
|
||||
_package_repos_trunk:
|
||||
- name: rdo-deps
|
||||
|
|
|
@ -87,7 +87,9 @@ _package_list:
|
|||
state: latest
|
||||
|
||||
_package_repos:
|
||||
- repo: "deb {{ apt_repo_url | default('http://ubuntu-cloud.archive.canonical.com/ubuntu') }} {{ ansible_facts['lsb']['codename'] }}-updates/{{ openstack_distrib_code_name | lower }} main"
|
||||
- repo: >-
|
||||
deb {{ apt_repo_url | default('http://ubuntu-cloud.archive.canonical.com/ubuntu') }}
|
||||
{{ ansible_facts['lsb']['codename'] }}-updates/{{ openstack_distrib_code_name | lower }} main
|
||||
state: present
|
||||
filename: "uca"
|
||||
|
||||
|
|
Loading…
Reference in New Issue