From bfd05b926bed9995149bc333ac1edf45de60a1de Mon Sep 17 00:00:00 2001 From: ONODERA Masaru <46081939+masa-orca@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:19:12 +0900 Subject: [PATCH 1/3] Avoid to update user-directory configuration in dry run. (#1156) --- .../fragments/1156-bugfix_zabbix_user_directory_dryrun.yml | 2 ++ plugins/modules/zabbix_user_directory.py | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 changelogs/fragments/1156-bugfix_zabbix_user_directory_dryrun.yml diff --git a/changelogs/fragments/1156-bugfix_zabbix_user_directory_dryrun.yml b/changelogs/fragments/1156-bugfix_zabbix_user_directory_dryrun.yml new file mode 100644 index 000000000..c49e131f2 --- /dev/null +++ b/changelogs/fragments/1156-bugfix_zabbix_user_directory_dryrun.yml @@ -0,0 +1,2 @@ +bugfixes: + - Avoid to update user-directory configuration in dry run. diff --git a/plugins/modules/zabbix_user_directory.py b/plugins/modules/zabbix_user_directory.py index dc5a2bb04..b383fcdcf 100644 --- a/plugins/modules/zabbix_user_directory.py +++ b/plugins/modules/zabbix_user_directory.py @@ -691,6 +691,8 @@ def main(): else: # User Directory with given name exists if state == "absent": + if module.check_mode: + module.exit_json(changed=True) user_directory._zapi.userdirectory.delete([directory[0]["userdirectoryid"]]) module.exit_json( changed=True, @@ -705,6 +707,8 @@ def main(): parameters, directory[0], diff_dict ): parameters["userdirectoryid"] = directory[0]["userdirectoryid"] + if module.check_mode: + module.exit_json(changed=True) user_directory._zapi.userdirectory.update(parameters) module.exit_json( changed=True, From 15cc5bb931a620f5819670e972c0d9e5f29be09c Mon Sep 17 00:00:00 2001 From: Evgeny Date: Tue, 9 Jan 2024 09:47:42 -0500 Subject: [PATCH 2/3] Update PUBLISHING_TO_GALAXY.md (#1159) * Update PUBLISHING_TO_GALAXY.md * Fix sanity check error. --- docs/PUBLISHING_TO_GALAXY.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/PUBLISHING_TO_GALAXY.md b/docs/PUBLISHING_TO_GALAXY.md index ed41d523f..7272f1006 100644 --- a/docs/PUBLISHING_TO_GALAXY.md +++ b/docs/PUBLISHING_TO_GALAXY.md @@ -26,18 +26,19 @@ git push origin X.Y.Z ``` -2. Create new Release pointing to new X.Y.Z tag https://github.com/ansible-collections/community.zabbix/releases +2. All community.* collections are usually published by Zuul, which works by you having to push a tag, and Zuul will build the collection from that tag (with the version in galaxy.yml set to the tag's version) and publish it. It's usually a good idea to take a look at [Zuul](https://ansible.softwarefactory-project.io/zuul/status) when pushing a tag and watch the release process to see whether it succeeds or not (and afterwards check on [Galaxy](https://galaxy.ansible.com/community/zabbix) whether the newest version shows up - note that it can make a few seconds after publishing finished until it actually shows up; that's new with the new Galaxy). -Additional manual steps are required when automatic publish to Ansible Galaxy is not enabled in the repository. This -requires a user who has access to the `community` namespace on Ansible Galaxy to publish the build artifact. + If there is an error in building and it seems to be on Zuul side, the best thing is to re-push the tag to trigger the publish step another time. For that, assuming the remote for github.com/ansible-collections/community.zabbix is called upstream, you can do -3. Run the following commands to build and release the new version on Galaxy: - ``` - ansible-galaxy collection build - ansible-galaxy collection publish ./community-zabbix-$VERSION_HERE.tar.gz - ``` + ``` + git push upstream :2.3.0 # to delete the tag + git push --tags upstream # to re-push all tags + ``` + That should delete and re-create the tag, and thus trigger Zuul again to publish the collection. + +3. If still having problems in step 2. then create a post in "Get Help" section of [Ansible forum](https://forum.ansible.com/c/help/6/none) so somebody from admins can take a look and see/fix why new version has not been published to Galaxy (e.g. https://forum.ansible.com/t/access-to-collection/2295/4). + +4. Create new Release pointing to new X.Y.Z tag https://github.com/ansible-collections/community.zabbix/releases -4. If 3. is not feasible for any reason then create a post in "Get Help" section of Ansible forum https://forum.ansible.com/c/help/6/none so somebody from admins can take a look and see/fix why new version has not been published to Galaxy (e.g. https://forum.ansible.com/t/access-to-collection/2295/4). -After the version is published, verify it exists on the [Zabbix Collection Galaxy page](https://galaxy.ansible.com/community/zabbix). From f2287d6adb65ef820f06de416b08072cabf9a4a9 Mon Sep 17 00:00:00 2001 From: Troy W Date: Wed, 10 Jan 2024 08:33:19 -0500 Subject: [PATCH 3/3] 2.3.1 Prep (#1161) --- CHANGELOG.rst | 8 ++++++++ README.md | 2 +- changelogs/.plugin-cache.yaml | 2 +- changelogs/changelog.yaml | 7 +++++++ .../1156-bugfix_zabbix_user_directory_dryrun.yml | 2 -- galaxy.yml | 2 +- 6 files changed, 18 insertions(+), 5 deletions(-) delete mode 100644 changelogs/fragments/1156-bugfix_zabbix_user_directory_dryrun.yml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2a7241d4e..e6b53e476 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,14 @@ community.zabbix Release Notes .. contents:: Topics +v2.3.1 +====== + +Bugfixes +-------- + +- Avoid to update user-directory configuration in dry run. + v2.3.0 ====== diff --git a/README.md b/README.md index 145cd5eb5..be268fc4a 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ You can also include it in a `requirements.yml` file along with other required c --- collections: - name: community.zabbix - version: 2.3.0 + version: 2.3.1 - name: ansible.posix version: 1.3.0 - name: community.general diff --git a/changelogs/.plugin-cache.yaml b/changelogs/.plugin-cache.yaml index db83c8f4e..9ea52adc2 100644 --- a/changelogs/.plugin-cache.yaml +++ b/changelogs/.plugin-cache.yaml @@ -189,4 +189,4 @@ plugins: strategy: {} test: {} vars: {} -version: 2.3.0 +version: 2.3.1 diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index f43a89908..600e0ab78 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1085,3 +1085,10 @@ releases: - pymysql.yml - raspberrypi.yml release_date: '2024-01-02' + 2.3.1: + changes: + bugfixes: + - Avoid to update user-directory configuration in dry run. + fragments: + - 1156-bugfix_zabbix_user_directory_dryrun.yml + release_date: '2024-01-10' diff --git a/changelogs/fragments/1156-bugfix_zabbix_user_directory_dryrun.yml b/changelogs/fragments/1156-bugfix_zabbix_user_directory_dryrun.yml deleted file mode 100644 index c49e131f2..000000000 --- a/changelogs/fragments/1156-bugfix_zabbix_user_directory_dryrun.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - Avoid to update user-directory configuration in dry run. diff --git a/galaxy.yml b/galaxy.yml index 44a3613f9..8888911a4 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: community name: zabbix -version: 2.3.0 +version: 2.3.1 readme: README.md authors: - Dusan Matejka (@D3DeFi)