Merge "Fix linters and metadata"
This commit is contained in:
commit
8dc0edec53
|
@ -24,11 +24,16 @@ placement_package_state: "{{ package_state | default('latest') }}"
|
||||||
# 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.
|
||||||
placement_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
placement_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
||||||
placement_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((placement_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
placement_service_setup_host_python_interpreter: >-
|
||||||
|
{{
|
||||||
|
openstack_service_setup_host_python_interpreter | default(
|
||||||
|
(placement_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
|
||||||
|
}}
|
||||||
|
|
||||||
placement_git_repo: https://opendev.org/openstack/placement
|
placement_git_repo: https://opendev.org/openstack/placement
|
||||||
placement_git_install_branch: master
|
placement_git_install_branch: master
|
||||||
placement_upper_constraints_url: "{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}"
|
placement_upper_constraints_url: >-
|
||||||
|
{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}
|
||||||
placement_git_constraints:
|
placement_git_constraints:
|
||||||
- "--constraint {{ placement_upper_constraints_url }}"
|
- "--constraint {{ placement_upper_constraints_url }}"
|
||||||
|
|
||||||
|
@ -40,7 +45,11 @@ placement_bin: "{{ _placement_bin }}"
|
||||||
|
|
||||||
## Database info
|
## Database info
|
||||||
placement_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
placement_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
||||||
placement_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((placement_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
placement_db_setup_python_interpreter: >-
|
||||||
|
{{
|
||||||
|
openstack_db_setup_python_interpreter | default(
|
||||||
|
(placement_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
|
||||||
|
}}
|
||||||
placement_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
placement_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
||||||
placement_galera_database: placement
|
placement_galera_database: placement
|
||||||
placement_galera_user: placement
|
placement_galera_user: placement
|
||||||
|
@ -65,7 +74,8 @@ placement_service_port: 8780
|
||||||
|
|
||||||
# UWSGI
|
# UWSGI
|
||||||
placement_wsgi_processes_max: 16
|
placement_wsgi_processes_max: 16
|
||||||
placement_wsgi_processes: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, placement_wsgi_processes_max] | min }}"
|
placement_wsgi_processes: >-
|
||||||
|
{{ [[(ansible_facts['processor_vcpus'] // ansible_facts['processor_threads_per_core']) | default(1), 1] | max * 2, placement_wsgi_processes_max] | min }}
|
||||||
placement_wsgi_threads: 1
|
placement_wsgi_threads: 1
|
||||||
placement_uwsgi_tls:
|
placement_uwsgi_tls:
|
||||||
crt: "{{ placement_ssl_cert }}"
|
crt: "{{ placement_ssl_cert }}"
|
||||||
|
@ -183,5 +193,5 @@ placement_pki_install_certificates:
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
|
|
||||||
# Define user-provided SSL certificates
|
# Define user-provided SSL certificates
|
||||||
#placement_user_ssl_cert: <path to cert on ansible deployment host>
|
# placement_user_ssl_cert: <path to cert on ansible deployment host>
|
||||||
#placement_user_ssl_key: <path to cert on ansible deployment host>
|
# placement_user_ssl_key: <path to cert on ansible deployment host>
|
||||||
|
|
|
@ -18,19 +18,21 @@ galaxy_info:
|
||||||
description: Installation and setup of placement
|
description: Installation and setup of placement
|
||||||
company: Vexxhost
|
company: Vexxhost
|
||||||
license: Apache2
|
license: Apache2
|
||||||
min_ansible_version: 2.4
|
role_name: os_placement
|
||||||
|
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
|
||||||
- placement
|
- placement
|
||||||
|
|
|
@ -43,7 +43,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:
|
||||||
|
@ -64,11 +65,13 @@
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- import_tasks: placement_pre_install.yml
|
- name: Importing placement_pre_install tasks
|
||||||
|
import_tasks: placement_pre_install.yml
|
||||||
tags:
|
tags:
|
||||||
- placement-install
|
- placement-install
|
||||||
|
|
||||||
- import_tasks: placement_install.yml
|
- name: Importing placement_install tasks
|
||||||
|
import_tasks: placement_install.yml
|
||||||
tags:
|
tags:
|
||||||
- placement-install
|
- placement-install
|
||||||
|
|
||||||
|
@ -92,11 +95,13 @@
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- import_tasks: placement_post_install.yml
|
- name: Importing placement_post_install tasks
|
||||||
|
import_tasks: placement_post_install.yml
|
||||||
tags:
|
tags:
|
||||||
- placement-config
|
- placement-config
|
||||||
|
|
||||||
- import_tasks: placement_db_sync.yml
|
- name: Importing placement_db_sync tasks
|
||||||
|
import_tasks: placement_db_sync.yml
|
||||||
when: _placement_is_first_play_host
|
when: _placement_is_first_play_host
|
||||||
tags:
|
tags:
|
||||||
- placement-config
|
- placement-config
|
||||||
|
@ -111,7 +116,8 @@
|
||||||
- placement-config
|
- placement-config
|
||||||
- uwsgi
|
- uwsgi
|
||||||
|
|
||||||
- include_role:
|
- name: Including osa.service_setup role
|
||||||
|
include_role:
|
||||||
name: openstack.osa.service_setup
|
name: openstack.osa.service_setup
|
||||||
apply:
|
apply:
|
||||||
tags:
|
tags:
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
section: "placement"
|
section: "placement"
|
||||||
option: "install_method"
|
option: "install_method"
|
||||||
value: "{{ placement_install_method }}"
|
value: "{{ placement_install_method }}"
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
- name: Refresh local facts to ensure the placement section is present
|
- name: Refresh local facts to ensure the placement section is present
|
||||||
setup:
|
setup:
|
||||||
|
@ -62,6 +63,7 @@
|
||||||
section: "placement"
|
section: "placement"
|
||||||
option: "need_service_restart"
|
option: "need_service_restart"
|
||||||
value: true
|
value: true
|
||||||
|
mode: "0644"
|
||||||
when: (install_packages is changed) or
|
when: (install_packages is changed) or
|
||||||
('need_service_restart' not in ansible_local['openstack_ansible']['placement'])
|
('need_service_restart' not in ansible_local['openstack_ansible']['placement'])
|
||||||
|
|
||||||
|
@ -74,10 +76,10 @@
|
||||||
systemd_tempd_prefix: openstack
|
systemd_tempd_prefix: openstack
|
||||||
systemd_slice_name: placement
|
systemd_slice_name: placement
|
||||||
systemd_lock_path: /var/lock/placement
|
systemd_lock_path: /var/lock/placement
|
||||||
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:
|
systemd_services:
|
||||||
- service_name: "{{ service_var.service_name }}"
|
- service_name: "{{ service_var.service_name }}"
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "{{ item.group|default(placement_system_group_name) }}"
|
group: "{{ item.group | default(placement_system_group_name) }}"
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
config_overrides: "{{ item.config_overrides }}"
|
config_overrides: "{{ item.config_overrides }}"
|
||||||
config_type: "{{ item.config_type }}"
|
config_type: "{{ item.config_type }}"
|
||||||
|
|
|
@ -13,17 +13,17 @@
|
||||||
# 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: "{{ placement_system_group_name }}"
|
name: "{{ placement_system_group_name }}"
|
||||||
gid: "{{ placement_system_group_gid|default(omit) }}"
|
gid: "{{ placement_system_group_gid | default(omit) }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
system: "yes"
|
system: "yes"
|
||||||
|
|
||||||
- name: Create the placement system user
|
- name: Create the placement system user
|
||||||
user:
|
user:
|
||||||
name: "{{ placement_system_user_name }}"
|
name: "{{ placement_system_user_name }}"
|
||||||
uid: "{{ placement_system_user_uid|default(omit) }}"
|
uid: "{{ placement_system_user_uid | default(omit) }}"
|
||||||
group: "{{ placement_system_group_name }}"
|
group: "{{ placement_system_group_name }}"
|
||||||
comment: "{{ placement_system_comment }}"
|
comment: "{{ placement_system_comment }}"
|
||||||
shell: "{{ placement_system_shell }}"
|
shell: "{{ placement_system_shell }}"
|
||||||
|
@ -35,9 +35,9 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ item.owner|default(placement_system_user_name) }}"
|
owner: "{{ item.owner | default(placement_system_user_name) }}"
|
||||||
group: "{{ item.group|default(placement_system_group_name) }}"
|
group: "{{ item.group | default(placement_system_group_name) }}"
|
||||||
mode: "{{ item.mode|default('0755') }}"
|
mode: "{{ item.mode | default('0755') }}"
|
||||||
with_items:
|
with_items:
|
||||||
- path: "/openstack"
|
- path: "/openstack"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
placement_package_list: |-
|
placement_package_list: |-
|
||||||
{% set packages = (placement_distro_packages + placement_service_distro_packages) %}
|
{% set packages = placement_distro_packages + placement_service_distro_packages %}
|
||||||
{{ packages }}
|
{{ packages }}
|
||||||
|
|
||||||
_placement_bin: "/usr/bin"
|
_placement_bin: "/usr/bin"
|
||||||
|
|
|
@ -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.
|
||||||
|
|
||||||
_placement_is_first_play_host: "{{ (placement_services['placement-api']['group'] in group_names and inventory_hostname == (groups[placement_services['placement-api']['group']] | intersect(ansible_play_hosts)) | first) | bool }}"
|
_placement_is_first_play_host: >-
|
||||||
|
{{
|
||||||
|
(placement_services['placement-api']['group'] in group_names and
|
||||||
|
inventory_hostname == (groups[placement_services['placement-api']['group']] | intersect(ansible_play_hosts)) | first) | bool
|
||||||
|
}}
|
||||||
|
|
||||||
# Compile a list of the services on a host based on whether
|
# Compile a list of the services on a host based on whether
|
||||||
# the host is in the host group and the service is enabled.
|
# the host is in the host group and the service is enabled.
|
||||||
|
|
Loading…
Reference in New Issue