nova-compute: Replacing yes/no with boolean values
We should use boolean values whenever possible in our playbooks. Change-Id: Idfab60ea1cbdbe5b6c8c124ae574736a647f022d
This commit is contained in:
parent
776d375ff0
commit
ca732da9c2
|
@ -1458,8 +1458,8 @@ outputs:
|
||||||
- name: libvirt-guests enable VM shutdown on compute reboot/shutdown
|
- name: libvirt-guests enable VM shutdown on compute reboot/shutdown
|
||||||
systemd:
|
systemd:
|
||||||
name: libvirt-guests
|
name: libvirt-guests
|
||||||
enabled: yes
|
enabled: true
|
||||||
daemon_reload: yes
|
daemon_reload: true
|
||||||
- name: install tripleo_nova_libvirt_guests systemd unit file (podman)
|
- name: install tripleo_nova_libvirt_guests systemd unit file (podman)
|
||||||
when:
|
when:
|
||||||
- resume_guests_state_on_host_boot_enabled|bool
|
- resume_guests_state_on_host_boot_enabled|bool
|
||||||
|
@ -1499,8 +1499,8 @@ outputs:
|
||||||
- name: tripleo_nova_libvirt_guests enable VM shutdown on compute reboot/shutdown
|
- name: tripleo_nova_libvirt_guests enable VM shutdown on compute reboot/shutdown
|
||||||
systemd:
|
systemd:
|
||||||
name: tripleo_nova_libvirt_guests
|
name: tripleo_nova_libvirt_guests
|
||||||
enabled: yes
|
enabled: true
|
||||||
daemon_reload: yes
|
daemon_reload: true
|
||||||
- name: ensure ceph configurations exist
|
- name: ensure ceph configurations exist
|
||||||
file:
|
file:
|
||||||
path: {get_param: CephConfigPath}
|
path: {get_param: CephConfigPath}
|
||||||
|
@ -1511,8 +1511,8 @@ outputs:
|
||||||
- name: enable virt_sandbox_use_netlink for healthcheck
|
- name: enable virt_sandbox_use_netlink for healthcheck
|
||||||
seboolean:
|
seboolean:
|
||||||
name: virt_sandbox_use_netlink
|
name: virt_sandbox_use_netlink
|
||||||
persistent: yes
|
persistent: true
|
||||||
state: yes
|
state: true
|
||||||
- name: install Instance HA recovery script
|
- name: install Instance HA recovery script
|
||||||
when: instance_ha_enabled|bool
|
when: instance_ha_enabled|bool
|
||||||
block:
|
block:
|
||||||
|
@ -1593,7 +1593,7 @@ outputs:
|
||||||
service:
|
service:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
enabled: no
|
enabled: false
|
||||||
with_items:
|
with_items:
|
||||||
- ksm.service
|
- ksm.service
|
||||||
- ksmtuned.service
|
- ksmtuned.service
|
||||||
|
@ -1623,7 +1623,7 @@ outputs:
|
||||||
service:
|
service:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: true
|
||||||
with_items:
|
with_items:
|
||||||
- ksm.service
|
- ksm.service
|
||||||
- ksmtuned.service
|
- ksmtuned.service
|
||||||
|
@ -1660,7 +1660,7 @@ outputs:
|
||||||
command: openstack compute service list --service nova-compute --column ID --column Host --format yaml
|
command: openstack compute service list --service nova-compute --column ID --column Host --format yaml
|
||||||
register: nova_compute_service_result
|
register: nova_compute_service_result
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
check_mode: no
|
check_mode: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
- name: is additional Cell?
|
- name: is additional Cell?
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -1669,7 +1669,7 @@ outputs:
|
||||||
set_fact:
|
set_fact:
|
||||||
nova_compute_service: "{{ nova_compute_service_result.stdout | from_yaml | selectattr('Host', 'match', ansible_facts['fqdn'] ~ '.*') | list }}"
|
nova_compute_service: "{{ nova_compute_service_result.stdout | from_yaml | selectattr('Host', 'match', ansible_facts['fqdn'] ~ '.*') | list }}"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
check_mode: no
|
check_mode: false
|
||||||
- name: Check search output
|
- name: Check search output
|
||||||
fail:
|
fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
|
@ -1688,16 +1688,16 @@ outputs:
|
||||||
- name: Disable nova-compute service
|
- name: Disable nova-compute service
|
||||||
command: openstack compute service set {{ nova_compute_service[0].Host }} nova-compute --disable
|
command: openstack compute service set {{ nova_compute_service[0].Host }} nova-compute --disable
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
check_mode: no
|
check_mode: false
|
||||||
when:
|
when:
|
||||||
- not is_additional_cell|bool
|
- not is_additional_cell|bool
|
||||||
- name: Stop nova-compute container
|
- name: Stop nova-compute container
|
||||||
service:
|
service:
|
||||||
name: tripleo_nova_compute
|
name: tripleo_nova_compute
|
||||||
state: stopped
|
state: stopped
|
||||||
enabled: no
|
enabled: false
|
||||||
become: true
|
become: true
|
||||||
- name: Delete nova-compute service
|
- name: Delete nova-compute service
|
||||||
command: openstack compute service delete {{ nova_compute_service[0].ID }}
|
command: openstack compute service delete {{ nova_compute_service[0].ID }}
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
check_mode: no
|
check_mode: false
|
||||||
|
|
Loading…
Reference in New Issue