Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert repository to Ansible Collection format #67

Merged
merged 1 commit into from
Sep 23, 2021

Conversation

bartowl
Copy link

@bartowl bartowl commented Sep 23, 2021

This PR fixes #58 and makes it possible to use this code as ansible collection opitzconsulting.ansible-oracle.
For upstream PR to oravirt the top level galaxy.yml should be updated to point to different namespace (oravirt?).

Please note, that at least at this stage it is not intended to upload this collection to galaxy repository and please do not upload it. If it will be done, then it should be done from the main git repository (oravirt) and not from any fork.

Here is a simple example how to download this collection:

[user@host ~]$ mkdir coll
[user@host ~]$ ANSIBLE_COLLECTIONS_PATH="$(pwd)/coll" ~/.local/bin/ansible-galaxy collection install -v -r requirements.yml -p coll
Using /etc/ansible/ansible.cfg as config file
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'opitzconsulting.ansible-oracle:2.0.0' to '/home/user/coll/ansible_collections/opitzconsulting/ansible-oracle'
Created collection for opitzconsulting.ansible-oracle at /home/user/coll/ansible_collections/opitzconsulting/ansible-oracle
opitzconsulting.ansible-oracle (2.0.0) was installed successfully
[user@host ~]$ cat requirements.yml
collections:
  - name: https://github.com/bartowl/ansible-oracle.git
    type: git
    version: add_collection # (git branch or tag name here)

Usage in playbooks is then typical to any other ansible collections - you have either to prefix the role names with opitzonsulting.ansible-oracle or use:

collections:
  - opitzconsulting.ansible-oracle

on the play level

galaxy.yml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Small changes to be able to use this code as ansible collection
2 participants