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. Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/888223 Change-Id: I68c3d98de3a0a4444c0c1ea0cc528901613a63bd
This commit is contained in:
parent
c9fb7e4f46
commit
bfbf0db8fb
|
@ -16,7 +16,7 @@
|
|||
## Verbosity Options
|
||||
debug: False
|
||||
|
||||
#python venv executable
|
||||
# python venv executable
|
||||
magnum_venv_python_executable: "{{ openstack_venv_python_executable | default('python3') }}"
|
||||
|
||||
# Enable/Disable Ceilometer
|
||||
|
@ -26,7 +26,11 @@ magnum_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups
|
|||
# for the service setup. The host must already have
|
||||
# clouds.yaml properly configured.
|
||||
magnum_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
||||
magnum_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((magnum_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
||||
magnum_service_setup_host_python_interpreter: >-
|
||||
{{
|
||||
openstack_service_setup_host_python_interpreter | default(
|
||||
(magnum_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
|
||||
}}
|
||||
|
||||
# Set the package install state for distribution packages
|
||||
# Options are 'present' and 'latest'
|
||||
|
@ -82,13 +86,18 @@ magnum_bin: "{{ magnum_venv_path }}/bin"
|
|||
|
||||
magnum_git_repo: "https://opendev.org/openstack/magnum"
|
||||
magnum_git_install_branch: master
|
||||
magnum_upper_constraints_url: "{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}"
|
||||
magnum_upper_constraints_url: >-
|
||||
{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}
|
||||
magnum_git_constraints:
|
||||
- "--constraint {{ magnum_upper_constraints_url }}"
|
||||
|
||||
# Database vars
|
||||
magnum_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
||||
magnum_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((magnum_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
||||
magnum_db_setup_python_interpreter: >-
|
||||
{{
|
||||
openstack_db_setup_python_interpreter | default(
|
||||
(magnum_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
|
||||
}}
|
||||
magnum_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
||||
magnum_galera_database_name: magnum_service
|
||||
magnum_galera_user: magnum
|
||||
|
@ -142,7 +151,7 @@ magnum_trustee_domain_admin_roles:
|
|||
- admin
|
||||
magnum_cluster_user_trust: True
|
||||
|
||||
#Glance images
|
||||
# Glance images
|
||||
## Example Glance Image - Fedora Atomic
|
||||
# - name: fedora-atomic-latest #Name of the image in Glance
|
||||
# disk_format: qcow2 #Disk format (e.g. qcow2)
|
||||
|
@ -156,24 +165,24 @@ magnum_glance_images: []
|
|||
# Define cluster templates to create. It should be list of
|
||||
# dictionaries with keys that are supported by os_coe_cluster_template
|
||||
# module (https://docs.ansible.com/ansible/latest/modules/os_coe_cluster_template_module.html)
|
||||
#magnum_cluster_templates:
|
||||
# - name: k8s
|
||||
# cloud: default
|
||||
# coe: kubernetes
|
||||
# docker_volume_size: 50
|
||||
# external_network_id: public
|
||||
# network_driver: flannel
|
||||
# magnum_cluster_templates:
|
||||
# - name: k8s
|
||||
# cloud: default
|
||||
# coe: kubernetes
|
||||
# docker_volume_size: 50
|
||||
# external_network_id: public
|
||||
# network_driver: flannel
|
||||
magnum_cluster_templates: []
|
||||
|
||||
# Create extra flavors to be used by magnum cluster template. It should be list
|
||||
# of dictionaries with keys that are supported by os_nova_flavor module
|
||||
# (https://docs.ansible.com/ansible/latest/modules/os_nova_flavor_module.html)
|
||||
#magnum_flavors:
|
||||
# - name: k8s-pod
|
||||
# cloud: default
|
||||
# ram: 256
|
||||
# vcpus: 1
|
||||
# disk: 5
|
||||
# magnum_flavors:
|
||||
# - name: k8s-pod
|
||||
# cloud: default
|
||||
# ram: 256
|
||||
# vcpus: 1
|
||||
# disk: 5
|
||||
magnum_flavors: []
|
||||
|
||||
# Set the directory where the downloaded images will be stored
|
||||
|
@ -228,7 +237,8 @@ magnum_services:
|
|||
# uWSGI Settings
|
||||
magnum_api_uwsgi_ini_overrides: {}
|
||||
magnum_wsgi_processes_max: 16
|
||||
magnum_wsgi_processes: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, magnum_wsgi_processes_max] | min }}"
|
||||
magnum_wsgi_processes: >-
|
||||
{{ [[(ansible_facts['processor_vcpus'] // ansible_facts['processor_threads_per_core']) | default(1), 1] | max * 2, magnum_wsgi_processes_max] | min }}
|
||||
magnum_wsgi_threads: 1
|
||||
magnum_api_uwsgi_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}"
|
||||
magnum_uwsgi_tls:
|
||||
|
@ -237,7 +247,8 @@ magnum_uwsgi_tls:
|
|||
|
||||
# conductor settings
|
||||
magnum_conductor_workers_max: 16
|
||||
magnum_conductor_workers: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, magnum_conductor_workers_max] | min }}"
|
||||
magnum_conductor_workers: >-
|
||||
{{ [[(ansible_facts['processor_vcpus'] // ansible_facts['processor_threads_per_core']) | default(1), 1] | max * 2, magnum_conductor_workers_max] | min }}
|
||||
|
||||
###
|
||||
### Backend TLS
|
||||
|
@ -284,5 +295,5 @@ magnum_pki_install_certificates:
|
|||
mode: "0600"
|
||||
|
||||
# Define user-provided SSL certificates
|
||||
#magnum_user_ssl_cert: <path to cert on ansible deployment host>
|
||||
#magnum_user_ssl_key: <path to cert on ansible deployment host>
|
||||
# magnum_user_ssl_cert: <path to cert on ansible deployment host>
|
||||
# magnum_user_ssl_key: <path to cert on ansible deployment host>
|
||||
|
|
|
@ -18,26 +18,27 @@ galaxy_info:
|
|||
description: Deploy Magnum with OpenStack Ansible
|
||||
company: OpenStack
|
||||
license: Apache-2.0
|
||||
min_ansible_version: 2.2
|
||||
version: 0.1.0
|
||||
role_name: os_magnum
|
||||
namespace: openstack
|
||||
min_ansible_version: "2.10"
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
- buster
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- bionic
|
||||
- focal
|
||||
- name: EL
|
||||
versions:
|
||||
- 8
|
||||
- name: Debian
|
||||
versions:
|
||||
- bullseye
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- focal
|
||||
- jammy
|
||||
- name: EL
|
||||
versions:
|
||||
- "9"
|
||||
# Below are all categories currently available. Just as with
|
||||
# the platforms above, uncomment those that apply to your role.
|
||||
galaxy_tags:
|
||||
- cloud
|
||||
- openstack
|
||||
- python
|
||||
- magnum
|
||||
- cloud
|
||||
- openstack
|
||||
- python
|
||||
- magnum
|
||||
|
||||
dependencies:
|
||||
- role: apt_package_pinning
|
||||
|
|
|
@ -33,9 +33,9 @@
|
|||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: "directory"
|
||||
owner: "{{ item.owner |default(magnum_system_user_name) }}"
|
||||
group: "{{ item.group |default(magnum_system_group_name) }}"
|
||||
mode: "{{ item.mode |default('0750') }}"
|
||||
owner: "{{ item.owner | default(magnum_system_user_name) }}"
|
||||
group: "{{ item.group | default(magnum_system_group_name) }}"
|
||||
mode: "{{ item.mode | default('0750') }}"
|
||||
with_items:
|
||||
- { path: "/openstack/venvs", mode: "0755", owner: "root", group: "root" }
|
||||
- path: "/etc/magnum"
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
url: "{{ item.file }}"
|
||||
dest: "{{ magnum_image_path }}/{{ item.file | basename }}"
|
||||
checksum: "{{ item.checksum | default(omit) }}"
|
||||
mode: "0644"
|
||||
register: download_image
|
||||
until: download_image is success
|
||||
retries: 5
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
# is to another host, we assume that it is accessible by the
|
||||
# system python instead.
|
||||
|
||||
- include_role:
|
||||
- name: Including osa.service_setup role
|
||||
include_role:
|
||||
name: openstack.osa.service_setup
|
||||
apply:
|
||||
tags:
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
tags:
|
||||
- always
|
||||
|
||||
- include_role:
|
||||
- name: Including osa.db_setup role
|
||||
include_role:
|
||||
name: openstack.osa.db_setup
|
||||
apply:
|
||||
tags:
|
||||
|
@ -49,7 +50,8 @@
|
|||
tags:
|
||||
- always
|
||||
|
||||
- include_role:
|
||||
- name: Including osa.mq_setup role
|
||||
include_role:
|
||||
name: openstack.osa.mq_setup
|
||||
apply:
|
||||
tags:
|
||||
|
@ -71,7 +73,8 @@
|
|||
tags:
|
||||
- always
|
||||
|
||||
- import_tasks: magnum_pre_install.yml
|
||||
- name: Importing magnum_pre_install tasks
|
||||
import_tasks: magnum_pre_install.yml
|
||||
tags:
|
||||
- magnum-install
|
||||
|
||||
|
@ -114,7 +117,8 @@
|
|||
tags:
|
||||
- always
|
||||
|
||||
- import_tasks: magnum_post_install.yml
|
||||
- name: Importing magnum_post_install tasks
|
||||
import_tasks: magnum_post_install.yml
|
||||
tags:
|
||||
- magnum-config
|
||||
|
||||
|
@ -127,16 +131,17 @@
|
|||
systemd_tempd_prefix: openstack
|
||||
systemd_slice_name: magnum
|
||||
systemd_lock_path: /var/lock/magnum
|
||||
systemd_CPUAccounting: true
|
||||
systemd_BlockIOAccounting: true
|
||||
systemd_MemoryAccounting: true
|
||||
systemd_TasksAccounting: true
|
||||
systemd_service_cpu_accounting: true
|
||||
systemd_service_block_io_accounting: true
|
||||
systemd_service_memory_accounting: true
|
||||
systemd_service_tasks_accounting: true
|
||||
systemd_services: "{{ filtered_magnum_services }}"
|
||||
tags:
|
||||
- magnum-config
|
||||
- systemd-service
|
||||
|
||||
- import_tasks: magnum_db_sync.yml
|
||||
- name: Importing magnum_db_sync tasks
|
||||
import_tasks: magnum_db_sync.yml
|
||||
when: _magnum_is_first_play_host
|
||||
tags:
|
||||
- magnum-config
|
||||
|
@ -151,7 +156,8 @@
|
|||
- magnum-config
|
||||
- uwsgi
|
||||
|
||||
- import_tasks: magnum_service_setup.yml
|
||||
- name: Importing magnum_service_setup tasks
|
||||
import_tasks: magnum_service_setup.yml
|
||||
when: _magnum_is_first_play_host
|
||||
tags:
|
||||
- magnum-config
|
||||
|
@ -159,7 +165,8 @@
|
|||
- name: Flush handlers
|
||||
meta: flush_handlers
|
||||
|
||||
- import_tasks: magnum_resources.yml
|
||||
- name: Importing magnum_resources tasks
|
||||
import_tasks: magnum_resources.yml
|
||||
when: _magnum_is_first_play_host
|
||||
tags:
|
||||
- magnum-config
|
||||
|
|
|
@ -14,7 +14,11 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
_magnum_is_first_play_host: "{{ (magnum_services['magnum-api']['group'] in group_names and inventory_hostname == (groups[magnum_services['magnum-api']['group']] | intersect(ansible_play_hosts)) | first) | bool }}"
|
||||
_magnum_is_first_play_host: >-
|
||||
{{
|
||||
(magnum_services['magnum-api']['group'] in group_names and
|
||||
inventory_hostname == (groups[magnum_services['magnum-api']['group']] | intersect(ansible_play_hosts)) | first) | bool
|
||||
}}
|
||||
|
||||
#
|
||||
# Compile a list of the services on a host based on whether
|
||||
|
@ -61,4 +65,4 @@ uwsgi_magnum_services: |-
|
|||
{% set _ = services.update({key: value}) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{{ services }}
|
||||
{{ services }}
|
||||
|
|
Loading…
Reference in New Issue