mirror of https://github.com/ceph/ceph-ansible.git
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
parent
4c76001961
commit
74cf3532a9
|
@ -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
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
become: false
|
become: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
register: statconfig
|
register: statconfig
|
||||||
when:
|
when:
|
||||||
- nfs_obj_gw
|
- nfs_obj_gw
|
||||||
|
|
|
@ -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
|
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
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
run_once: true
|
run_once: true
|
||||||
register: ceph_version
|
register: ceph_version
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
become: false
|
become: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
always_run: true
|
||||||
register: statconfig
|
register: statconfig
|
||||||
|
|
||||||
- name: try to fetch ceph config and keys
|
- name: try to fetch ceph config and keys
|
||||||
|
|
|
@ -4,9 +4,11 @@
|
||||||
register: ceph_health
|
register: ceph_health
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
always_run: true
|
||||||
|
|
||||||
- name: check if it is Atomic host
|
- name: check if it is Atomic host
|
||||||
stat: path=/run/ostree-booted
|
stat: path=/run/ostree-booted
|
||||||
|
always_run: true
|
||||||
register: stat_ostree
|
register: stat_ostree
|
||||||
|
|
||||||
- name: set fact for using Atomic host
|
- name: set fact for using Atomic host
|
||||||
|
|
|
@ -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 }}
|
||||||
|
|
|
@ -4,21 +4,25 @@
|
||||||
register: realmcheck
|
register: realmcheck
|
||||||
failed_when: False
|
failed_when: False
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
always_run: True
|
||||||
|
|
||||||
- name: check if the zonegroup already exists
|
- name: check if the zonegroup already exists
|
||||||
command: radosgw-admin zonegroup get --rgw-zonegroup={{ rgw_zonegroup }}
|
command: radosgw-admin zonegroup get --rgw-zonegroup={{ rgw_zonegroup }}
|
||||||
register: zonegroupcheck
|
register: zonegroupcheck
|
||||||
failed_when: False
|
failed_when: False
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
always_run: True
|
||||||
|
|
||||||
- name: check if the zone already exists
|
- name: check if the zone already exists
|
||||||
command: radosgw-admin zone get --rgw-zone={{ rgw_zone }}
|
command: radosgw-admin zone get --rgw-zone={{ rgw_zone }}
|
||||||
register: zonecheck
|
register: zonecheck
|
||||||
failed_when: False
|
failed_when: False
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
always_run: True
|
||||||
|
|
||||||
- name: check if the system user already exists
|
- name: check if the system user already exists
|
||||||
command: radosgw-admin user info --uid=zone.user
|
command: radosgw-admin user info --uid=zone.user
|
||||||
register: usercheck
|
register: usercheck
|
||||||
failed_when: False
|
failed_when: False
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
always_run: True
|
||||||
|
|
Loading…
Reference in New Issue