diff --git a/defaults/main.yml b/defaults/main.yml index bcc6c57..c345f45 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -26,7 +26,11 @@ debug: False # for the service setup. The host must already have # clouds.yaml properly configured. senlin_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}" -senlin_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((senlin_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}" +senlin_service_setup_host_python_interpreter: >- + {{ + openstack_service_setup_host_python_interpreter | default( + (senlin_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' @@ -38,7 +42,8 @@ senlin_venv_python_executable: "{{ openstack_venv_python_executable | default('p senlin_git_repo: https://opendev.org/openstack/senlin senlin_git_install_branch: master -senlin_upper_constraints_url: "{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}" +senlin_upper_constraints_url: >- + {{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }} senlin_git_constraints: - "--constraint {{ senlin_upper_constraints_url }}" @@ -52,7 +57,11 @@ senlin_fatal_deprecations: False ## Database info senlin_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}" -senlin_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((senlin_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}" +senlin_db_setup_python_interpreter: >- + {{ + openstack_db_setup_python_interpreter | default( + (senlin_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) + }} senlin_galera_address: "{{ galera_address | default('127.0.0.1') }}" senlin_galera_user: senlin senlin_galera_database: senlin @@ -177,16 +186,17 @@ senlin_service_down_time: 60 ## Cap the maximum number of threads / workers when a user value is unspecified. senlin_api_threads_max: 16 -senlin_api_threads: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, senlin_api_threads_max] | min }}" +senlin_api_threads: >- + {{ [[(ansible_facts['processor_vcpus'] // ansible_facts['processor_threads_per_core']) | default(1), 1] | max * 2, senlin_api_threads_max] | min }} senlin_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}" ## Policy vars # 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. -#senlin_policy_overrides: -# "cloudformation:ListStacks": "rule:deny_stack_user" -# "cloudformation:CreateStack": "rule:deny_stack_user" +# senlin_policy_overrides: +# "cloudformation:ListStacks": "rule:deny_stack_user" +# "cloudformation:CreateStack": "rule:deny_stack_user" # Common pip packages senlin_pip_packages: @@ -260,10 +270,10 @@ senlin_required_secrets: # uWSGI Settings senlin_api_uwsgi_ini_overrides: {} senlin_wsgi_processes_max: 16 -senlin_wsgi_processes: "{{ [[ansible_facts['processor_vcpus']|default(1), 1] | max * 2, senlin_wsgi_processes_max] | min }}" +senlin_wsgi_processes: "{{ [[ansible_facts['processor_vcpus'] | default(1), 1] | max * 2, senlin_wsgi_processes_max] | min }}" senlin_wsgi_threads: 1 senlin_api_uwsgi_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}" -#senlin_api_cfn_uwsgi_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}" +# senlin_api_cfn_uwsgi_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}" senlin_uwsgi_tls: crt: "{{ senlin_ssl_cert }}" key: "{{ senlin_ssl_key }}" @@ -323,5 +333,5 @@ senlin_pki_install_certificates: mode: "0600" # Define user-provided SSL certificates -#senlin_user_ssl_cert: -#senlin_user_ssl_key: +# senlin_user_ssl_cert: +# senlin_user_ssl_key: diff --git a/meta/main.yml b/meta/main.yml index fde26a3..6ca127b 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -18,19 +18,20 @@ galaxy_info: description: Installation and setup of senlin company: Rackspace license: Apache2 - min_ansible_version: 2.2 + role_name: os_senlin + 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 - python - senlin diff --git a/tasks/main.yml b/tasks/main.yml index de9c4fb..25fc5da 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -51,7 +51,8 @@ tags: - always -- include_role: +- name: Including osa.db_setup role + include_role: name: openstack.osa.db_setup apply: tags: @@ -72,7 +73,8 @@ tags: - always -- include_role: +- name: Including osa.mq_setup role + include_role: name: openstack.osa.mq_setup apply: tags: @@ -94,11 +96,13 @@ tags: - always -- import_tasks: senlin_pre_install.yml +- name: Importing senlin_pre_install tasks + import_tasks: senlin_pre_install.yml tags: - senlin-install -- import_tasks: senlin_install.yml +- name: Importing senlin_install tasks + import_tasks: senlin_install.yml tags: - senlin-install @@ -122,7 +126,8 @@ tags: - always -- import_tasks: senlin_post_install.yml +- name: Importing senlin_post_install tasks + import_tasks: senlin_post_install.yml tags: - senlin-config @@ -135,16 +140,17 @@ systemd_tempd_prefix: openstack systemd_slice_name: senlin systemd_lock_path: /var/lock/senlin - 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_senlin_services }}" tags: - senlin-config - systemd-service -- import_tasks: senlin_db_sync.yml +- name: Importing senlin_db_sync tasks + import_tasks: senlin_db_sync.yml when: - _senlin_is_first_play_host tags: @@ -160,7 +166,8 @@ - senlin-config - uwsgi -- include_role: +- name: Including osa.service_setup role + include_role: name: openstack.osa.service_setup apply: tags: diff --git a/tasks/senlin_install.yml b/tasks/senlin_install.yml index 77ed54e..8c0365c 100644 --- a/tasks/senlin_install.yml +++ b/tasks/senlin_install.yml @@ -19,6 +19,7 @@ section: "senlin" option: "install_method" value: "{{ senlin_install_method }}" + mode: "0644" - name: Refresh local facts to ensure the senlin section is present setup: diff --git a/tasks/senlin_pre_install.yml b/tasks/senlin_pre_install.yml index 44e619c..452a165 100644 --- a/tasks/senlin_pre_install.yml +++ b/tasks/senlin_pre_install.yml @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: create the system group +- name: Create the system group group: name: "{{ senlin_system_group_name }}" state: "present" @@ -56,8 +56,8 @@ src: "{{ item.src | default(omit) }}" dest: "{{ item.dest | default(omit) }}" state: "{{ item.state | default('directory') }}" - owner: "{{ item.owner|default(senlin_system_user_name) }}" - group: "{{ item.group|default(senlin_system_group_name) }}" + owner: "{{ item.owner | default(senlin_system_user_name) }}" + group: "{{ item.group | default(senlin_system_group_name) }}" mode: "{{ item.mode | default(omit) }}" force: "{{ item.force | default(omit) }}" when: diff --git a/vars/main.yml b/vars/main.yml index 1d8b1de..42d8f88 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. -_senlin_is_first_play_host: "{{ (senlin_services['senlin-api']['group'] in group_names and inventory_hostname == (groups[senlin_services['senlin-api']['group']] | intersect(ansible_play_hosts)) | first) | bool }}" +_senlin_is_first_play_host: >- + {{ + (senlin_services['senlin-api']['group'] in group_names and + inventory_hostname == (groups[senlin_services['senlin-api']['group']] | intersect(ansible_play_hosts)) | first) | bool + }} # # Compile a list of the services on a host based on whether