Skip to content

Commit

Permalink
Merge branch 'devel' into fix/error-handle
Browse files Browse the repository at this point in the history
  • Loading branch information
djdanielsson authored Apr 17, 2024
2 parents bc81f5c + cac92c2 commit 5fd851e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_standalone_versioned.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Set environment variables
working-directory: galaxy_ng
run: |
echo "OCI_ENV_PATH=${HOME}/work/ah_configuration/ah_configuration/oci_env" >> $GITHUB_ENV
echo "OCI_ENV_PATH=${GITHUB_WORKSPACE}/oci_env" >> $GITHUB_ENV
echo "COMPOSE_INTERACTIVE_NO_CLI=1" >> $GITHUB_ENV
echo "OCI_VERBOSE=1" >> $GITHUB_ENV
echo "GH_DUMP_LOGS=1" >> $GITHUB_ENV
Expand Down
5 changes: 5 additions & 0 deletions changelogs/fragments/bug_collection_delete.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
bugfixes:
- Fixed an issue where if version was not specified in ah_collection and state=absent then the module will fail
- Fixed an issue where if the collection version has a '-' then it would not be referenced properly from the file path
...
4 changes: 2 additions & 2 deletions plugins/modules/ah_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ def main():
if auto_approve:
if version:
pass
else:
version = path.split("-")[-1].replace('.tar.gz', '')
elif path:
version = "-".join(path.split("-")[2:]).replace('.tar.gz', '')

# Attempt to look up an existing item based on the provided data
if version:
Expand Down
5 changes: 5 additions & 0 deletions tests/playbooks/ah_configs/ah_collections.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ ah_collections_overwrite:
timeout: 180
overwrite_existing: true

ah_collections_delete:
- namespace: galaxy
name: galaxy
state: absent

ah_git_collections:
- collection_name: collection_test
git_url: https://github.com/sean-m-sullivan/collection_test
Expand Down
6 changes: 6 additions & 0 deletions tests/playbooks/testing_collections_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
vars:
ah_collections: "{{ ah_collections_overwrite }}"

- name: Delete Collection
ansible.builtin.include_role:
name: collection
vars:
ah_collections: "{{ ah_collections_delete }}"

- name: Publish Collections
ansible.builtin.include_role:
name: publish
Expand Down

0 comments on commit 5fd851e

Please sign in to comment.