Auto-fix yaml rules
In order to reduce divergance with ansible-lint rules, we apply auto-fixing of violations. In current patch we replace all kind of truthy variables with `true` or `false` values to align with recommendations along with alignment of used quotes. Change-Id: Ie1737a7f88d783e39492c704bb6805c89a199553
This commit is contained in:
parent
5cdbe69b50
commit
aa1503d8ce
1
.gitignore
vendored
1
.gitignore
vendored
@ -45,6 +45,7 @@ logs/*
|
|||||||
# OS generated files #
|
# OS generated files #
|
||||||
######################
|
######################
|
||||||
._*
|
._*
|
||||||
|
.ansible
|
||||||
.tox
|
.tox
|
||||||
*.egg-info
|
*.egg-info
|
||||||
.eggs
|
.eggs
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
# 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.
|
||||||
|
|
||||||
|
|
||||||
# Enable/Disable barbican configurations
|
# Enable/Disable barbican configurations
|
||||||
nova_barbican_enabled: "{{ (groups['barbican_all'] is defined) and (groups['barbican_all'] | length > 0) }}"
|
nova_barbican_enabled: "{{ (groups['barbican_all'] is defined) and (groups['barbican_all'] | length > 0) }}"
|
||||||
# Enable/Disable blazar configurations
|
# Enable/Disable blazar configurations
|
||||||
@ -25,7 +23,7 @@ nova_notifications_designate: notifications_designate
|
|||||||
# Enable/Disable ceilometer configurations
|
# Enable/Disable ceilometer configurations
|
||||||
nova_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
|
nova_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
|
||||||
# Enable/Disable nova versioned notification
|
# Enable/Disable nova versioned notification
|
||||||
nova_versioned_notification_enabled: False
|
nova_versioned_notification_enabled: false
|
||||||
|
|
||||||
# Caching
|
# Caching
|
||||||
nova_cache_servers: "{{ nova_memcached_servers | default(memcached_servers) }}"
|
nova_cache_servers: "{{ nova_memcached_servers | default(memcached_servers) }}"
|
||||||
@ -33,7 +31,7 @@ nova_cache_backend: "{{ openstack_cache_backend | default('oslo_cache.memcache_p
|
|||||||
nova_cache_backend_map: "{{ openstack_cache_backend_map | default(_nova_cache_backend_map) }}"
|
nova_cache_backend_map: "{{ openstack_cache_backend_map | default(_nova_cache_backend_map) }}"
|
||||||
|
|
||||||
## Verbosity Options
|
## Verbosity Options
|
||||||
debug: False
|
debug: false
|
||||||
|
|
||||||
# Set the host which will execute the shade modules
|
# Set the host which will execute the shade modules
|
||||||
# for the service setup. The host must already have
|
# for the service setup. The host must already have
|
||||||
@ -128,7 +126,7 @@ nova_api_db_connection_recycle_time: "{{ openstack_db_connection_recycle_time |
|
|||||||
## DB Cells
|
## DB Cells
|
||||||
nova_cell0_database: "nova_cell0"
|
nova_cell0_database: "nova_cell0"
|
||||||
nova_cell1_name: "cell1"
|
nova_cell1_name: "cell1"
|
||||||
nova_cell_force_update: False
|
nova_cell_force_update: false
|
||||||
|
|
||||||
## Oslo Messaging
|
## Oslo Messaging
|
||||||
|
|
||||||
@ -189,23 +187,22 @@ nova_virt_types:
|
|||||||
ironic:
|
ironic:
|
||||||
nova_compute_driver: ironic.IronicDriver
|
nova_compute_driver: ironic.IronicDriver
|
||||||
nova_reserved_host_memory_mb: 0
|
nova_reserved_host_memory_mb: 0
|
||||||
nova_scheduler_tracks_instance_changes: False
|
nova_scheduler_tracks_instance_changes: false
|
||||||
kvm:
|
kvm:
|
||||||
nova_compute_driver: libvirt.LibvirtDriver
|
nova_compute_driver: libvirt.LibvirtDriver
|
||||||
nova_reserved_host_memory_mb: 2048
|
nova_reserved_host_memory_mb: 2048
|
||||||
nova_scheduler_tracks_instance_changes: True
|
nova_scheduler_tracks_instance_changes: true
|
||||||
qemu:
|
qemu:
|
||||||
nova_compute_driver: libvirt.LibvirtDriver
|
nova_compute_driver: libvirt.LibvirtDriver
|
||||||
nova_reserved_host_memory_mb: 2048
|
nova_reserved_host_memory_mb: 2048
|
||||||
nova_scheduler_tracks_instance_changes: True
|
nova_scheduler_tracks_instance_changes: true
|
||||||
nova_cpu_mode: "none"
|
nova_cpu_mode: "none"
|
||||||
|
|
||||||
|
|
||||||
# If this is not set, then the playbook will try to guess it.
|
# If this is not set, then the playbook will try to guess it.
|
||||||
# nova_virt_type: kvm
|
# nova_virt_type: kvm
|
||||||
|
|
||||||
# Enable Kernel Shared Memory (KSM)
|
# Enable Kernel Shared Memory (KSM)
|
||||||
nova_compute_ksm_enabled: False
|
nova_compute_ksm_enabled: false
|
||||||
|
|
||||||
# if set, nova_virt_type must be one of these:
|
# if set, nova_virt_type must be one of these:
|
||||||
nova_supported_virt_types:
|
nova_supported_virt_types:
|
||||||
@ -258,7 +255,7 @@ nova_spice_html5proxy_base_proto: "{{ openstack_service_publicuri_proto | defaul
|
|||||||
nova_spice_html5proxy_base_port: 6082
|
nova_spice_html5proxy_base_port: 6082
|
||||||
nova_spice_html5proxy_base_uri: "{{ nova_spice_html5proxy_base_proto }}://{{ external_lb_vip_address }}:{{ nova_spice_html5proxy_base_port }}"
|
nova_spice_html5proxy_base_uri: "{{ nova_spice_html5proxy_base_proto }}://{{ external_lb_vip_address }}:{{ nova_spice_html5proxy_base_port }}"
|
||||||
nova_spice_html5proxy_base_url: "{{ nova_spice_html5proxy_base_uri }}/spice_auto.html"
|
nova_spice_html5proxy_base_url: "{{ nova_spice_html5proxy_base_uri }}/spice_auto.html"
|
||||||
nova_spice_console_agent_enabled: True
|
nova_spice_console_agent_enabled: true
|
||||||
nova_spicehtml5_git_repo: "{{ spicehtml5_git_repo | default('https://gitlab.freedesktop.org/spice/spice-html5.git') }}"
|
nova_spicehtml5_git_repo: "{{ spicehtml5_git_repo | default('https://gitlab.freedesktop.org/spice/spice-html5.git') }}"
|
||||||
nova_spicehtml5_git_install_branch: "{{ spicehtml5_git_install_branch | default('master') }}"
|
nova_spicehtml5_git_install_branch: "{{ spicehtml5_git_install_branch | default('master') }}"
|
||||||
|
|
||||||
@ -282,12 +279,12 @@ nova_serialconsoleproxy_base_url: "{{ nova_serialconsoleproxy_base_uri }}"
|
|||||||
nova_serialconsoleproxy_serialconsole_proxyserver_proxyclient_address: "{{ nova_management_address }}"
|
nova_serialconsoleproxy_serialconsole_proxyserver_proxyclient_address: "{{ nova_management_address }}"
|
||||||
|
|
||||||
## Nova metadata
|
## Nova metadata
|
||||||
nova_metadata_proxy_enabled: True
|
nova_metadata_proxy_enabled: true
|
||||||
nova_metadata_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}"
|
nova_metadata_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}"
|
||||||
nova_metadata_port: 8775
|
nova_metadata_port: 8775
|
||||||
|
|
||||||
## Nova compute
|
## Nova compute
|
||||||
nova_nested_virt_enabled: False
|
nova_nested_virt_enabled: false
|
||||||
|
|
||||||
# Uwsgi settings
|
# Uwsgi settings
|
||||||
nova_wsgi_processes_max: 16
|
nova_wsgi_processes_max: 16
|
||||||
@ -301,14 +298,14 @@ nova_uwsgi_tls:
|
|||||||
# Warning: If nova_libvirt_inject_key or nova_libvirt_inject_password are enabled for Ubuntu compute hosts
|
# Warning: If nova_libvirt_inject_key or nova_libvirt_inject_password are enabled for Ubuntu compute hosts
|
||||||
# then the kernel will be made readable to nova user (a requirement for libguestfs).
|
# then the kernel will be made readable to nova user (a requirement for libguestfs).
|
||||||
# See Launchpad bugs 1507915 (Nova), 759725 (Ubuntu), and http://libguestfs.org/guestfs-faq.1.html
|
# See Launchpad bugs 1507915 (Nova), 759725 (Ubuntu), and http://libguestfs.org/guestfs-faq.1.html
|
||||||
nova_libvirt_inject_key: False
|
nova_libvirt_inject_key: false
|
||||||
# inject partition options:
|
# inject partition options:
|
||||||
# -2 => disable, -1 => inspect (libguestfs only), 0 => not partitioned, >0 => partition number
|
# -2 => disable, -1 => inspect (libguestfs only), 0 => not partitioned, >0 => partition number
|
||||||
nova_libvirt_inject_partition: -2
|
nova_libvirt_inject_partition: -2
|
||||||
nova_libvirt_inject_password: False
|
nova_libvirt_inject_password: false
|
||||||
nova_libvirt_disk_cachemodes: '{{ (nova_libvirt_images_rbd_pool | length > 0) | ternary("network=writeback", "") }}'
|
nova_libvirt_disk_cachemodes: '{{ (nova_libvirt_images_rbd_pool | length > 0) | ternary("network=writeback", "") }}'
|
||||||
nova_libvirt_hw_disk_discard: '{{ (nova_libvirt_images_rbd_pool | length > 0) | ternary("unmap", "ignore") }}'
|
nova_libvirt_hw_disk_discard: '{{ (nova_libvirt_images_rbd_pool | length > 0) | ternary("unmap", "ignore") }}'
|
||||||
nova_libvirt_live_migration_inbound_addr: '{{ _nova_my_ip }}'
|
nova_libvirt_live_migration_inbound_addr: "{{ _nova_my_ip }}"
|
||||||
|
|
||||||
## Nova console
|
## Nova console
|
||||||
# Set the console type for the compute host. Presently the only options are ["spice", "novnc", "serialconsole", "disabled"].
|
# Set the console type for the compute host. Presently the only options are ["spice", "novnc", "serialconsole", "disabled"].
|
||||||
@ -391,16 +388,16 @@ nova_nfs_client: []
|
|||||||
# Nova Ceph rbd
|
# Nova Ceph rbd
|
||||||
# Enble and define nova_libvirt_images_rbd_pool to use rbd as nova backend
|
# Enble and define nova_libvirt_images_rbd_pool to use rbd as nova backend
|
||||||
# nova_libvirt_images_rbd_pool: vms
|
# nova_libvirt_images_rbd_pool: vms
|
||||||
nova_libvirt_images_rbd_pool: ''
|
nova_libvirt_images_rbd_pool: ""
|
||||||
nova_ceph_client: "{{ cinder_ceph_client }}"
|
nova_ceph_client: "{{ cinder_ceph_client }}"
|
||||||
|
|
||||||
# Enabled upstream if RBD is in use on cinder backends, which requires that
|
# Enabled upstream if RBD is in use on cinder backends, which requires that
|
||||||
# ceph be deployed on the nova compute hosts to enable volume backed instances.
|
# ceph be deployed on the nova compute hosts to enable volume backed instances.
|
||||||
nova_cinder_rbd_inuse: False
|
nova_cinder_rbd_inuse: false
|
||||||
|
|
||||||
# Enable compute nodes to retrieve images from RBD directly rather then through
|
# Enable compute nodes to retrieve images from RBD directly rather then through
|
||||||
# HTTP if images_type is NOT set to RBD. Must be False if nova images stored in RBD.
|
# HTTP if images_type is NOT set to RBD. Must be False if nova images stored in RBD.
|
||||||
nova_glance_rbd_inuse: False
|
nova_glance_rbd_inuse: false
|
||||||
nova_glance_images_rbd_pool: "{{ glance_rbd_store_pool | default('images') }}"
|
nova_glance_images_rbd_pool: "{{ glance_rbd_store_pool | default('images') }}"
|
||||||
|
|
||||||
# Used to determine if we need a Ceph client
|
# Used to determine if we need a Ceph client
|
||||||
@ -476,7 +473,7 @@ nova_services:
|
|||||||
service_name: nova-api-metadata
|
service_name: nova-api-metadata
|
||||||
init_config_overrides: "{{ nova_api_metadata_init_overrides }}"
|
init_config_overrides: "{{ nova_api_metadata_init_overrides }}"
|
||||||
start_order: 5
|
start_order: 5
|
||||||
wsgi_app: True
|
wsgi_app: true
|
||||||
uwsgi_overrides: "{{ nova_api_metadata_uwsgi_ini_overrides }}"
|
uwsgi_overrides: "{{ nova_api_metadata_uwsgi_ini_overrides }}"
|
||||||
uwsgi_bind_address: "{{ nova_metadata_bind_address }}"
|
uwsgi_bind_address: "{{ nova_metadata_bind_address }}"
|
||||||
uwsgi_port: "{{ nova_metadata_port }}"
|
uwsgi_port: "{{ nova_metadata_port }}"
|
||||||
@ -487,7 +484,7 @@ nova_services:
|
|||||||
service_name: nova-api-os-compute
|
service_name: nova-api-os-compute
|
||||||
init_config_overrides: "{{ {'Install': {'Alias': 'nova-api.service'}} | combine(nova_api_os_compute_init_overrides, recursive=True) }}"
|
init_config_overrides: "{{ {'Install': {'Alias': 'nova-api.service'}} | combine(nova_api_os_compute_init_overrides, recursive=True) }}"
|
||||||
start_order: 4
|
start_order: 4
|
||||||
wsgi_app: True
|
wsgi_app: true
|
||||||
uwsgi_overrides: "{{ nova_api_os_compute_uwsgi_ini_overrides }}"
|
uwsgi_overrides: "{{ nova_api_os_compute_uwsgi_ini_overrides }}"
|
||||||
uwsgi_bind_address: "{{ nova_service_bind_address }}"
|
uwsgi_bind_address: "{{ nova_service_bind_address }}"
|
||||||
uwsgi_port: "{{ nova_service_port }}"
|
uwsgi_port: "{{ nova_service_port }}"
|
||||||
@ -624,7 +621,7 @@ nova_pki_certs_path: "{{ nova_pki_dir ~ '/certs/certs/' }}"
|
|||||||
nova_pki_intermediate_cert_name: "{{ openstack_pki_service_intermediate_cert_name }}"
|
nova_pki_intermediate_cert_name: "{{ openstack_pki_service_intermediate_cert_name }}"
|
||||||
nova_pki_intermediate_chain_path: >-
|
nova_pki_intermediate_chain_path: >-
|
||||||
{{ nova_pki_dir ~ '/roots/' ~ nova_pki_intermediate_cert_name ~ '/certs/' ~ nova_pki_intermediate_cert_name ~ '-chain.crt' }}
|
{{ nova_pki_dir ~ '/roots/' ~ nova_pki_intermediate_cert_name ~ '/certs/' ~ nova_pki_intermediate_cert_name ~ '-chain.crt' }}
|
||||||
nova_pki_regen_cert: ''
|
nova_pki_regen_cert: ""
|
||||||
nova_pki_san: "{{ openstack_pki_san | default('DNS:' ~ ansible_facts['hostname'] ~ ',IP:' ~ management_address) }}"
|
nova_pki_san: "{{ openstack_pki_san | default('DNS:' ~ ansible_facts['hostname'] ~ ',IP:' ~ management_address) }}"
|
||||||
nova_pki_compute_san: >-
|
nova_pki_compute_san: >-
|
||||||
{{
|
{{
|
||||||
@ -816,7 +813,7 @@ nova_pki_certificates_condition: >-
|
|||||||
}}
|
}}
|
||||||
|
|
||||||
nova_pki_certificates:
|
nova_pki_certificates:
|
||||||
# Used to encrypt traffic between haproxy and nova backends
|
# Used to encrypt traffic between haproxy and nova backends
|
||||||
- name: "nova_{{ ansible_facts['hostname'] }}_api"
|
- name: "nova_{{ ansible_facts['hostname'] }}_api"
|
||||||
provider: ownca
|
provider: ownca
|
||||||
cn: "{{ ansible_facts['hostname'] }}"
|
cn: "{{ ansible_facts['hostname'] }}"
|
||||||
@ -844,7 +841,7 @@ nova_pki_install_certificates:
|
|||||||
condition: "{{ nova_pki_certificates_condition | bool }}"
|
condition: "{{ nova_pki_certificates_condition | bool }}"
|
||||||
|
|
||||||
# Periodically move records for deleted resources to shadow tables
|
# Periodically move records for deleted resources to shadow tables
|
||||||
nova_archive_deleted: False
|
nova_archive_deleted: false
|
||||||
# When to start archive task. Reffer to Systemd Calendar Events for guidance
|
# When to start archive task. Reffer to Systemd Calendar Events for guidance
|
||||||
# on format:
|
# on format:
|
||||||
# https://www.freedesktop.org/software/systemd/man/systemd.time.html#Calendar%20Events
|
# https://www.freedesktop.org/software/systemd/man/systemd.time.html#Calendar%20Events
|
||||||
@ -853,14 +850,14 @@ nova_archive_deleted_on_calendar: "*-*-* 00:00:00"
|
|||||||
# Should be in a format of bash date string
|
# Should be in a format of bash date string
|
||||||
nova_archive_deleted_before: "6 month ago"
|
nova_archive_deleted_before: "6 month ago"
|
||||||
# Delete records instead of moving them to shadow tables
|
# Delete records instead of moving them to shadow tables
|
||||||
nova_archive_deleted_purge: False
|
nova_archive_deleted_purge: false
|
||||||
# Archive instance task log
|
# Archive instance task log
|
||||||
nova_archive_task_log: False
|
nova_archive_task_log: false
|
||||||
# Delay the timer by a randomly selected amount of time.
|
# Delay the timer by a randomly selected amount of time.
|
||||||
nova_archive_deleted_randomized_delay_sec: 0
|
nova_archive_deleted_randomized_delay_sec: 0
|
||||||
|
|
||||||
# Periodically purge shadow tables, where archived records are stored
|
# Periodically purge shadow tables, where archived records are stored
|
||||||
nova_purge_deleted: False
|
nova_purge_deleted: false
|
||||||
# When to start purge task.
|
# When to start purge task.
|
||||||
nova_purge_deleted_on_calendar: "*-*-* 01:00:00"
|
nova_purge_deleted_on_calendar: "*-*-* 01:00:00"
|
||||||
# Purge events that are older then the timeframe below.
|
# Purge events that are older then the timeframe below.
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
- name: Stop libvirt-bin
|
- name: Stop libvirt-bin
|
||||||
service:
|
service:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
enabled: yes
|
enabled: true
|
||||||
state: "stopped"
|
state: "stopped"
|
||||||
listen:
|
listen:
|
||||||
- Restart libvirt-bin
|
- Restart libvirt-bin
|
||||||
@ -32,7 +32,7 @@
|
|||||||
name: "{{ item.name | default(item) }}"
|
name: "{{ item.name | default(item) }}"
|
||||||
state: "{{ item.condition | default(False) | ternary('started', 'stopped') }}"
|
state: "{{ item.condition | default(False) | ternary('started', 'stopped') }}"
|
||||||
enabled: "{{ item.condition | default(False) }}"
|
enabled: "{{ item.condition | default(False) }}"
|
||||||
masked: no
|
masked: false
|
||||||
with_items:
|
with_items:
|
||||||
- name: libvirtd-tls.socket
|
- name: libvirtd-tls.socket
|
||||||
condition: "{{ nova_libvirtd_listen_tls | bool }}"
|
condition: "{{ nova_libvirtd_listen_tls | bool }}"
|
||||||
@ -44,7 +44,7 @@
|
|||||||
- name: Start libvirt-bin
|
- name: Start libvirt-bin
|
||||||
service:
|
service:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
enabled: yes
|
enabled: true
|
||||||
state: "started"
|
state: "started"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ libvirt_service_name }}"
|
- "{{ libvirt_service_name }}"
|
||||||
@ -82,9 +82,9 @@
|
|||||||
- name: Stop services
|
- name: Stop services
|
||||||
service:
|
service:
|
||||||
name: "{{ item.service_name }}"
|
name: "{{ item.service_name }}"
|
||||||
enabled: yes
|
enabled: true
|
||||||
state: "stopped"
|
state: "stopped"
|
||||||
daemon_reload: yes
|
daemon_reload: true
|
||||||
with_items: "{{ filtered_nova_services }}"
|
with_items: "{{ filtered_nova_services }}"
|
||||||
register: _stop
|
register: _stop
|
||||||
until: _stop is success
|
until: _stop is success
|
||||||
@ -99,9 +99,9 @@
|
|||||||
- name: Start services
|
- name: Start services
|
||||||
service:
|
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_nova_services }}"
|
with_items: "{{ filtered_nova_services }}"
|
||||||
register: _start
|
register: _start
|
||||||
until: _start is success
|
until: _start is success
|
||||||
|
@ -46,8 +46,8 @@
|
|||||||
clone: "yes"
|
clone: "yes"
|
||||||
update: "yes"
|
update: "yes"
|
||||||
version: "{{ nova_novncproxy_git_install_branch }}"
|
version: "{{ nova_novncproxy_git_install_branch }}"
|
||||||
force: yes
|
force: true
|
||||||
accept_hostkey: yes
|
accept_hostkey: true
|
||||||
register: git_clone
|
register: git_clone
|
||||||
until: git_clone is success
|
until: git_clone is success
|
||||||
retries: 5
|
retries: 5
|
||||||
|
@ -46,8 +46,8 @@
|
|||||||
clone: "yes"
|
clone: "yes"
|
||||||
update: "yes"
|
update: "yes"
|
||||||
version: "{{ nova_spicehtml5_git_install_branch }}"
|
version: "{{ nova_spicehtml5_git_install_branch }}"
|
||||||
force: yes
|
force: true
|
||||||
accept_hostkey: yes
|
accept_hostkey: true
|
||||||
register: git_clone
|
register: git_clone
|
||||||
until: git_clone is success
|
until: git_clone is success
|
||||||
retries: 5
|
retries: 5
|
||||||
|
@ -120,13 +120,12 @@
|
|||||||
- nova-kvm
|
- nova-kvm
|
||||||
- nova-libvirt
|
- nova-libvirt
|
||||||
|
|
||||||
|
|
||||||
- name: Set qemu-kvm KSM config (Ubuntu)
|
- name: Set qemu-kvm KSM config (Ubuntu)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: "/etc/default/qemu-kvm"
|
dest: "/etc/default/qemu-kvm"
|
||||||
line: "KSM_ENABLED={{ nova_compute_ksm_enabled | ternary('1', '0') }}"
|
line: "KSM_ENABLED={{ nova_compute_ksm_enabled | ternary('1', '0') }}"
|
||||||
regexp: "^KSM_ENABLED=*"
|
regexp: "^KSM_ENABLED=*"
|
||||||
backup: yes
|
backup: true
|
||||||
when:
|
when:
|
||||||
- ansible_facts['distribution'] == 'Ubuntu'
|
- ansible_facts['distribution'] == 'Ubuntu'
|
||||||
notify: Restart libvirt-bin
|
notify: Restart libvirt-bin
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
register: _qemu_save_dir
|
register: _qemu_save_dir
|
||||||
|
|
||||||
- name: Check if the qemu save directory is empty
|
- name: Check if the qemu save directory is empty
|
||||||
command: 'ls -1A /var/lib/libvirt/qemu/save'
|
command: "ls -1A /var/lib/libvirt/qemu/save"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: _qemu_save_dir_contents
|
register: _qemu_save_dir_contents
|
||||||
when:
|
when:
|
||||||
|
@ -36,5 +36,5 @@
|
|||||||
- name: Enable systemd service which disables smt
|
- name: Enable systemd service which disables smt
|
||||||
service:
|
service:
|
||||||
name: smt
|
name: smt
|
||||||
enabled: yes
|
enabled: true
|
||||||
when: smt_disable_service | changed
|
when: smt_disable_service | changed
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
- name: Enable ksm systemd service
|
- name: Enable ksm systemd service
|
||||||
service:
|
service:
|
||||||
name: ksm
|
name: ksm
|
||||||
enabled: yes
|
enabled: true
|
||||||
state: started
|
state: started
|
||||||
|
|
||||||
- name: Enable ksmtuned systemd service
|
- name: Enable ksmtuned systemd service
|
||||||
service:
|
service:
|
||||||
name: ksmtuned
|
name: ksmtuned
|
||||||
enabled: yes
|
enabled: true
|
||||||
state: started
|
state: started
|
||||||
when:
|
when:
|
||||||
- ansible_facts['pkg_mgr'] in ['dnf', 'apt']
|
- ansible_facts['pkg_mgr'] in ['dnf', 'apt']
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
|
|
||||||
- name: Find installed kernels
|
- name: Find installed kernels
|
||||||
find:
|
find:
|
||||||
paths: '/boot'
|
paths: "/boot"
|
||||||
patterns: 'vmlinuz-*'
|
patterns: "vmlinuz-*"
|
||||||
register: kernels
|
register: kernels
|
||||||
|
|
||||||
- name: Determine latest installed kernel
|
- name: Determine latest installed kernel
|
||||||
@ -22,7 +22,7 @@
|
|||||||
latest_kernel: "{{ kernels.files | map(attribute='path') | sort(reverse=True) | first }}"
|
latest_kernel: "{{ kernels.files | map(attribute='path') | sort(reverse=True) | first }}"
|
||||||
|
|
||||||
- name: Latest kernel readable to nova group/user
|
- name: Latest kernel readable to nova group/user
|
||||||
command: 'dpkg-statoverride --update --add root nova 0640 {{ latest_kernel }}'
|
command: "dpkg-statoverride --update --add root nova 0640 {{ latest_kernel }}"
|
||||||
register: dpkg_statoverride_result
|
register: dpkg_statoverride_result
|
||||||
changed_when:
|
changed_when:
|
||||||
- ("an override for '" ~ latest_kernel ~ "' already exists; aborting" not in dpkg_statoverride_result.stderr)
|
- ("an override for '" ~ latest_kernel ~ "' already exists; aborting" not in dpkg_statoverride_result.stderr)
|
||||||
@ -33,6 +33,6 @@
|
|||||||
|
|
||||||
- name: Script installed to make future kernels readable to nova group/user
|
- name: Script installed to make future kernels readable to nova group/user
|
||||||
copy:
|
copy:
|
||||||
src: 'nova_kernel_permissions'
|
src: "nova_kernel_permissions"
|
||||||
dest: '/etc/kernel/postinst.d/nova_kernel_permissions'
|
dest: "/etc/kernel/postinst.d/nova_kernel_permissions"
|
||||||
mode: '0755'
|
mode: "0755"
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
- rpcbind.service rpc-statd.service
|
- rpcbind.service rpc-statd.service
|
||||||
Before:
|
Before:
|
||||||
- nova-compute.service
|
- nova-compute.service
|
||||||
state: 'started'
|
state: "started"
|
||||||
enabled: true
|
enabled: true
|
||||||
with_items: "{{ nova_nfs_client }}"
|
with_items: "{{ nova_nfs_client }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
|
@ -23,11 +23,10 @@
|
|||||||
command: >-
|
command: >-
|
||||||
{{ _db_nova_bin }}/nova-manage --config-file {{ nova_conf_version_dir }}/nova.conf cell_v2 discover_hosts{{ (debug | bool) | ternary(' --verbose', '') }}{{
|
{{ _db_nova_bin }}/nova-manage --config-file {{ nova_conf_version_dir }}/nova.conf cell_v2 discover_hosts{{ (debug | bool) | ternary(' --verbose', '') }}{{
|
||||||
(nova_ironic_used | bool) | ternary(' --by-service', '') }}
|
(nova_ironic_used | bool) | ternary(' --by-service', '') }}
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ _db_nova_system_user_name }}"
|
become_user: "{{ _db_nova_system_user_name }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
|
|
||||||
# If it exits with partial updates (exit status 1) it should be called again,
|
# If it exits with partial updates (exit status 1) it should be called again,
|
||||||
# even if some updates initially generated errors,
|
# even if some updates initially generated errors,
|
||||||
# because some updates may depend on others having completed. If it exits with status 2,
|
# because some updates may depend on others having completed. If it exits with status 2,
|
||||||
@ -35,7 +34,7 @@
|
|||||||
# It should be considered successfully completed only when the exit status is 0.
|
# It should be considered successfully completed only when the exit status is 0.
|
||||||
- name: Perform online data migrations
|
- name: Perform online data migrations
|
||||||
command: "{{ _db_nova_bin }}/nova-manage --config-file {{ nova_conf_version_dir }}/nova.conf db online_data_migrations"
|
command: "{{ _db_nova_bin }}/nova-manage --config-file {{ nova_conf_version_dir }}/nova.conf db online_data_migrations"
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ _db_nova_system_user_name }}"
|
become_user: "{{ _db_nova_system_user_name }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
@ -51,7 +50,7 @@
|
|||||||
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
||||||
section: nova
|
section: nova
|
||||||
option: need_online_data_migrations
|
option: need_online_data_migrations
|
||||||
value: False
|
value: false
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
with_items: "{{ groups[nova_services['nova-conductor']['group']] }}"
|
with_items: "{{ groups[nova_services['nova-conductor']['group']] }}"
|
||||||
when:
|
when:
|
||||||
@ -73,10 +72,10 @@
|
|||||||
execstarts:
|
execstarts:
|
||||||
- /bin/sh -c "{{ _db_nova_bin }}/nova-manage db archive_deleted_rows --until-complete --all-cells --before \"$(date -d '{{ nova_archive_deleted_before }}' +'%%Y-%%m-%%d %%H:%%M')\" {{ (nova_archive_deleted_purge) | ternary('--purge', '') }} {{ (nova_archive_task_log) | ternary('--task-log', '') }}" # noqa: yaml[line-length]
|
- /bin/sh -c "{{ _db_nova_bin }}/nova-manage db archive_deleted_rows --until-complete --all-cells --before \"$(date -d '{{ nova_archive_deleted_before }}' +'%%Y-%%m-%%d %%H:%%M')\" {{ (nova_archive_deleted_purge) | ternary('--purge', '') }} {{ (nova_archive_task_log) | ternary('--task-log', '') }}" # noqa: yaml[line-length]
|
||||||
environment:
|
environment:
|
||||||
UMASK: '0640'
|
UMASK: "0640"
|
||||||
UMASK_DIR: '0750'
|
UMASK_DIR: "0750"
|
||||||
program_sandboxing:
|
program_sandboxing:
|
||||||
RuntimeDirectory: 'nova-archive-deleted'
|
RuntimeDirectory: "nova-archive-deleted"
|
||||||
enabled: "{{ nova_archive_deleted }}"
|
enabled: "{{ nova_archive_deleted }}"
|
||||||
timer:
|
timer:
|
||||||
state: "{{ nova_archive_deleted | ternary('started', 'stopped') }}"
|
state: "{{ nova_archive_deleted | ternary('started', 'stopped') }}"
|
||||||
@ -90,10 +89,10 @@
|
|||||||
execstarts:
|
execstarts:
|
||||||
- /bin/sh -c "{{ _db_nova_bin }}/nova-manage db purge --all-cells --before \"$(date -d '{{ nova_purge_deleted_before }}' +'%%Y-%%m-%%d %%H:%%M')\"" # noqa: yaml[line-length]
|
- /bin/sh -c "{{ _db_nova_bin }}/nova-manage db purge --all-cells --before \"$(date -d '{{ nova_purge_deleted_before }}' +'%%Y-%%m-%%d %%H:%%M')\"" # noqa: yaml[line-length]
|
||||||
environment:
|
environment:
|
||||||
UMASK: '0640'
|
UMASK: "0640"
|
||||||
UMASK_DIR: '0750'
|
UMASK_DIR: "0750"
|
||||||
program_sandboxing:
|
program_sandboxing:
|
||||||
RuntimeDirectory: 'nova-purge-deleted'
|
RuntimeDirectory: "nova-purge-deleted"
|
||||||
enabled: "{{ nova_purge_deleted }}"
|
enabled: "{{ nova_purge_deleted }}"
|
||||||
timer:
|
timer:
|
||||||
state: "{{ nova_purge_deleted | ternary('started', 'stopped') }}"
|
state: "{{ nova_purge_deleted | ternary('started', 'stopped') }}"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
- name: Synchronize the nova API DB schema
|
- name: Synchronize the nova API DB schema
|
||||||
command: "{{ nova_bin }}/nova-manage --config-file {{ nova_conf_version_dir }}/nova.conf api_db sync"
|
command: "{{ nova_bin }}/nova-manage --config-file {{ nova_conf_version_dir }}/nova.conf api_db sync"
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ nova_system_user_name }}"
|
become_user: "{{ nova_system_user_name }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
@ -23,7 +23,7 @@
|
|||||||
# might be not idempotent due to the bug https://bugs.launchpad.net/nova/+bug/1923899
|
# might be not idempotent due to the bug https://bugs.launchpad.net/nova/+bug/1923899
|
||||||
- name: Get UUID of Nova Cells
|
- name: Get UUID of Nova Cells
|
||||||
command: "{{ nova_bin }}/nova-manage --config-file {{ nova_conf_version_dir }}/nova.conf cell_v2 list_cells"
|
command: "{{ nova_bin }}/nova-manage --config-file {{ nova_conf_version_dir }}/nova.conf cell_v2 list_cells"
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ nova_system_user_name }}"
|
become_user: "{{ nova_system_user_name }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: _cell_list
|
register: _cell_list
|
||||||
@ -43,7 +43,7 @@
|
|||||||
--database_connection mysql+pymysql://{{ nova_api_galera_user }}:{{ nova_api_container_mysql_password }}@{{ nova_api_galera_address }}/{{
|
--database_connection mysql+pymysql://{{ nova_api_galera_user }}:{{ nova_api_container_mysql_password }}@{{ nova_api_galera_address }}/{{
|
||||||
nova_cell0_database }}?charset=utf8{% if nova_galera_use_ssl | bool %}&ssl_verify_cert=true{%
|
nova_cell0_database }}?charset=utf8{% if nova_galera_use_ssl | bool %}&ssl_verify_cert=true{%
|
||||||
if nova_galera_ssl_ca_cert | length > 0 %}&ssl_ca={{ nova_galera_ssl_ca_cert }}{% endif %}{% endif %}
|
if nova_galera_ssl_ca_cert | length > 0 %}&ssl_ca={{ nova_galera_ssl_ca_cert }}{% endif %}{% endif %}
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ nova_system_user_name }}"
|
become_user: "{{ nova_system_user_name }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
@ -56,7 +56,7 @@
|
|||||||
nova_cell0_database }}?charset=utf8{% if nova_galera_use_ssl | bool %}&ssl_verify_cert=true{%
|
nova_cell0_database }}?charset=utf8{% if nova_galera_use_ssl | bool %}&ssl_verify_cert=true{%
|
||||||
if nova_galera_ssl_ca_cert | length > 0 %}&ssl_ca={{ nova_galera_ssl_ca_cert }}{% endif %}{% endif %}
|
if nova_galera_ssl_ca_cert | length > 0 %}&ssl_ca={{ nova_galera_ssl_ca_cert }}{% endif %}{% endif %}
|
||||||
--transport-url 'none:/'
|
--transport-url 'none:/'
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ nova_system_user_name }}"
|
become_user: "{{ nova_system_user_name }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
@ -67,7 +67,7 @@
|
|||||||
|
|
||||||
- name: Synchronize the nova DB schema
|
- name: Synchronize the nova DB schema
|
||||||
command: "{{ nova_bin }}/nova-manage --config-file {{ nova_conf_version_dir }}/nova.conf db sync"
|
command: "{{ nova_bin }}/nova-manage --config-file {{ nova_conf_version_dir }}/nova.conf db sync"
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ nova_system_user_name }}"
|
become_user: "{{ nova_system_user_name }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
@ -78,7 +78,7 @@
|
|||||||
--database_connection {scheme}://{username}:{password}@{hostname}:{port}/{path}?{query}
|
--database_connection {scheme}://{username}:{password}@{hostname}:{port}/{path}?{query}
|
||||||
--transport-url {scheme}://{username}:{password}@{hostname}:{port}/{{ (
|
--transport-url {scheme}://{username}:{password}@{hostname}:{port}/{{ (
|
||||||
not nova_oslomsg_rabbit_quorum_queues | bool) | ternary('/{path}', '{path}') }}?{query}
|
not nova_oslomsg_rabbit_quorum_queues | bool) | ternary('/{path}', '{path}') }}?{query}
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ nova_system_user_name }}"
|
become_user: "{{ nova_system_user_name }}"
|
||||||
register: nova_cell1_create
|
register: nova_cell1_create
|
||||||
# When upgrading, cell1 will already exist and nova-manage will
|
# When upgrading, cell1 will already exist and nova-manage will
|
||||||
@ -101,7 +101,7 @@
|
|||||||
--database_connection {scheme}://{username}:{password}@{hostname}:{port}/{path}?{query}
|
--database_connection {scheme}://{username}:{password}@{hostname}:{port}/{path}?{query}
|
||||||
--transport-url {scheme}://{username}:{password}@{hostname}:{port}/{{ (
|
--transport-url {scheme}://{username}:{password}@{hostname}:{port}/{{ (
|
||||||
not nova_oslomsg_rabbit_quorum_queues | bool) | ternary('/{path}', '{path}') }}?{query}
|
not nova_oslomsg_rabbit_quorum_queues | bool) | ternary('/{path}', '{path}') }}?{query}
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ nova_system_user_name }}"
|
become_user: "{{ nova_system_user_name }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
@ -116,7 +116,7 @@
|
|||||||
# https://docs.openstack.org/nova/latest/cli/nova-status.html
|
# https://docs.openstack.org/nova/latest/cli/nova-status.html
|
||||||
- name: Run nova-status upgrade check to validate a healthy configuration
|
- name: Run nova-status upgrade check to validate a healthy configuration
|
||||||
command: "{{ nova_bin }}/nova-status --config-file {{ nova_conf_version_dir }}/nova.conf upgrade check"
|
command: "{{ nova_bin }}/nova-status --config-file {{ nova_conf_version_dir }}/nova.conf upgrade check"
|
||||||
become: yes
|
become: true
|
||||||
become_user: "{{ nova_system_user_name }}"
|
become_user: "{{ nova_system_user_name }}"
|
||||||
register: nova_status_upgrade_check
|
register: nova_status_upgrade_check
|
||||||
until: nova_status_upgrade_check is success
|
until: nova_status_upgrade_check is success
|
||||||
|
@ -125,7 +125,7 @@
|
|||||||
- name: Disable existing services for any unused console types
|
- name: Disable existing services for any unused console types
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ item.service }}"
|
name: "{{ item.service }}"
|
||||||
enabled: no
|
enabled: false
|
||||||
state: stopped
|
state: stopped
|
||||||
when: (item.condition | bool) and item.type not in nova_console_proxy_types
|
when: (item.condition | bool) and item.type not in nova_console_proxy_types
|
||||||
loop:
|
loop:
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
dest: "{{ nova_conf_version_dir }}/vendor_data.json"
|
dest: "{{ nova_conf_version_dir }}/vendor_data.json"
|
||||||
config_overrides: "{{ nova_vendor_data_overrides }}"
|
config_overrides: "{{ nova_vendor_data_overrides }}"
|
||||||
config_type: "json"
|
config_type: "json"
|
||||||
yml_multilines: True
|
yml_multilines: true
|
||||||
notify:
|
notify:
|
||||||
- Restart nova services
|
- Restart nova services
|
||||||
- Restart uwsgi services
|
- Restart uwsgi services
|
||||||
@ -136,7 +136,7 @@
|
|||||||
fetch:
|
fetch:
|
||||||
src: "{{ item.target_f }}"
|
src: "{{ item.target_f }}"
|
||||||
dest: "{{ item.tmp_f }}"
|
dest: "{{ item.tmp_f }}"
|
||||||
flat: yes
|
flat: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
run_once: true
|
run_once: true
|
||||||
with_items: "{{ nova_core_files }}"
|
with_items: "{{ nova_core_files }}"
|
||||||
|
@ -49,4 +49,4 @@ nova_package_list: |-
|
|||||||
{% set _ = packages.extend(nova_service_distro_packages) %}
|
{% set _ = packages.extend(nova_service_distro_packages) %}
|
||||||
{{ packages }}
|
{{ packages }}
|
||||||
|
|
||||||
_nova_bin: '/usr/bin'
|
_nova_bin: "/usr/bin"
|
||||||
|
@ -171,10 +171,10 @@ _nova_cache_backend_map:
|
|||||||
- oslo_cache.etcd3gw
|
- oslo_cache.etcd3gw
|
||||||
|
|
||||||
_nova_cache_backend_package: |-
|
_nova_cache_backend_package: |-
|
||||||
{% set oslo = namespace(backend='dogpile') %}
|
{% set oslo = namespace(backend='dogpile') %}
|
||||||
{% for key, value in _nova_cache_backend_map.items() %}
|
{% for key, value in _nova_cache_backend_map.items() %}
|
||||||
{% if nova_cache_backend in value %}
|
{% if nova_cache_backend in value %}
|
||||||
{% set oslo.backend = key %}
|
{% set oslo.backend = key %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
oslo.cache[{{ oslo.backend }}]
|
oslo.cache[{{ oslo.backend }}]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user