diff --git a/defaults/main.yml b/defaults/main.yml index 5a18eb2..6144d3d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -18,13 +18,18 @@ # for the service setup. The host must already have # clouds.yaml properly configured. blazar_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}" -blazar_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((blazar_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}" +blazar_service_setup_host_python_interpreter: >- + {{ + openstack_service_setup_host_python_interpreter | default( + (blazar_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) + }} blazar_package_state: "{{ package_state | default('latest') }}" blazar_git_repo: https://opendev.org/openstack/blazar blazar_git_install_branch: master -blazar_upper_constraints_url: "{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}" +blazar_upper_constraints_url: >- + {{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }} # Enable/Disable Ceilometer blazar_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}" @@ -59,7 +64,11 @@ blazar_system_user_home: "/var/lib/{{ blazar_system_user_name }}" ## Database credentials blazar_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}" -blazar_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((blazar_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}" +blazar_db_setup_python_interpreter: >- + {{ + openstack_db_setup_python_interpreter | default( + (blazar_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) + }} blazar_galera_address: "{{ galera_address | default('127.0.0.1') }}" blazar_galera_database: blazar blazar_galera_user: blazar @@ -110,7 +119,8 @@ blazar_services: # Blazar uWSGI settings blazar_wsgi_processes_max: 16 -blazar_wsgi_processes: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, blazar_wsgi_processes_max] | min }}" +blazar_wsgi_processes: >- + {{ [[(ansible_facts['processor_vcpus'] // ansible_facts['processor_threads_per_core']) | default(1), 1] | max * 2, blazar_wsgi_processes_max] | min }} blazar_wsgi_threads: 1 blazar_wsgi_buffer_size: 65535 blazar_uwsgi_tls: @@ -217,5 +227,5 @@ blazar_pki_install_certificates: mode: "0600" # Define user-provided SSL certificates -#blazar_user_ssl_cert: -#blazar_user_ssl_key: +# blazar_user_ssl_cert: +# blazar_user_ssl_key: diff --git a/meta/main.yml b/meta/main.yml index 8f577c4..d3942e4 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -17,19 +17,23 @@ galaxy_info: author: Taseer Ahmed - email: taseer94@gmail.com description: Blazar deployment with OpenStack Ansible + role_name: os_blazar + namespace: openstack company: Independent license: Apache2 - min_ansible_version: 2.3 + min_ansible_version: "2.10" platforms: - - name: Debian - versions: - - buster - - name: Ubuntu - versions: - - bionic - - focal + - name: Debian + versions: + - bullseye + - name: Ubuntu + versions: + - focal + - jammy + - name: EL + versions: + - "9" galaxy_tags: - cloud - python diff --git a/tasks/blazar_pre_install.yml b/tasks/blazar_pre_install.yml index 0017a74..6fd8a61 100644 --- a/tasks/blazar_pre_install.yml +++ b/tasks/blazar_pre_install.yml @@ -14,12 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: create blazar group +- name: Create blazar group group: name: "{{ blazar_system_group_name }}" state: present -- name: create blazar user +- name: Create blazar user user: name: "{{ blazar_system_user_name }}" group: "{{ blazar_system_group_name }}" diff --git a/tasks/main.yml b/tasks/main.yml index da0e166..ebce842 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -29,7 +29,8 @@ tags: - always -- include_role: +- name: Including osa.db_setup role + include_role: name: openstack.osa.db_setup apply: tags: @@ -50,7 +51,8 @@ tags: - always -- include_role: +- name: Including osa.mq_setup role + include_role: name: openstack.osa.mq_setup apply: tags: @@ -72,7 +74,8 @@ tags: - always -- import_tasks: blazar_pre_install.yml +- name: Importing blazar_pre_install tasks + import_tasks: blazar_pre_install.yml tags: - blazar-install @@ -113,11 +116,13 @@ tags: - blazar-install -- import_tasks: blazar_post_install.yml +- name: Importing blazar_post_install tasks + import_tasks: blazar_post_install.yml tags: - blazar-config -- import_tasks: blazar_db_setup.yml +- name: Importing blazar_db_setup tasks + import_tasks: blazar_db_setup.yml when: - _blazar_is_first_play_host tags: @@ -142,16 +147,17 @@ systemd_tempd_prefix: openstack systemd_slice_name: blazar systemd_lock_path: /var/lock/blazar - 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_blazar_services }}" tags: - blazar-config - systemd-service -- include_role: +- name: Including osa.service_setup role + include_role: name: openstack.osa.service_setup apply: tags: diff --git a/vars/main.yml b/vars/main.yml index 08dc456..666badc 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -13,7 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -_blazar_is_first_play_host: "{{ (blazar_services['blazar-api']['group'] in group_names and inventory_hostname == ((groups[blazar_services['blazar-api']['group']] | intersect(ansible_play_hosts)) | list)[0]) | bool }}" +_blazar_is_first_play_host: >- + {{ + (blazar_services['blazar-api']['group'] in group_names and + inventory_hostname == ((groups[blazar_services['blazar-api']['group']] | intersect(ansible_play_hosts)) | list)[0]) | bool + }} # # Compile a list of the services on a host based on whether