Ensure that services that intended to stay disabled are not started

This mainly affects neutron-rpc-server service, which intended to stay
disabled/stopped.

While we've introduced logic in vars, which is respected by systemd role
it is not respected by the role handlers, which brings service back up
running unconditionally.

This actually breaks neutron behaviour after merging of [1], which relies
on neutron-rpc-server being disabled.

[1] https://review.opendev.org/c/openstack/openstack-ansible-os_neutron/+/927881

Change-Id: I28c928362ef009c1b49673005463b653d038faf9
This commit is contained in:
Dmitriy Rabotyagov 2024-10-14 20:04:21 +02:00
parent aebe62ef84
commit 96fb295bbc

View File

@ -16,7 +16,6 @@
- name: Stop services - name: Stop services
service: service:
name: "{{ item.service_name }}" name: "{{ item.service_name }}"
enabled: yes
state: "stopped" state: "stopped"
daemon_reload: yes daemon_reload: yes
with_items: "{{ filtered_neutron_services }}" with_items: "{{ filtered_neutron_services }}"
@ -103,8 +102,8 @@
- name: Start services - name: Start services
service: service:
name: "{{ item.service_name }}" name: "{{ item.service_name }}"
enabled: yes enabled: "{{ item.enabled | default(True) }}"
state: "started" state: "{{ item.state | default('started') }}"
daemon_reload: yes daemon_reload: yes
with_items: "{{ filtered_neutron_services }}" with_items: "{{ filtered_neutron_services }}"
register: _start register: _start