From f8836560420d92812085091906fa88d7c536511e Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 30 Nov 2022 08:42:26 +0100 Subject: [PATCH 1/2] preflight: fix a typo d13b9a1d introduced a typo. This commit fixes it. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2148827 Signed-off-by: Guillaume Abrioux --- cephadm-preflight.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cephadm-preflight.yml b/cephadm-preflight.yml index abed25a..979614b 100644 --- a/cephadm-preflight.yml +++ b/cephadm-preflight.yml @@ -139,7 +139,7 @@ baseurl: "{{ item.baseurl }}" file: "{{ item.ceph_custom | default(omit) }}" priority: "{{ item.priority | default(omit) }}" - enabled: "{{ item.enabled | defualt(omit) }}" + enabled: "{{ item.enabled | default(omit) }}" register: result until: result is succeeded loop: "{{ ceph_custom_repositories }}" From 986b144dbf7875632296bf894b5c78910a6b0e12 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 30 Nov 2022 08:55:50 +0100 Subject: [PATCH 2/2] library: make the code PEP 484 compliant Typical message: ``` PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True ``` See https://github.com/hauntsaninja/no_implicit_optional for more details Signed-off-by: Guillaume Abrioux --- library/ceph_orch_host.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/ceph_orch_host.py b/library/ceph_orch_host.py index 944f509..d7b58cb 100644 --- a/library/ceph_orch_host.py +++ b/library/ceph_orch_host.py @@ -15,7 +15,7 @@ # limitations under the License. from __future__ import absolute_import, division, print_function -from typing import List, Tuple +from typing import Optional, List, Tuple __metaclass__ = type from ansible.module_utils.basic import AnsibleModule # type: ignore @@ -134,7 +134,7 @@ def update_host(module: "AnsibleModule", action: str, name: str, address: str = '', - labels: List[str] = None) -> Tuple[int, List[str], str, str]: + labels: Optional[List[str]] = None) -> Tuple[int, List[str], str, str]: cmd = build_base_cmd_orch(module) cmd.extend(['host', action, name]) if action == 'add' and address: