Better --check compatibility for ceph-rgw 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-27 14:27:28 +01:00
parent 4c76001961
commit 74cf3532a9
7 changed files with 11 additions and 0 deletions

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

@ -17,6 +17,7 @@
changed_when: false
become: false
failed_when: false
always_run: true
register: statconfig
when:
- nfs_obj_gw

View File

@ -5,6 +5,7 @@
shell: docker inspect "docker.io/{{ ceph_rgw_docker_username }}/{{ ceph_rgw_docker_imagename }}:{{ ceph_rgw_docker_image_tag }}" | awk -F '=' '/CEPH_VERSION/ { gsub ("\",", "", $2); print $2 }' | uniq
changed_when: false
failed_when: false
always_run: true
run_once: true
register: ceph_version

View File

@ -11,6 +11,7 @@
changed_when: false
become: false
ignore_errors: true
always_run: true
register: statconfig
- name: try to fetch ceph config and keys

View File

@ -4,9 +4,11 @@
register: ceph_health
changed_when: false
failed_when: false
always_run: true
- name: check if it is Atomic host
stat: path=/run/ostree-booted
always_run: true
register: stat_ostree
- name: set fact for using Atomic host

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,21 +4,25 @@
register: realmcheck
failed_when: False
changed_when: False
always_run: True
- name: check if the zonegroup already exists
command: radosgw-admin zonegroup get --rgw-zonegroup={{ rgw_zonegroup }}
register: zonegroupcheck
failed_when: False
changed_when: False
always_run: True
- name: check if the zone already exists
command: radosgw-admin zone get --rgw-zone={{ rgw_zone }}
register: zonecheck
failed_when: False
changed_when: False
always_run: True
- name: check if the system user already exists
command: radosgw-admin user info --uid=zone.user
register: usercheck
failed_when: False
changed_when: False
always_run: True