From 9e3a9c03e9314bee873f28821014d0242fd853a5 Mon Sep 17 00:00:00 2001 From: Vladislav Vasilev Date: Thu, 14 Sep 2023 15:03:09 +0300 Subject: [PATCH 1/9] Fix Salt 6->8 Chars --- plugins/modules/nxos_user.py | 2 +- tests/unit/modules/network/nxos/test_nxos_user.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/modules/nxos_user.py b/plugins/modules/nxos_user.py index 2456c53ac..0b727dca8 100644 --- a/plugins/modules/nxos_user.py +++ b/plugins/modules/nxos_user.py @@ -473,7 +473,7 @@ def main(): # check if provided hashed password is infact a hash if module.params["hashed_password"] is not None: - if not re.match(r"^\$5\$......\$.*$", module.params["hashed_password"]): + if not re.match(r"^\$5\$........\$.*$", module.params["hashed_password"]): module.fail_json(msg="Provided hash is not valid") if commands: diff --git a/tests/unit/modules/network/nxos/test_nxos_user.py b/tests/unit/modules/network/nxos/test_nxos_user.py index c397c82cb..1bd5d4cce 100644 --- a/tests/unit/modules/network/nxos/test_nxos_user.py +++ b/tests/unit/modules/network/nxos/test_nxos_user.py @@ -105,13 +105,13 @@ def test_nxos_hashed_password(self): set_module_args( dict( name="ansible", - hashed_password="$5$JFHICC$u.zXRUgprAkkYLiEns8VrhsNEIOj7FzVrn67tuJdtKB", + hashed_password="$5$VVJFHICC$u.zXRUgprAkkYLiEns8VrhsNEIOj7FzVrn67tuJdtKB", ), ) self.execute_module( changed=True, commands=[ "username ansible", - "username ansible password 5 $5$JFHICC$u.zXRUgprAkkYLiEns8VrhsNEIOj7FzVrn67tuJdtKB", + "username ansible password 5 $5$VVJFHICC$u.zXRUgprAkkYLiEns8VrhsNEIOj7FzVrn67tuJdtKB", ], ) From 3e95efefc6ca42256a6bc5ce0b9af9108ef5f118 Mon Sep 17 00:00:00 2001 From: Vladislav Vasilev Date: Fri, 22 Dec 2023 15:40:34 +0200 Subject: [PATCH 2/9] amend CHANGELOG --- CHANGELOG.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9362e34d6..a18b97a1b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,10 @@ Cisco Nxos Collection Release Notes .. contents:: Topics +v5.2.2 +====== +- nxos_user - fix Salt (6->8 as supported by Cisco NX-OS) chars + v5.2.1 ====== From 273e3f2e758321eddc149a6af405b8a93684094e Mon Sep 17 00:00:00 2001 From: Vladislav Vasilev Date: Fri, 22 Dec 2023 16:00:36 +0200 Subject: [PATCH 3/9] add change type in log --- CHANGELOG.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e413c7954..44295979b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,10 @@ Cisco Nxos Collection Release Notes v5.2.2 ====== + +Bugfixes +-------- + - nxos_user - fix Salt (6->8 as supported by Cisco NX-OS) chars ======= From c83898673039e400fde5447530ff39547f016f84 Mon Sep 17 00:00:00 2001 From: Vladislav Vasilev Date: Fri, 22 Dec 2023 17:51:33 +0200 Subject: [PATCH 4/9] amend changelog --- CHANGELOG.rst | 9 --------- changelogs/changelog.yaml | 5 +++++ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 44295979b..6571b46c6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,15 +5,6 @@ Cisco Nxos Collection Release Notes .. contents:: Topics -v5.2.2 -====== - -Bugfixes --------- - -- nxos_user - fix Salt (6->8 as supported by Cisco NX-OS) chars - -======= v6.0.0 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index ad41cda1f..407c7b333 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1014,6 +1014,11 @@ releases: - fix_763.yaml - vtp_version.yaml release_date: "2023-10-03" + 5.2.2: + changes: + bugfixes: + - nxos_user - fix Salt (6->8 as supported by Cisco NX-OS) chars + release_date: "2023-12-22" 5.3.0: changes: minor_changes: From f86762cfebbad7839d68a68bf21c731b0f06a8b4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 15:52:58 +0000 Subject: [PATCH 5/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- changelogs/changelog.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 407c7b333..cbc6de119 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1017,7 +1017,7 @@ releases: 5.2.2: changes: bugfixes: - - nxos_user - fix Salt (6->8 as supported by Cisco NX-OS) chars + - nxos_user - fix Salt (6->8 as supported by Cisco NX-OS) chars release_date: "2023-12-22" 5.3.0: changes: From fa18978baca9efb9b34047d71d08dc213e8facb3 Mon Sep 17 00:00:00 2001 From: Vladislav Vasilev Date: Fri, 22 Dec 2023 17:54:30 +0200 Subject: [PATCH 6/9] amend changelog --- CHANGELOG.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6571b46c6..8c1d38544 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -26,6 +26,14 @@ Minor Changes - nxos_config - Relax restrictions on I(src) parameter so it can be used more like I(lines). (https://github.com/ansible-collections/cisco.nxos/issues/89). +v5.2.2 +====== + +Bugfixes +-------- + +- nxos_user - fix Salt (6->8 as supported by Cisco NX-OS) chars + v5.2.1 ====== From 8660626583a630219510ac3927cdfa34502b6134 Mon Sep 17 00:00:00 2001 From: Vladislav Vasilev Date: Fri, 22 Dec 2023 18:05:20 +0200 Subject: [PATCH 7/9] amend changelog --- CHANGELOG.rst | 16 ++++++++-------- changelogs/changelog.yaml | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8c1d38544..8f6a1ede9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,14 @@ Cisco Nxos Collection Release Notes .. contents:: Topics +v6.0.1 +====== + +Bugfixes +-------- + +- nxos_user - fix Salt (6->8 as supported by Cisco NX-OS) chars + v6.0.0 ====== @@ -26,14 +34,6 @@ Minor Changes - nxos_config - Relax restrictions on I(src) parameter so it can be used more like I(lines). (https://github.com/ansible-collections/cisco.nxos/issues/89). -v5.2.2 -====== - -Bugfixes --------- - -- nxos_user - fix Salt (6->8 as supported by Cisco NX-OS) chars - v5.2.1 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index cbc6de119..fa72f973b 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1014,11 +1014,6 @@ releases: - fix_763.yaml - vtp_version.yaml release_date: "2023-10-03" - 5.2.2: - changes: - bugfixes: - - nxos_user - fix Salt (6->8 as supported by Cisco NX-OS) chars - release_date: "2023-12-22" 5.3.0: changes: minor_changes: @@ -1041,3 +1036,8 @@ releases: - prep_300.yaml - trivial_lint.yaml release_date: "2023-11-30" + 6.0.1: + changes: + bugfixes: + - nxos_user - fix Salt (6->8 as supported by Cisco NX-OS) chars + release_date: "2023-12-22" From e08055925130f1b37873fd0fa3d3bfeb64843b6c Mon Sep 17 00:00:00 2001 From: Vladislav Vasilev Date: Fri, 22 Dec 2023 18:27:30 +0200 Subject: [PATCH 8/9] trigger GitHub actions From 35a5d725329d335e4bdaa4dba1670f14ffa3489c Mon Sep 17 00:00:00 2001 From: Vladislav Vasilev Date: Fri, 5 Jan 2024 01:23:34 +0200 Subject: [PATCH 9/9] add changelog/fragmets file --- CHANGELOG.rst | 8 -------- changelogs/changelog.yaml | 5 ----- changelogs/fragments/758_fix_nxos_user.yaml | 3 +++ 3 files changed, 3 insertions(+), 13 deletions(-) create mode 100644 changelogs/fragments/758_fix_nxos_user.yaml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8f6a1ede9..6571b46c6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,14 +5,6 @@ Cisco Nxos Collection Release Notes .. contents:: Topics -v6.0.1 -====== - -Bugfixes --------- - -- nxos_user - fix Salt (6->8 as supported by Cisco NX-OS) chars - v6.0.0 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index fa72f973b..ad41cda1f 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1036,8 +1036,3 @@ releases: - prep_300.yaml - trivial_lint.yaml release_date: "2023-11-30" - 6.0.1: - changes: - bugfixes: - - nxos_user - fix Salt (6->8 as supported by Cisco NX-OS) chars - release_date: "2023-12-22" diff --git a/changelogs/fragments/758_fix_nxos_user.yaml b/changelogs/fragments/758_fix_nxos_user.yaml new file mode 100644 index 000000000..84e28f704 --- /dev/null +++ b/changelogs/fragments/758_fix_nxos_user.yaml @@ -0,0 +1,3 @@ +--- +bugfixes: + - nxos_user - fix Salt (6->8 as supported by Cisco NX-OS) chars