Skip to content

ceph/ceph.automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ceph Automation Collection

This repository contains the ceph.automation Ansible Collection.

Tested with Ansible

Tested with ansible-core >=2.15 releases and the current development version of ansible-core.

External requirements

Some modules and plugins require external libraries. Please check the requirements for each plugin or module you use in the documentation to find out which requirements are needed.

Included content

Please check the included content on the Ansible Galaxy page for this collection.

Using this collection

    ansible-galaxy collection install ceph.automation

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml using the format:

collections:
  - name: ceph.automation

To upgrade the collection to the latest available version, run the following command:

ansible-galaxy collection install ceph.automation --upgrade

You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax where X.Y.Z can be any available version:

ansible-galaxy collection install ceph.automation:==X.Y.Z

See Ansible Using collections for more details.

Ceph CLI execution (cephadm vs host ceph)

Several modules run Ceph commands either through cephadm (cephadm shell ceph …) or directly with the ceph binary on the target (keyring auth). This matters for clusters not managed by cephadm (for example some Proxmox VE setups).

Options

Parameter Default Purpose
use_cephadm true true: cephadm shell; false: host ceph
cluster ceph Cluster name for host ceph (--cluster)
ceph_client client.admin Client name for host ceph (-n)
keyring (derived) Keyring path; default /etc/ceph/<cluster>.<ceph_client>.keyring

These options are documented on each affected module and shared via the ceph.automation.ceph_cli doc fragment.

Apply to every supported module in a play

Use the ceph_cli action group so you set use_cephadm once (see meta/runtime.yml for the module list):

- name: Manage Ceph without cephadm shell
  hosts: ceph_nodes
  become: true

  module_defaults:
    group/ceph.automation.ceph_cli:
      use_cephadm: false
      # Optional if paths differ from defaults:
      # cluster: ceph
      # ceph_client: client.admin
      # keyring: /etc/ceph/ceph.client.admin.keyring

  tasks:
    - name: Read a config value
      ceph.automation.ceph_config:
        action: get
        who: global
        option: osd_pool_default_size

Override on a single task

- hosts: mixed
  become: true
  module_defaults:
    group/ceph.automation.ceph_cli:
      use_cephadm: true

  tasks:
    - name: This task uses host ceph instead
      ceph.automation.ceph_config:
        use_cephadm: false
        action: get
        who: global
        option: osd_pool_default_size

cephadm_registry_login

cephadm_registry_login only works with cephadm. It fails if use_cephadm: false.

Release notes

See the changelog.

Roadmap

More information

Licensing

Apache License, Version 2.0.

See LICENSE to see the full text.

About

ansible module collection

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages