Fix for usage of modules via FQCN

Change-Id: I072d6eed813b6a083939b5913c7803baafe99c90
Signed-off-by: Ivan Anfimov <lazekteam@gmail.com>
This commit is contained in:
Ivan Anfimov
2025-06-02 14:42:55 +00:00
committed by Dmitriy Rabotyagov
parent e89e3b34f1
commit 542e17fb0d
8 changed files with 35 additions and 33 deletions

View File

@@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
## Verbosity Options ## Verbosity Options
debug: False debug: false
# 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'
@@ -88,7 +88,7 @@ adjutant_wsgi_threads: 1
adjutant_wsgi_processes_max: 16 adjutant_wsgi_processes_max: 16
adjutant_wsgi_processes: >- adjutant_wsgi_processes: >-
{{ [[(ansible_facts['processor_vcpus'] // ansible_facts['processor_threads_per_core']) | default(1), 1] | max * 2, adjutant_wsgi_processes_max] | min }} {{ [[(ansible_facts['processor_vcpus'] // ansible_facts['processor_threads_per_core']) | default(1), 1] | max * 2, adjutant_wsgi_processes_max] | min }}
adjutant_use_uwsgi: True adjutant_use_uwsgi: true
adjutant_uwsgi_tls: adjutant_uwsgi_tls:
crt: "{{ adjutant_ssl_cert }}" crt: "{{ adjutant_ssl_cert }}"
key: "{{ adjutant_ssl_key }}" key: "{{ adjutant_ssl_key }}"
@@ -97,8 +97,8 @@ adjutant_email_backend: django.core.mail.backends.smtp.EmailBackend
adjutant_email_host: localhost adjutant_email_host: localhost
adjutant_email_port: 587 adjutant_email_port: 587
adjutant_email_host_user: adjutant adjutant_email_host_user: adjutant
adjutant_email_use_tls: True adjutant_email_use_tls: true
adjutant_email_use_ssl: False adjutant_email_use_ssl: false
adjutant_email_reply_address: no-reply@example.com adjutant_email_reply_address: no-reply@example.com
adjutant_email_from_address: bounce+%(task_uuid)s@example.com adjutant_email_from_address: bounce+%(task_uuid)s@example.com
adjutant_email_notification_address: example@example.com adjutant_email_notification_address: example@example.com
@@ -133,8 +133,8 @@ adjutant_blacklisted_roles:
adjutant_default_users_to_project_action: [] adjutant_default_users_to_project_action: []
adjutant_default_roles_to_project_action: [] adjutant_default_roles_to_project_action: []
adjutant_default_quota_size: small adjutant_default_quota_size: small
adjutant_signup_allow_auto_approve: False adjutant_signup_allow_auto_approve: false
adjutant_quota_allow_auto_approve: False adjutant_quota_allow_auto_approve: false
adjutant_quota_size_difference_threshold: 0.1 adjutant_quota_size_difference_threshold: 0.1
adjutant_quota_auto_approve_days: 30 adjutant_quota_auto_approve_days: 30
adjutant_quota_sizes: adjutant_quota_sizes:
@@ -293,7 +293,7 @@ adjutant_pki_setup_host: "{{ openstack_pki_setup_host | default('localhost') }}"
adjutant_pki_keys_path: "{{ adjutant_pki_dir ~ '/certs/private/' }}" adjutant_pki_keys_path: "{{ adjutant_pki_dir ~ '/certs/private/' }}"
adjutant_pki_certs_path: "{{ adjutant_pki_dir ~ '/certs/certs/' }}" adjutant_pki_certs_path: "{{ adjutant_pki_dir ~ '/certs/certs/' }}"
adjutant_pki_intermediate_cert_name: "{{ openstack_pki_service_intermediate_cert_name | default('ExampleCorpIntermediate') }}" adjutant_pki_intermediate_cert_name: "{{ openstack_pki_service_intermediate_cert_name | default('ExampleCorpIntermediate') }}"
adjutant_pki_regen_cert: '' adjutant_pki_regen_cert: ""
adjutant_pki_san: "{{ openstack_pki_san | default('DNS:' ~ ansible_facts['hostname'] ~ ',IP:' ~ management_address) }}" adjutant_pki_san: "{{ openstack_pki_san | default('DNS:' ~ ansible_facts['hostname'] ~ ',IP:' ~ management_address) }}"
adjutant_pki_certificates: adjutant_pki_certificates:
- name: "adjutant_{{ ansible_facts['hostname'] }}" - name: "adjutant_{{ ansible_facts['hostname'] }}"

View File

@@ -14,11 +14,11 @@
# limitations under the License. # limitations under the License.
- name: Stop services - name: Stop services
service: ansible.builtin.service:
name: "{{ item.service_name }}" name: "{{ item.service_name }}"
enabled: "{{ item.service_enabled | bool }}" enabled: "{{ item.service_enabled | bool }}"
state: "stopped" state: "stopped"
daemon_reload: yes daemon_reload: true
with_items: "{{ filtered_adjutant_services }}" with_items: "{{ filtered_adjutant_services }}"
register: _stop register: _stop
until: _stop is success until: _stop is success
@@ -30,11 +30,11 @@
- cert installed - cert installed
- name: Start services - name: Start services
service: ansible.builtin.service:
name: "{{ item.service_name }}" name: "{{ item.service_name }}"
enabled: yes enabled: true
state: "started" state: "started"
daemon_reload: yes daemon_reload: true
with_items: "{{ filtered_adjutant_services }}" with_items: "{{ filtered_adjutant_services }}"
when: when:
- item.service_enabled | bool - item.service_enabled | bool

View File

@@ -16,7 +16,7 @@
# limitations under the License. # limitations under the License.
- name: Perform adjutant migrate - name: Perform adjutant migrate
command: "{{ adjutant_bin }}/adjutant-api migrate" ansible.builtin.command: "{{ adjutant_bin }}/adjutant-api migrate"
become: yes become: true
become_user: "{{ adjutant_system_user_name }}" become_user: "{{ adjutant_system_user_name }}"
changed_when: false changed_when: false

View File

@@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
- name: Install the python venv - name: Install the python venv
import_role: ansible.builtin.import_role:
name: "python_venv_build" name: "python_venv_build"
vars: vars:
venv_python_executable: "{{ adjutant_venv_python_executable }}" venv_python_executable: "{{ adjutant_venv_python_executable }}"
@@ -35,13 +35,13 @@
# To reduce places where we need mysql-devel, we install mysqlclient separately inside # To reduce places where we need mysql-devel, we install mysqlclient separately inside
# venv on the adjutant containers directly. # venv on the adjutant containers directly.
- name: Install maria devel packages - name: Install maria devel packages
import_role: ansible.builtin.import_role:
name: galera_server name: galera_server
vars: vars:
galera_install_devel: true galera_install_devel: true
- name: Install distro packages for extra package build - name: Install distro packages for extra package build
package: ansible.builtin.package:
name: "{{ adjutant_distro_packages }}" name: "{{ adjutant_distro_packages }}"
state: "{{ adjutant_package_state }}" state: "{{ adjutant_package_state }}"
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}" update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
@@ -52,7 +52,7 @@
delay: 2 delay: 2
- name: Install extra pip packages into build venv - name: Install extra pip packages into build venv
pip: ansible.builtin.pip:
virtualenv: "{{ adjutant_bin | dirname }}" virtualenv: "{{ adjutant_bin | dirname }}"
name: "{{ adjutant_pip_extra_packages }}" name: "{{ adjutant_pip_extra_packages }}"
state: present state: present

View File

@@ -34,7 +34,7 @@
- Restart uwsgi services - Restart uwsgi services
- name: Drop Adjutant WSGI Configs - name: Drop Adjutant WSGI Configs
template: ansible.builtin.template:
src: wsgi.py.j2 src: wsgi.py.j2
dest: "{{ adjutant_bin }}/adjutant-api-wsgi" dest: "{{ adjutant_bin }}/adjutant-api-wsgi"
owner: "{{ adjutant_system_user_name }}" owner: "{{ adjutant_system_user_name }}"

View File

@@ -16,13 +16,13 @@
# limitations under the License. # limitations under the License.
- name: Create the system group - name: Create the system group
group: ansible.builtin.group:
name: "{{ adjutant_system_group_name }}" name: "{{ adjutant_system_group_name }}"
state: "present" state: "present"
system: "yes" system: "yes"
- name: Create the adjutant system user - name: Create the adjutant system user
user: ansible.builtin.user:
name: "{{ adjutant_system_user_name }}" name: "{{ adjutant_system_user_name }}"
group: "{{ adjutant_system_group_name }}" group: "{{ adjutant_system_group_name }}"
comment: "{{ adjutant_system_comment }}" comment: "{{ adjutant_system_comment }}"
@@ -32,7 +32,7 @@
home: "{{ adjutant_system_home_folder }}" home: "{{ adjutant_system_home_folder }}"
- name: Create adjutant dir - name: Create adjutant dir
file: ansible.builtin.file:
path: "{{ item.path }}" path: "{{ item.path }}"
state: directory state: directory
owner: "{{ item.owner | default(adjutant_system_user_name) }}" owner: "{{ item.owner | default(adjutant_system_user_name) }}"

View File

@@ -16,7 +16,7 @@
# limitations under the License. # limitations under the License.
- name: Gather variables for each operating system - name: Gather variables for each operating system
include_vars: "{{ lookup('first_found', params) }}" ansible.builtin.include_vars: "{{ lookup('first_found', params) }}"
vars: vars:
params: params:
files: files:
@@ -31,7 +31,7 @@
- always - always
- name: Including osa.db_setup role - name: Including osa.db_setup role
include_role: ansible.builtin.include_role:
name: openstack.osa.db_setup name: openstack.osa.db_setup
apply: apply:
tags: tags:
@@ -52,17 +52,17 @@
- always - always
- name: Importing adjutant_pre_install tasks - name: Importing adjutant_pre_install tasks
import_tasks: adjutant_pre_install.yml ansible.builtin.import_tasks: adjutant_pre_install.yml
tags: tags:
- adjutant-install - adjutant-install
- name: Importing adjutant_install tasks - name: Importing adjutant_install tasks
import_tasks: adjutant_install.yml ansible.builtin.import_tasks: adjutant_install.yml
tags: tags:
- adjutant-install - adjutant-install
- name: Create and install SSL certificates - name: Create and install SSL certificates
include_role: ansible.builtin.include_role:
name: pki name: pki
tasks_from: main_certs.yml tasks_from: main_certs.yml
apply: apply:
@@ -82,18 +82,18 @@
- always - always
- name: Importing adjutant_post_install tasks - name: Importing adjutant_post_install tasks
import_tasks: adjutant_post_install.yml ansible.builtin.import_tasks: adjutant_post_install.yml
tags: tags:
- adjutant-config - adjutant-config
- name: Importing adjutant_db_sync tasks - name: Importing adjutant_db_sync tasks
import_tasks: adjutant_db_sync.yml ansible.builtin.import_tasks: adjutant_db_sync.yml
when: _adjutant_is_first_play_host when: _adjutant_is_first_play_host
tags: tags:
- adjutant-config - adjutant-config
- name: Including osa.service_setup role - name: Including osa.service_setup role
include_role: ansible.builtin.include_role:
name: openstack.osa.service_setup name: openstack.osa.service_setup
apply: apply:
tags: tags:
@@ -131,7 +131,7 @@
- always - always
- name: Run the systemd service role - name: Run the systemd service role
include_role: ansible.builtin.include_role:
name: systemd_service name: systemd_service
vars: vars:
systemd_user_name: "{{ adjutant_system_user_name }}" systemd_user_name: "{{ adjutant_system_user_name }}"
@@ -158,7 +158,7 @@
- systemd-service - systemd-service
- name: Import uwsgi role - name: Import uwsgi role
import_role: ansible.builtin.import_role:
name: uwsgi name: uwsgi
vars: vars:
uwsgi_services: "{{ uwsgi_adjutant_services }}" uwsgi_services: "{{ uwsgi_adjutant_services }}"
@@ -169,4 +169,4 @@
- uwsgi - uwsgi
- name: Flush handlers - name: Flush handlers
meta: flush_handlers ansible.builtin.meta: flush_handlers

View File

@@ -13,6 +13,8 @@ django:
PASSWORD: '{{ adjutant_galera_password }}' PASSWORD: '{{ adjutant_galera_password }}'
USER: '{{ adjutant_galera_user }}' USER: '{{ adjutant_galera_user }}'
PORT: '{{ adjutant_galera_port }}' PORT: '{{ adjutant_galera_port }}'
OPTIONS:
ssl: {{ adjutant_galera_use_ssl }}
logging: logging:
version: 1 version: 1
disable_existing_loggers: False disable_existing_loggers: False