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
Daniel Marks 2016-11-26 22:16:07 +01:00
parent 444c8fad40
commit ba0f16f485
11 changed files with 18 additions and 0 deletions

View File

@ -104,6 +104,7 @@
shell: 'ls /var/lib/ceph/osd/ | grep -oP "\d+$"'
changed_when: false
failed_when: false
always_run: true
register: osd_id
when:
- use_systemd

View File

@ -29,6 +29,7 @@
with_items: "{{ raw_journal_devices|unique }}"
changed_when: false
failed_when: false
always_run: true
register: journal_partition_status
when: raw_multi_journal or dmcrypt_dedicated_journal

View File

@ -4,6 +4,7 @@
with_dict: "{{ ansible_devices }}"
changed_when: false
failed_when: false
always_run: true
register: ispartition_results
when:
- ansible_devices is defined
@ -14,6 +15,7 @@
with_dict: "{{ ansible_devices }}"
changed_when: false
failed_when: false
always_run: true
register: osd_partition_status_results
when:
- ansible_devices is defined
@ -37,6 +39,7 @@
with_dict: "{{ ansible_devices }}"
changed_when: false
failed_when: false
always_run: true
register: parted_results
when:
- ansible_devices is defined

View File

@ -4,6 +4,7 @@
with_items: "{{ devices }}"
changed_when: false
failed_when: false
always_run: true
register: ispartition_results
- name: check the partition status of the osd disks
@ -11,6 +12,7 @@
with_items: "{{ devices }}"
changed_when: false
failed_when: false
always_run: true
register: osd_partition_status_results
# NOTE: The following calls to sgdisk are retried because sgdisk is known to
@ -31,4 +33,5 @@
with_items: "{{ devices }}"
changed_when: false
failed_when: false
always_run: true
register: parted_results

View File

@ -16,6 +16,7 @@
with_items: "{{ ceph_config_keys }}"
changed_when: false
failed_when: false
always_run: true
register: statleftover
- name: fail if we find existing cluster files

View File

@ -6,6 +6,7 @@
changed_when: false
failed_when: false
run_once: true
always_run: true
register: ceph_version
- set_fact:

View File

@ -18,6 +18,7 @@
changed_when: false
become: false
failed_when: false
always_run: true
register: statconfig
- name: try to copy ceph config and keys

View File

@ -4,6 +4,7 @@
register: ceph_health
changed_when: false
failed_when: false
always_run: true
- include: checks.yml
when:
@ -14,6 +15,7 @@
- name: check if it is Atomic host
stat: path=/run/ostree-booted
register: stat_ostree
always_run: true
- name: set fact for using Atomic host
set_fact:

View File

@ -3,6 +3,7 @@
command: getenforce
register: sestatus
changed_when: false
always_run: true
- name: set selinux permissions
shell: chcon -Rt svirt_sandbox_file_t {{ item }}

View File

@ -12,6 +12,7 @@
- name: verify if the disk was already prepared
shell: "lsblk -o PARTLABEL {{ item }} | grep -sq 'ceph'"
failed_when: false
always_run: true
with_items: "{{ ceph_osd_docker_devices }}"
register: osd_prepared

View File

@ -4,6 +4,7 @@
with_items: "{{ devices }}"
changed_when: false
failed_when: false
always_run: true
register: osd_path
when: not osd_directory
@ -12,6 +13,7 @@
with_items: "{{ osd_path.results }}"
changed_when: false
failed_when: false
always_run: true
register: osd_id_non_dir_scenario
when: not osd_directory
@ -20,6 +22,7 @@
with_items: "{{ osd_directories }}"
changed_when: false
failed_when: false
always_run: true
register: osd_id_dir_scenario
when: osd_directory