Use systemd module instead of shell
Using ansible systemd module to daemon reload and service reload is the solution for the future. Change-Id: If2e4c74ebf8a28d5a777c404cfcc179db32de3f3
This commit is contained in:
parent
ba7fdf73ed
commit
492e2394d4
@ -13,15 +13,11 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Reload systemd daemon
|
||||
command: "systemctl daemon-reload"
|
||||
notify:
|
||||
- Restart cinder services
|
||||
|
||||
- name: Restart cinder services
|
||||
service:
|
||||
systemd:
|
||||
name: "{{ item.value.service_name }}"
|
||||
state: restarted
|
||||
daemon_reload: yes
|
||||
with_dict: "{{ cinder_services }}"
|
||||
when:
|
||||
- inventory_hostname in groups[item.value.group]
|
||||
|
@ -74,4 +74,4 @@
|
||||
- inventory_hostname in groups[item.value.group]
|
||||
- "{{ item.value.condition | default(true) }}"
|
||||
notify:
|
||||
- Reload systemd daemon
|
||||
- Restart cinder services
|
||||
|
Loading…
x
Reference in New Issue
Block a user