Skip to content

Commit

Permalink
Fix namespace for Ansible Galaxy
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenSorriaux committed Mar 20, 2023
1 parent aa4b9d3 commit bb7fff8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@ jobs:
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Build ansible collection package
- name: Build ansible collection package with StephenSorriaux namespace
run: |
./build-ansible-collection.sh
./build-ansible-collection.sh StephenSorriaux
- name: Publish to GH releases
uses: softprops/action-gh-release@v1
with:
files: "build/StephenSorriaux-ansible_kafka_admin-*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build ansible collection package with stephensorriaux namespace
run: |
./build-ansible-collection.sh stephensorriaux
- name: Publish to Ansible galaxy
run: |
./publish-ansible-collection.sh
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ collections:
- name: https://github.com/StephenSorriaux/ansible-kafka-admin/releases/download/VERSION/StephenSorriaux-ansible_kafka_admin-VERSION.tar.gz
```
Then you can use it adding `StephenSorriaux.ansible_kafka_admin.` namespace prefix before any of defined modules.
### Using Ansible Galaxy
The lib is available under [https://galaxy.ansible.com/stephensorriaux/ansible_kafka_admin](https://galaxy.ansible.com/stephensorriaux/ansible_kafka_admin).
## Usage
### Creating, updating, deleting topics and ACLs
**Note**:
Expand Down
2 changes: 1 addition & 1 deletion build-ansible-collection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

VERSION=$(git describe --abbrev=0 --tags)
CURRENT_MODULES=$(find module_utils -type f -iname "*.py" -execdir basename {} .py ';')
NAMESPACE=StephenSorriaux
NAMESPACE=$1
NAME=ansible_kafka_admin

mkdir -p build/plugins/{modules,module_utils}
Expand Down
2 changes: 1 addition & 1 deletion publish-ansible-collection.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

VERSION=$(git describe --abbrev=0 --tags)
NAMESPACE=StephenSorriaux
NAMESPACE=stephensorriaux
NAME=ansible_kafka_admin

cd build
Expand Down

0 comments on commit bb7fff8

Please sign in to comment.