Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654 Change-Id: I175072167602b6ec400d21b9350533a58901f890
This commit is contained in:
parent
e85642f80c
commit
590e0235ab
@ -21,7 +21,7 @@ manila_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.
|
||||||
manila_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
manila_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
||||||
manila_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((manila_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"
|
manila_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((manila_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
||||||
|
|
||||||
# Set installation method.
|
# Set installation method.
|
||||||
manila_install_method: "{{ service_install_method | default('source') }}"
|
manila_install_method: "{{ service_install_method | default('source') }}"
|
||||||
@ -52,7 +52,7 @@ manila_fatal_deprecations: False
|
|||||||
|
|
||||||
## Database info
|
## Database info
|
||||||
manila_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
manila_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
|
||||||
manila_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((manila_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"
|
manila_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((manila_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
|
||||||
manila_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
manila_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
||||||
manila_galera_user: manila
|
manila_galera_user: manila
|
||||||
manila_galera_database: manila
|
manila_galera_database: manila
|
||||||
@ -161,7 +161,7 @@ manila_service_data_program_enabled: false
|
|||||||
|
|
||||||
## Cap the maximun number of threads / workers when a user value is unspecified.
|
## Cap the maximun number of threads / workers when a user value is unspecified.
|
||||||
manila_osapi_share_workers_max: 16
|
manila_osapi_share_workers_max: 16
|
||||||
manila_osapi_share_workers: "{{ [[(ansible_processor_vcpus//ansible_processor_threads_per_core)|default(1), 1] | max * 2, manila_osapi_share_workers_max] | min }}"
|
manila_osapi_share_workers: "{{ [[(ansible_facts['processor_vcpus']//ansible_facts['processor_threads_per_core'])|default(1), 1] | max * 2, manila_osapi_share_workers_max] | min }}"
|
||||||
|
|
||||||
## Manila RPC
|
## Manila RPC
|
||||||
manila_rpc_executor_thread_pool_size: 64
|
manila_rpc_executor_thread_pool_size: 64
|
||||||
@ -275,7 +275,7 @@ manila_services:
|
|||||||
#condition: "{{ manila_service_data_program_enabled | bool }}"
|
#condition: "{{ manila_service_data_program_enabled | bool }}"
|
||||||
# Manila uWSGI settings
|
# Manila uWSGI settings
|
||||||
manila_wsgi_processes_max: 16
|
manila_wsgi_processes_max: 16
|
||||||
manila_wsgi_processes: "{{ [[ansible_processor_vcpus|default(1), 1] | max * 2, manila_wsgi_processes_max] | min }}"
|
manila_wsgi_processes: "{{ [[ansible_facts['processor_vcpus']|default(1), 1] | max * 2, manila_wsgi_processes_max] | min }}"
|
||||||
manila_wsgi_threads: 1
|
manila_wsgi_threads: 1
|
||||||
manila_wsgi_buffer_size: 65535
|
manila_wsgi_buffer_size: 65535
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
name: "{{ item.service_name }}"
|
name: "{{ item.service_name }}"
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: stopped
|
state: stopped
|
||||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
daemon_reload: yes
|
||||||
with_items: "{{ filtered_manila_services }}"
|
with_items: "{{ filtered_manila_services }}"
|
||||||
register: _stop
|
register: _stop
|
||||||
until: _stop is success
|
until: _stop is success
|
||||||
@ -42,7 +42,7 @@
|
|||||||
name: "{{ item.service_name }}"
|
name: "{{ item.service_name }}"
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: "started"
|
state: "started"
|
||||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
daemon_reload: yes
|
||||||
with_items: "{{ filtered_manila_services }}"
|
with_items: "{{ filtered_manila_services }}"
|
||||||
register: _start
|
register: _start
|
||||||
until: _start is success
|
until: _start is success
|
||||||
|
@ -36,4 +36,4 @@ galaxy_info:
|
|||||||
dependencies:
|
dependencies:
|
||||||
- role: apt_package_pinning
|
- role: apt_package_pinning
|
||||||
when:
|
when:
|
||||||
- ansible_pkg_mgr == 'apt'
|
- ansible_facts['pkg_mgr'] == 'apt'
|
||||||
|
@ -16,12 +16,12 @@
|
|||||||
- name: Gather variables for each operating system
|
- name: Gather variables for each operating system
|
||||||
include_vars: "{{ item }}"
|
include_vars: "{{ item }}"
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
- name: Add in manila devices types
|
- name: Add in manila devices types
|
||||||
shell: |
|
shell: |
|
||||||
. {{ ansible_env.HOME }}/openrc
|
. {{ ansible_facts['env']['HOME'] }}/openrc
|
||||||
CLI_OPTIONS="--endpoint-type internalURL {{ ((keystone_service_adminuri_insecure | bool) or (manila_service_internaluri_insecure | bool)) | ternary('--insecure','') }}"
|
CLI_OPTIONS="--endpoint-type internalURL {{ ((keystone_service_adminuri_insecure | bool) or (manila_service_internaluri_insecure | bool)) | ternary('--insecure','') }}"
|
||||||
if ! {{ manila_bin }}/manila ${CLI_OPTIONS} type-list | grep -q "{{ item.key }}"; then
|
if ! {{ manila_bin }}/manila ${CLI_OPTIONS} type-list | grep -q "{{ item.key }}"; then
|
||||||
{{ manila_bin }}/manila ${CLI_OPTIONS} type-create "{{ item.key }}" "{{ item.value.driver_handles_share_servers }}"
|
{{ manila_bin }}/manila ${CLI_OPTIONS} type-create "{{ item.key }}" "{{ item.value.driver_handles_share_servers }}"
|
||||||
|
@ -29,8 +29,8 @@
|
|||||||
package:
|
package:
|
||||||
name: "{{ manila_package_list }}"
|
name: "{{ manila_package_list }}"
|
||||||
state: "{{ manila_package_state }}"
|
state: "{{ manila_package_state }}"
|
||||||
update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}"
|
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
|
||||||
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
|
cache_valid_time: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary(cache_timeout, omit) }}"
|
||||||
register: install_packages
|
register: install_packages
|
||||||
until: install_packages is success
|
until: install_packages is success
|
||||||
retries: 5
|
retries: 5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user