This repository has been archived on 2026-11-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
openstack-deployment/ansible/playbooks/ceph_restart_all_services.yml
T
2020-08-12 00:02:27 +03:00

30 lines
597 B
YAML

---
- hosts: bonchvisor14
remote_user: cephadmin
become: true
become_user: root
become_method: sudo
vars:
disk:
- sdb
- sdc
- sdd
- sde
tasks:
- name: Detect used service
shell: systemctl list-units --type=service --all | grep ceph | grep running | awk '{print $1}'
args:
executable: /bin/bash
warn: false
register: services
- name: Restart all services
shell: systemctl restart {{item}}
args:
executable: /bin/bash
warn: false
loop: "{{services.stdout_lines}}"
when: services.stdout != ""