stackhpc.cephadm.cephadm_crush_rule (1.15.1) — module

Manage Ceph Crush Replicated/Erasure Rule

| "added in version" 1.4.0 of stackhpc.cephadm"

Authors: Dimitri Savineau <dsavinea@redhat.com>, Michal Nasiadka <michal@stackhpc.com>

Install collection

Install with ansible-galaxy collection install stackhpc.cephadm:==1.15.1


Add to requirements.yml

  collections:
    - name: stackhpc.cephadm
      version: 1.15.1

Description

Manage Ceph Crush rule(s) creation, deletion and updates.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: create a Ceph Crush replicated rule
  cephadm_crush_rule:
    name: foo
    bucket_root: default
    bucket_type: host
    device_class: ssd
    rule_type: replicated
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: create a Ceph Crush erasure rule
  cephadm_crush_rule:
    name: foo
    profile: bar
    rule_type: erasure
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: get a Ceph Crush rule information
  cephadm_crush_rule:
    name: foo
    state: info
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: delete a Ceph Crush rule
  cephadm_crush_rule:
    name: foo
    state: absent

Inputs

    
name:
    description:
    - name of the Ceph Crush rule.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    - info
    default: present
    description: If 'present' is used, the module creates a rule if it doesn't exist or
      update it if it already exists. If 'absent' is used, the module will simply delete
      the rule. If 'info' is used, the module will return all details about the existing
      rule (json formatted).
    required: false
    type: str

profile:
    description:
    - The ceph erasure profile for erasure rule.
    required: false
    type: str

rule_type:
    choices:
    - replicated
    - erasure
    description:
    - The ceph CRUSH rule type.
    required: false
    type: str

bucket_root:
    description:
    - The ceph bucket root for replicated rule.
    required: false
    type: str

bucket_type:
    choices:
    - osd
    - host
    - chassis
    - rack
    - row
    - pdu
    - pod
    - room
    - datacenter
    - zone
    - region
    - root
    description:
    - The ceph bucket type for replicated rule.
    required: false
    type: str

device_class:
    description:
    - The ceph device class for replicated rule.
    required: false
    type: str