CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
- name: reset failed ceph-mon systemd unit
- command: 'systemctl reset-failed ceph-mon@{{ ansible_hostname }}'
+ command: 'systemctl reset-failed ceph-mon@{{ ansible_hostname }}' # noqa 303
changed_when: false
failed_when: false
when: containerized_deployment | bool
CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
- name: reset failed ceph-mgr systemd unit
- command: 'systemctl reset-failed ceph-mgr@{{ ansible_hostname }}'
+ command: 'systemctl reset-failed ceph-mgr@{{ ansible_hostname }}' # noqa 303
changed_when: false
failed_when: false
when: containerized_deployment | bool
when: not containerized_deployment | bool
- name: reset failed ceph-mds systemd unit
- command: 'systemctl reset-failed ceph-mds@{{ ansible_hostname }}'
+ command: 'systemctl reset-failed ceph-mds@{{ ansible_hostname }}' # noqa 303
changed_when: false
failed_when: false
when: containerized_deployment | bool
when: not containerized_deployment | bool
- name: reset failed ceph-radosgw systemd unit
- command: 'systemctl reset-failed ceph-radosgw@rgw.{{ ansible_hostname }}.{{ item.instance_name }}'
+ command: 'systemctl reset-failed ceph-radosgw@rgw.{{ ansible_hostname }}.{{ item.instance_name }}' # noqa 303
changed_when: false
failed_when: false
loop: '{{ rgw_instances }}'
when: not containerized_deployment | bool
- name: reset failed rbd-mirror systemd unit
- command: 'systemctl reset-failed ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}'
+ command: 'systemctl reset-failed ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}' # noqa 303
changed_when: false
failed_when: false
when: containerized_deployment | bool
- tcmu-runner
- name: reset failed iscsigw systemd units
- command: 'systemctl reset-failed {{ item }}'
+ command: 'systemctl reset-failed {{ item }}' # noqa 303
changed_when: false
failed_when: false
with_items:
- name: include vars of lv_vars.yaml
include_vars:
- file: lv_vars.yaml
+ file: lv_vars.yaml # noqa 505
failed_when: false
# ensure nvme_device is set
- name: include vars of lv_vars.yaml
include_vars:
- file: lv_vars.yaml
+ file: lv_vars.yaml # noqa 505
failed_when: false
# need to check if lvm2 is installed
delegate_to: localhost
- name: remove data
- shell: rm -rf /var/lib/ceph/*
+ shell: rm -rf /var/lib/ceph/* # noqa 302
tasks:
listen: "remove data"
- name: remove data
- shell: rm -rf /var/lib/ceph/*
+ shell: rm -rf /var/lib/ceph/* # noqa 302
listen: "remove data"
tasks:
state: absent
- name: clean apt
- command: apt-get clean
+ command: apt-get clean # noqa 303
when: ansible_pkg_mgr == 'apt'
- name: purge ceph repo file in /etc/yum.repos.d
name: ceph-facts
- name: get all the running osds
- shell: |
- systemctl list-units --all | grep -oE "ceph-osd@([0-9]+).service"
+ shell: systemctl list-units --all | grep -oE "ceph-osd@([0-9]+).service" # noqa 303
register: osd_units
changed_when: false
ignore_errors: true
- "{{ ceph_osd_docker_run_script_path | default('/usr/share') }}/ceph-osd-run.sh"
- name: remove ceph data
- shell: rm -rf /var/lib/ceph/*
+ shell: rm -rf /var/lib/ceph/* # noqa 302
changed_when: false
# (todo): remove this when we are able to manage docker
# service on atomic host.
- name: remove docker data
- shell: rm -rf /var/lib/docker/*
+ shell: rm -rf /var/lib/docker/* # noqa 302
when: not is_atomic | bool
- name: purge fetch directory
failed_when: false
- name: ensure that the mds is stopped
- command: "systemctl is-active ceph-mds@{{ mds_to_kill_hostname }}"
+ command: "systemctl is-active ceph-mds@{{ mds_to_kill_hostname }}" # noqa 303
register: mds_to_kill_status
failed_when: mds_to_kill_status.rc == 0
delegate_to: "{{ mds_to_kill }}"
failed_when: false
- name: ensure that the mgr is stopped
- command: "systemctl is-active ceph-mgr@{{ mgr_to_kill_hostname }}"
+ command: "systemctl is-active ceph-mgr@{{ mgr_to_kill_hostname }}" # noqa 303
register: mgr_to_kill_status
failed_when: mgr_to_kill_status.rc == 0
delegate_to: "{{ mgr_to_kill }}"
failed_when: false
- name: ensure that the rgw is stopped
- command: "systemctl is-active ceph-radosgw@rgw.{{ rgw_to_kill }}"
+ command: "systemctl is-active ceph-radosgw@rgw.{{ rgw_to_kill }}" # noqa 303
register: rgw_to_kill_status
failed_when: rgw_to_kill_status.rc == 0
changed_when: false
# systemd module does not support --runtime option
- name: disable ceph-osd@.service runtime-enabled
- command: "systemctl disable --runtime {{ item }}"
+ command: "systemctl disable --runtime {{ item }}" # noqa 303
changed_when: false
failed_when: false
with_items: "{{ running_osds.stdout_lines | default([]) }}"