mirror of https://github.com/ceph/ceph-ansible.git
Better --check compatibility for ceph-osd role
Carefully chosen "always_run: true" parameters for read-only tasks that register variables. This enables --check runs (at least on deployed clusters).pull/1121/head
parent
444c8fad40
commit
ba0f16f485
|
@ -104,6 +104,7 @@
|
||||||
shell: 'ls /var/lib/ceph/osd/ | grep -oP "\d+$"'
|
shell: 'ls /var/lib/ceph/osd/ | grep -oP "\d+$"'
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: osd_id
|
register: osd_id
|
||||||
when:
|
when:
|
||||||
- use_systemd
|
- use_systemd
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
with_items: "{{ raw_journal_devices|unique }}"
|
with_items: "{{ raw_journal_devices|unique }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: journal_partition_status
|
register: journal_partition_status
|
||||||
when: raw_multi_journal or dmcrypt_dedicated_journal
|
when: raw_multi_journal or dmcrypt_dedicated_journal
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
with_dict: "{{ ansible_devices }}"
|
with_dict: "{{ ansible_devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: ispartition_results
|
register: ispartition_results
|
||||||
when:
|
when:
|
||||||
- ansible_devices is defined
|
- ansible_devices is defined
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
with_dict: "{{ ansible_devices }}"
|
with_dict: "{{ ansible_devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: osd_partition_status_results
|
register: osd_partition_status_results
|
||||||
when:
|
when:
|
||||||
- ansible_devices is defined
|
- ansible_devices is defined
|
||||||
|
@ -37,6 +39,7 @@
|
||||||
with_dict: "{{ ansible_devices }}"
|
with_dict: "{{ ansible_devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: parted_results
|
register: parted_results
|
||||||
when:
|
when:
|
||||||
- ansible_devices is defined
|
- ansible_devices is defined
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
with_items: "{{ devices }}"
|
with_items: "{{ devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: ispartition_results
|
register: ispartition_results
|
||||||
|
|
||||||
- name: check the partition status of the osd disks
|
- name: check the partition status of the osd disks
|
||||||
|
@ -11,6 +12,7 @@
|
||||||
with_items: "{{ devices }}"
|
with_items: "{{ devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: osd_partition_status_results
|
register: osd_partition_status_results
|
||||||
|
|
||||||
# NOTE: The following calls to sgdisk are retried because sgdisk is known to
|
# NOTE: The following calls to sgdisk are retried because sgdisk is known to
|
||||||
|
@ -31,4 +33,5 @@
|
||||||
with_items: "{{ devices }}"
|
with_items: "{{ devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: parted_results
|
register: parted_results
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
with_items: "{{ ceph_config_keys }}"
|
with_items: "{{ ceph_config_keys }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: statleftover
|
register: statleftover
|
||||||
|
|
||||||
- name: fail if we find existing cluster files
|
- name: fail if we find existing cluster files
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
run_once: true
|
run_once: true
|
||||||
|
always_run: true
|
||||||
register: ceph_version
|
register: ceph_version
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
become: false
|
become: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: statconfig
|
register: statconfig
|
||||||
|
|
||||||
- name: try to copy ceph config and keys
|
- name: try to copy ceph config and keys
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
register: ceph_health
|
register: ceph_health
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
|
|
||||||
- include: checks.yml
|
- include: checks.yml
|
||||||
when:
|
when:
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
- name: check if it is Atomic host
|
- name: check if it is Atomic host
|
||||||
stat: path=/run/ostree-booted
|
stat: path=/run/ostree-booted
|
||||||
register: stat_ostree
|
register: stat_ostree
|
||||||
|
always_run: true
|
||||||
|
|
||||||
- name: set fact for using Atomic host
|
- name: set fact for using Atomic host
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
command: getenforce
|
command: getenforce
|
||||||
register: sestatus
|
register: sestatus
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
always_run: true
|
||||||
|
|
||||||
- name: set selinux permissions
|
- name: set selinux permissions
|
||||||
shell: chcon -Rt svirt_sandbox_file_t {{ item }}
|
shell: chcon -Rt svirt_sandbox_file_t {{ item }}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
- name: verify if the disk was already prepared
|
- name: verify if the disk was already prepared
|
||||||
shell: "lsblk -o PARTLABEL {{ item }} | grep -sq 'ceph'"
|
shell: "lsblk -o PARTLABEL {{ item }} | grep -sq 'ceph'"
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
with_items: "{{ ceph_osd_docker_devices }}"
|
with_items: "{{ ceph_osd_docker_devices }}"
|
||||||
register: osd_prepared
|
register: osd_prepared
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
with_items: "{{ devices }}"
|
with_items: "{{ devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: osd_path
|
register: osd_path
|
||||||
when: not osd_directory
|
when: not osd_directory
|
||||||
|
|
||||||
|
@ -12,6 +13,7 @@
|
||||||
with_items: "{{ osd_path.results }}"
|
with_items: "{{ osd_path.results }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: osd_id_non_dir_scenario
|
register: osd_id_non_dir_scenario
|
||||||
when: not osd_directory
|
when: not osd_directory
|
||||||
|
|
||||||
|
@ -20,6 +22,7 @@
|
||||||
with_items: "{{ osd_directories }}"
|
with_items: "{{ osd_directories }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: osd_id_dir_scenario
|
register: osd_id_dir_scenario
|
||||||
when: osd_directory
|
when: osd_directory
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue