Better --check compatibility for ceph-mon 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 21:05:32 +01:00
parent 7b1dbbbdf8
commit 9337b19ac0
8 changed files with 10 additions and 0 deletions

View File

@ -17,6 +17,7 @@
changed_when: false
failed_when: false
register: statleftover
always_run: true
- name: fail if we find existing cluster files
fail:

View File

@ -18,6 +18,7 @@
removes="{{ fetch_directory }}/ceph_cluster_uuid.conf"
changed_when: false
register: cluster_uuid
always_run: true
become: false
when: generate_fsid

View File

@ -7,6 +7,7 @@
failed_when: false
run_once: true
register: ceph_version
always_run: true
- set_fact:
after_hamer=True

View File

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

View File

@ -4,10 +4,12 @@
register: ceph_health
changed_when: false
failed_when: false
always_run: true
- 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

@ -4,6 +4,7 @@
ceph --connect-timeout 5 --cluster {{ cluster }} df | awk '/rbd/ {print $3}'
changed_when: false
failed_when: false
always_run: true
register: rbd_pool_df
- name: check pg num for rbd pool
@ -11,6 +12,7 @@
ceph --connect-timeout 5 --cluster {{ cluster }} osd pool get rbd pg_num | awk '{print $2}'
changed_when: false
failed_when: false
always_run: true
register: rbd_pool_pgs
- name: destroy and recreate rbd pool if osd_pool_default_pg_num is not honoured

View File

@ -2,6 +2,7 @@
- name: collect all the pools
command: rados --cluster {{ cluster }} lspools
register: ceph_pools
always_run: true
when: ceph_release_num.{{ ceph_release }} >= ceph_release_num.hammer
- name: secure the cluster