Skip to content

Commit

Permalink
Merge branch 'ansible-collections:main' into template_file
Browse files Browse the repository at this point in the history
  • Loading branch information
masa-orca authored Jan 10, 2024
2 parents 5db97f9 + f2287d6 commit 465924b
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 13 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
======

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion changelogs/.plugin-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,4 @@ plugins:
strategy: {}
test: {}
vars: {}
version: 2.3.0
version: 2.3.1
7 changes: 7 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
21 changes: 11 additions & 10 deletions docs/PUBLISHING_TO_GALAXY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: community
name: zabbix
version: 2.3.0
version: 2.3.1
readme: README.md
authors:
- Dusan Matejka (@D3DeFi)
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/zabbix_user_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 465924b

Please sign in to comment.