From 74f4c9eb2f212c365d1352d56a76fbfb180c704d Mon Sep 17 00:00:00 2001 From: Piers Harding Date: Mon, 10 Apr 2023 15:49:49 +0100 Subject: [PATCH 1/2] Enable override of ceph command Signed-off-by: Piers Harding --- roles/commands/defaults/main.yml | 1 + roles/commands/tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/commands/defaults/main.yml b/roles/commands/defaults/main.yml index 3c6a661..6a374b0 100644 --- a/roles/commands/defaults/main.yml +++ b/roles/commands/defaults/main.yml @@ -1,2 +1,3 @@ --- +cephadm_command: ceph cephadm_commands: [] diff --git a/roles/commands/tasks/main.yml b/roles/commands/tasks/main.yml index b8c1e2e..f8481c3 100644 --- a/roles/commands/tasks/main.yml +++ b/roles/commands/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Execute custom commands command: - cmd: "cephadm shell -- ceph {{ item }}" + cmd: "cephadm shell -- {{ cephadm_command }} {{ item }}" register: cephadm_commands_result with_items: "{{ cephadm_commands }}" become: true From f622c98c4f70eaf4c5d5626db4132b08b46304cf Mon Sep 17 00:00:00 2001 From: Piers Harding Date: Mon, 10 Apr 2023 17:30:30 +0100 Subject: [PATCH 2/2] Update commands documentation Signed-off-by: Piers Harding --- roles/commands/README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/commands/README.md b/roles/commands/README.md index e805d8f..d9e3462 100644 --- a/roles/commands/README.md +++ b/roles/commands/README.md @@ -19,7 +19,14 @@ with at least one host in it - see the `cephadm` role for more details. ## Role variables -* `cephadm_commands`: A list of commands to pass to `cephadm shell -- ceph` + +* `cephadm_command`: The command to use with the list of commands to execute - defaults to `ceph`, but can be any command found in the `quay.io/ceph/ceph:` image. + Example: + ``` + cephadm_command: radosgw-admin + ``` + +* `cephadm_commands`: A list of commands to pass to `cephadm shell -- {{ cephadm_command }}` Example: ``` cephadm_commands: