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: I30eff91392dcab1e76c4fee89ead7a6e03838b2d
This commit is contained in:
parent
81a0273a50
commit
1c49c7d2c8
@ -14,14 +14,18 @@
|
|||||||
## Verbosity Options
|
## Verbosity Options
|
||||||
debug: False
|
debug: False
|
||||||
|
|
||||||
#python venv executable
|
# python venv executable
|
||||||
sahara_venv_python_executable: "{{ openstack_venv_python_executable | default('python3') }}"
|
sahara_venv_python_executable: "{{ openstack_venv_python_executable | default('python3') }}"
|
||||||
|
|
||||||
# Set the host which will execute the shade modules
|
# Set the host which will execute the shade modules
|
||||||
# for the service setup. The host must already have
|
# for the service setup. The host must already have
|
||||||
# clouds.yaml properly configured.
|
# clouds.yaml properly configured.
|
||||||
sahara_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
sahara_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
||||||
sahara_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((sahara_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
sahara_service_setup_host_python_interpreter: >-
|
||||||
|
{{
|
||||||
|
openstack_service_setup_host_python_interpreter | default(
|
||||||
|
(sahara_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
|
||||||
|
}}
|
||||||
|
|
||||||
# Set the package install state for distribution packages
|
# Set the package install state for distribution packages
|
||||||
# Options are 'present' and 'latest'
|
# Options are 'present' and 'latest'
|
||||||
@ -29,7 +33,8 @@ sahara_package_state: "{{ package_state | default('latest') }}"
|
|||||||
|
|
||||||
sahara_git_repo: https://opendev.org/openstack/sahara
|
sahara_git_repo: https://opendev.org/openstack/sahara
|
||||||
sahara_git_install_branch: master
|
sahara_git_install_branch: master
|
||||||
sahara_upper_constraints_url: "{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}"
|
sahara_upper_constraints_url: >-
|
||||||
|
{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}
|
||||||
sahara_git_constraints:
|
sahara_git_constraints:
|
||||||
- "--constraint {{ sahara_upper_constraints_url }}"
|
- "--constraint {{ sahara_upper_constraints_url }}"
|
||||||
|
|
||||||
@ -90,7 +95,11 @@ sahara_oslomsg_amqp1_enabled: "{{ sahara_oslomsg_rpc_transport == 'amqp' }}"
|
|||||||
|
|
||||||
## Database info
|
## Database info
|
||||||
sahara_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
sahara_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
||||||
sahara_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((sahara_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
sahara_db_setup_python_interpreter: >-
|
||||||
|
{{
|
||||||
|
openstack_db_setup_python_interpreter | default(
|
||||||
|
(sahara_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
|
||||||
|
}}
|
||||||
sahara_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
sahara_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
||||||
sahara_galera_database: sahara
|
sahara_galera_database: sahara
|
||||||
sahara_galera_user: sahara
|
sahara_galera_user: sahara
|
||||||
@ -167,7 +176,8 @@ sahara_plugin_pip_packages:
|
|||||||
|
|
||||||
## Cap the maximum number of threads / workers when a user value is unspecified.
|
## Cap the maximum number of threads / workers when a user value is unspecified.
|
||||||
sahara_api_workers_max: 16
|
sahara_api_workers_max: 16
|
||||||
sahara_api_workers: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, sahara_api_workers_max] | min }}"
|
sahara_api_workers: >-
|
||||||
|
{{ [[(ansible_facts['processor_vcpus'] // ansible_facts['processor_threads_per_core']) | default(1), 1] | max * 2, sahara_api_workers_max] | min }}
|
||||||
|
|
||||||
sahara_task_executor: taskflow
|
sahara_task_executor: taskflow
|
||||||
sahara_digest_algorithm: sha256
|
sahara_digest_algorithm: sha256
|
||||||
@ -181,9 +191,9 @@ sahara_policy_dirs: policy.d
|
|||||||
## Policy vars
|
## Policy vars
|
||||||
# Provide a list of access controls to update the default policy.json with. These changes will be merged
|
# Provide a list of access controls to update the default policy.json with. These changes will be merged
|
||||||
# with the access controls in the default policy.json. E.g.
|
# with the access controls in the default policy.json. E.g.
|
||||||
#sahara_policy_overrides:
|
# sahara_policy_overrides:
|
||||||
# "clusters:get_all": ""
|
# "clusters:get_all": ""
|
||||||
# "clusters:create": ""
|
# "clusters:create": ""
|
||||||
|
|
||||||
sahara_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}"
|
sahara_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}"
|
||||||
|
|
||||||
@ -233,7 +243,7 @@ sahara_services:
|
|||||||
|
|
||||||
## Sahara uWSGI settings
|
## Sahara uWSGI settings
|
||||||
sahara_wsgi_processes_max: 16
|
sahara_wsgi_processes_max: 16
|
||||||
sahara_wsgi_processes: "{{ [[ansible_facts['processor_vcpus']|default(1), 1] | max * 2, sahara_wsgi_processes_max] | min }}"
|
sahara_wsgi_processes: "{{ [[ansible_facts['processor_vcpus'] | default(1), 1] | max * 2, sahara_wsgi_processes_max] | min }}"
|
||||||
sahara_wsgi_threads: 1
|
sahara_wsgi_threads: 1
|
||||||
sahara_uwsgi_tls:
|
sahara_uwsgi_tls:
|
||||||
crt: "{{ sahara_ssl_cert }}"
|
crt: "{{ sahara_ssl_cert }}"
|
||||||
@ -291,5 +301,5 @@ sahara_pki_install_certificates:
|
|||||||
mode: "0600"
|
mode: "0600"
|
||||||
|
|
||||||
# Define user-provided SSL certificates
|
# Define user-provided SSL certificates
|
||||||
#sahara_user_ssl_cert: <path to cert on ansible deployment host>
|
# sahara_user_ssl_cert: <path to cert on ansible deployment host>
|
||||||
#sahara_user_ssl_key: <path to cert on ansible deployment host>
|
# sahara_user_ssl_key: <path to cert on ansible deployment host>
|
||||||
|
@ -4,19 +4,21 @@ galaxy_info:
|
|||||||
description: Installation and setup of sahara
|
description: Installation and setup of sahara
|
||||||
company: LSD/UFCG
|
company: LSD/UFCG
|
||||||
license: Apache2
|
license: Apache2
|
||||||
min_ansible_version: 2.2
|
role_name: os_sahara
|
||||||
|
namespace: openstack
|
||||||
|
min_ansible_version: "2.10"
|
||||||
platforms:
|
platforms:
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
- buster
|
- bullseye
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
versions:
|
versions:
|
||||||
- bionic
|
|
||||||
- focal
|
- focal
|
||||||
|
- jammy
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- 8
|
- "9"
|
||||||
categories:
|
galaxy_tags:
|
||||||
- cloud
|
- cloud
|
||||||
- python
|
- python
|
||||||
- sahara
|
- sahara
|
||||||
|
@ -23,7 +23,8 @@
|
|||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- include_role:
|
- name: Including osa.db_setup role
|
||||||
|
include_role:
|
||||||
name: openstack.osa.db_setup
|
name: openstack.osa.db_setup
|
||||||
apply:
|
apply:
|
||||||
tags:
|
tags:
|
||||||
@ -44,7 +45,8 @@
|
|||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- include_role:
|
- name: Including osa.mq_setup role
|
||||||
|
include_role:
|
||||||
name: openstack.osa.mq_setup
|
name: openstack.osa.mq_setup
|
||||||
apply:
|
apply:
|
||||||
tags:
|
tags:
|
||||||
@ -66,7 +68,8 @@
|
|||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- import_tasks: sahara_pre_install.yml
|
- name: Importing sahara_pre_install tasks
|
||||||
|
import_tasks: sahara_pre_install.yml
|
||||||
tags:
|
tags:
|
||||||
- sahara-install
|
- sahara-install
|
||||||
|
|
||||||
@ -111,7 +114,8 @@
|
|||||||
tags:
|
tags:
|
||||||
- sahara-install
|
- sahara-install
|
||||||
|
|
||||||
- import_tasks: sahara_post_install.yml
|
- name: Importing sahara_post_install tasks
|
||||||
|
import_tasks: sahara_post_install.yml
|
||||||
tags:
|
tags:
|
||||||
- sahara-config
|
- sahara-config
|
||||||
|
|
||||||
@ -134,21 +138,23 @@
|
|||||||
systemd_tempd_prefix: openstack
|
systemd_tempd_prefix: openstack
|
||||||
systemd_slice_name: sahara
|
systemd_slice_name: sahara
|
||||||
systemd_lock_path: /var/lock/sahara
|
systemd_lock_path: /var/lock/sahara
|
||||||
systemd_CPUAccounting: true
|
systemd_service_cpu_accounting: true
|
||||||
systemd_BlockIOAccounting: true
|
systemd_service_block_io_accounting: true
|
||||||
systemd_MemoryAccounting: true
|
systemd_service_memory_accounting: true
|
||||||
systemd_TasksAccounting: true
|
systemd_service_tasks_accounting: true
|
||||||
systemd_services: "{{ filtered_sahara_services }}"
|
systemd_services: "{{ filtered_sahara_services }}"
|
||||||
tags:
|
tags:
|
||||||
- sahara-config
|
- sahara-config
|
||||||
- systemd-service
|
- systemd-service
|
||||||
|
|
||||||
- import_tasks: sahara_db_sync.yml
|
- name: Importing sahara_db_sync tasks
|
||||||
|
import_tasks: sahara_db_sync.yml
|
||||||
when: _sahara_is_first_play_host
|
when: _sahara_is_first_play_host
|
||||||
tags:
|
tags:
|
||||||
- sahara-config
|
- sahara-config
|
||||||
|
|
||||||
- include_role:
|
- name: Including osa.service_setup role
|
||||||
|
include_role:
|
||||||
name: openstack.osa.service_setup
|
name: openstack.osa.service_setup
|
||||||
apply:
|
apply:
|
||||||
tags:
|
tags:
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
dest: "/etc/sahara/rootwrap.d/"
|
dest: "/etc/sahara/rootwrap.d/"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
|
mode: "0644"
|
||||||
with_fileglob:
|
with_fileglob:
|
||||||
- rootwrap.d/*
|
- rootwrap.d/*
|
||||||
notify:
|
notify:
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: create the system group
|
- name: Create the system group
|
||||||
group:
|
group:
|
||||||
name: "{{ sahara_system_group_name }}"
|
name: "{{ sahara_system_group_name }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
@ -31,9 +31,9 @@
|
|||||||
file:
|
file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ item.owner|default(sahara_system_user_name) }}"
|
owner: "{{ item.owner | default(sahara_system_user_name) }}"
|
||||||
group: "{{ item.group|default(sahara_system_group_name) }}"
|
group: "{{ item.group | default(sahara_system_group_name) }}"
|
||||||
mode: "{{ item.mode|default('0755') }}"
|
mode: "{{ item.mode | default('0755') }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { path: "/openstack/venvs", mode: "0755", owner: "root", group: "root" }
|
- { path: "/openstack/venvs", mode: "0755", owner: "root", group: "root" }
|
||||||
- { path: "/etc/sahara" }
|
- { path: "/etc/sahara" }
|
||||||
|
@ -13,7 +13,11 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
_sahara_is_first_play_host: "{{ (sahara_services['sahara-api']['group'] in group_names and inventory_hostname == (groups[sahara_services['sahara-api']['group']] | intersect(ansible_play_hosts)) | first) | bool }}"
|
_sahara_is_first_play_host: >-
|
||||||
|
{{
|
||||||
|
(sahara_services['sahara-api']['group'] in group_names and
|
||||||
|
inventory_hostname == (groups[sahara_services['sahara-api']['group']] | intersect(ansible_play_hosts)) | first) | bool
|
||||||
|
}}
|
||||||
|
|
||||||
filtered_sahara_services: |-
|
filtered_sahara_services: |-
|
||||||
{% set services = [] %}
|
{% set services = [] %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user